[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.2-testing] x86: freeze non-current vCPUs of dom0 before entering S5



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1229440983 0
# Node ID 5cc950a959241471ec63b22abc9308533744ae93
# Parent  98aba5761c5aad01edd5cfcde1c610923f4a27ae
x86: freeze non-current vCPUs of dom0 before entering S5

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
xen-unstable changeset:   18800:db7a713071fe69b40d279d6322a059e084f73e63
xen-unstable date:        Thu Nov 20 14:21:17 2008 +0000
---
 xen/arch/x86/acpi/power.c |   36 ++++++++++++++++++++++++++++++++----
 1 files changed, 32 insertions(+), 4 deletions(-)

diff -r 98aba5761c5a -r 5cc950a95924 xen/arch/x86/acpi/power.c
--- a/xen/arch/x86/acpi/power.c Tue Dec 16 15:20:48 2008 +0000
+++ b/xen/arch/x86/acpi/power.c Tue Dec 16 15:23:03 2008 +0000
@@ -68,19 +68,47 @@ static void freeze_domains(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 )
+        {
+        case 0:
+            for_each_vcpu ( d, v )
+                if ( v != current )
+                    vcpu_pause(v);
+            break;
+        default:
             domain_pause(d);
+            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 )
+        {
+        case 0:
+            for_each_vcpu ( d, v )
+                if ( v != current )
+                    vcpu_unpause(v);
+            break;
+        default:
             domain_unpause(d);
+            break;
+        }
+    }
+    rcu_read_unlock(&domlist_read_lock);
 }
 
 static void acpi_sleep_prepare(u32 state)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.