x86: freeze non-current vCPU-s of dom0 before entering S5
PATCH 1/1 x86: freeze non-current vCPU-s of dom0 before entering S5
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 <[email protected]>
xen/arch/x86/acpi/power.c +34 -2
@@ -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)