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

[Xen-changelog] [xen-4.2-testing] x86/S3: add cache flush on secondary CPUs before going to sleep


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.2-testing <patchbot@xxxxxxx>
  • Date: Fri, 05 Oct 2012 00:55:12 +0000
  • Delivery-date: Fri, 05 Oct 2012 00:55:24 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ben Guthro <ben@xxxxxxxxxx>
# Date 1349338363 -7200
# Node ID b0aed9cadf103ac44d82f46eacd8b056c604fbc0
# Parent  ffabc1ebd9131870e0dd66baa835ee49cfd4aaa9
x86/S3: add cache flush on secondary CPUs before going to sleep

Secondary CPUs, between doing their final memory writes (particularly
updating cpu_initialized) and getting a subsequent INIT, may not write
back all modified data. The INIT itself then causes those modifications
to be lost, so in the cpu_initialized case the CPU would find itself
already initialized, (intentionally) entering an infinite loop instead
of actually coming online.

Signed-off-by: Ben Guthro <ben@xxxxxxxxxx>

Make acpi_dead_idle() call default_dead_idle() rather than duplicating
the logic there.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset: 25940:c8d65d91a6f2
xen-unstable date: Tue Sep 25 06:38:14 UTC 2012
---


diff -r ffabc1ebd913 -r b0aed9cadf10 xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c      Thu Oct 04 10:11:11 2012 +0200
+++ b/xen/arch/x86/acpi/cpu_idle.c      Thu Oct 04 10:12:43 2012 +0200
@@ -647,6 +647,12 @@ static void acpi_dead_idle(void)
     }
 
 default_halt:
+    /*
+     * When going into S3, without flushing caches modified data may be
+     * held by the CPUs spinning here indefinitely, and get discarded by
+     * a subsequent INIT.
+     */
+    wbinvd();
     for ( ; ; )
         halt();
 }
diff -r ffabc1ebd913 -r b0aed9cadf10 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Thu Oct 04 10:11:11 2012 +0200
+++ b/xen/arch/x86/domain.c     Thu Oct 04 10:12:43 2012 +0200
@@ -86,6 +86,12 @@ static void default_idle(void)
 
 static void default_dead_idle(void)
 {
+    /*
+     * When going into S3, without flushing caches modified data may be
+     * held by the CPUs spinning here indefinitely, and get discarded by
+     * a subsequent INIT.
+     */
+    wbinvd();
     for ( ; ; )
         halt();
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.