WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: freeze non-current vCPUs of dom0 bef

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: freeze non-current vCPUs of dom0 before entering S5
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 01 Dec 2008 03:50:11 -0800
Delivery-date: Mon, 01 Dec 2008 03:50:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1227190877 0
# Node ID db7a713071fe69b40d279d6322a059e084f73e63
# Parent  857bda0c15b3584c6c2048657fd68ffbaef37b5c
x86: freeze non-current vCPUs of dom0 before entering S5

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/acpi/power.c |   36 ++++++++++++++++++++++++++++++++----
 1 files changed, 32 insertions(+), 4 deletions(-)

diff -r 857bda0c15b3 -r db7a713071fe xen/arch/x86/acpi/power.c
--- a/xen/arch/x86/acpi/power.c Thu Nov 20 14:17:09 2008 +0000
+++ b/xen/arch/x86/acpi/power.c Thu Nov 20 14:21:17 2008 +0000
@@ -77,19 +77,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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: freeze non-current vCPUs of dom0 before entering S5, Xen patchbot-unstable <=