x86: Simplify freeze_domains() and thaw_domains(). Since they now

run in idle-vcpu context, no care needs to be taken about pausing
'current'.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2010-04-19 11:34:49 +01:00
1 parent d4f61a069a
commit 5fa9cbb805
1 file changed
+7 -28
+7 -28
View File
@@ -77,46 +77,25 @@ static void device_power_up(void)
static void freeze_domains(void)
{
struct domain *d;
struct vcpu *v;
rcu_read_lock(&domlist_read_lock);
/*
* Note that we iterate in order of domain-id. Hence we will pause dom0
* first which is required for correctness (as only dom0 can add domains to
* the domain list). Otherwise we could miss concurrently-created domains.
*/
for_each_domain ( d )
{
switch ( d->domain_id )
{
case 0:
for_each_vcpu ( d, v )
if ( v != current )
vcpu_pause(v);
break;
default:
domain_pause(d);
break;
}
}
domain_pause(d);
rcu_read_unlock(&domlist_read_lock);
}
static void thaw_domains(void)
{
struct domain *d;
struct vcpu *v;
rcu_read_lock(&domlist_read_lock);
for_each_domain ( d )
{
switch ( d->domain_id )
{
case 0:
for_each_vcpu ( d, v )
if ( v != current )
vcpu_unpause(v);
break;
default:
domain_unpause(d);
break;
}
}
domain_unpause(d);
rcu_read_unlock(&domlist_read_lock);
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.