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-3.2-testing] x86: On CPU shutdown, clear pending FP

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] x86: On CPU shutdown, clear pending FPU exceptions.
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Mar 2008 00:31:18 -0800
Delivery-date: Thu, 06 Mar 2008 00:32:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1204734122 0
# Node ID 75dc8f774858482ca01a1e5d12a2566528e575e0
# Parent  9e22366fb92a3c3fef9adbe85662653ca5fd4e1d
x86: On CPU shutdown, clear pending FPU exceptions.
I've seen at least one BIOS which fails warm reboot if FPU exceptions
are pending.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   17181:017927162815139a0b31f7ce5705e9d8bc886945
xen-unstable date:        Tue Mar 04 10:33:50 2008 +0000
---
 xen/arch/x86/smp.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff -r 9e22366fb92a -r 75dc8f774858 xen/arch/x86/smp.c
--- a/xen/arch/x86/smp.c        Wed Mar 05 16:21:36 2008 +0000
+++ b/xen/arch/x86/smp.c        Wed Mar 05 16:22:02 2008 +0000
@@ -306,15 +306,26 @@ int on_selected_cpus(
     return 0;
 }
 
-static void stop_this_cpu (void *dummy)
+static void __stop_this_cpu(void)
 {
     ASSERT(!local_irq_is_enabled());
 
     disable_local_APIC();
+
     hvm_cpu_down();
 
+    /*
+     * Clear FPU, zapping any pending exceptions. Needed for warm reset with
+     * some BIOSes.
+     */
+    clts();
+    asm volatile ( "fninit" );
+}
+
+static void stop_this_cpu(void *dummy)
+{
+    __stop_this_cpu();
     cpu_clear(smp_processor_id(), cpu_online_map);
-
     for ( ; ; )
         halt();
 }
@@ -334,9 +345,8 @@ void smp_send_stop(void)
         mdelay(1);
 
     local_irq_disable();
-    disable_local_APIC();
+    __stop_this_cpu();
     disable_IO_APIC();
-    hvm_cpu_down();
     local_irq_enable();
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] x86: On CPU shutdown, clear pending FPU exceptions., Xen patchbot-3.2-testing <=