* [PATCH] x86: freeze non-current vCPU-s of dom0 before entering S5
@ 2008-11-20 13:42 Jan Beulich
0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2008-11-20 13:42 UTC (permalink / raw)
To: xen-devel
Also excluding the idle domain from the domains being frozen.
This seems to be particularly important for 3.2 and 3.3, -unstable should
be fine since the non-idle-vCPU-s are being migrated away from the pCPU-s
being torn down.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Index: 2008-11-20/xen/arch/x86/acpi/power.c
===================================================================
--- 2008-11-20.orig/xen/arch/x86/acpi/power.c 2008-11-19 17:37:33.000000000 +0100
+++ 2008-11-20/xen/arch/x86/acpi/power.c 2008-11-20 10:07:54.000000000 +0100
@@ -77,19 +77,51 @@ static void device_power_up(void)
static void freeze_domains(void)
{
struct domain *d;
+ struct vcpu *v;
+ rcu_read_lock(&domlist_read_lock);
for_each_domain ( d )
- if ( d->domain_id != 0 )
+ {
+ switch ( d->domain_id )
+ {
+ default:
domain_pause(d);
+ break;
+ case 0:
+ for_each_vcpu ( d, v )
+ if ( v != current )
+ vcpu_pause(v);
+ break;
+ case IDLE_DOMAIN_ID:
+ break;
+ }
+ }
+ 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 )
- if ( d->domain_id != 0 )
+ {
+ switch ( d->domain_id )
+ {
+ default:
domain_unpause(d);
+ break;
+ case 0:
+ for_each_vcpu ( d, v )
+ if ( v != current )
+ vcpu_unpause(v);
+ break;
+ case IDLE_DOMAIN_ID:
+ break;
+ }
+ }
+ rcu_read_unlock(&domlist_read_lock);
}
static void acpi_sleep_prepare(u32 state)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-20 13:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-20 13:42 [PATCH] x86: freeze non-current vCPU-s of dom0 before entering S5 Jan Beulich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.