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-devel

[Xen-devel] [PATCH] Fix cpu hotplug bug of mtrr update inconsistency

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix cpu hotplug bug of mtrr update inconsistency
From: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
Date: Tue, 1 Jun 2010 16:22:00 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 01 Jun 2010 01:23:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsBY4JCH46cmVkHTAyPKp/cXkDMoQ==
Thread-topic: [PATCH] Fix cpu hotplug bug of mtrr update inconsistency
Fix cpu hotplug bug of mtrr update inconsistency

c/s 20021 changes some mtrr update logic.
A bug is, when a cpu hot-add and then mtrr update, another cpu hot-add may 
break cpu_online_map 
consistency and result in deadlock. 
This patch is used to fix the bug. It move 'mtrr_ap_init' back to bp-ap sync 
stage protected by 
CPU_STATE_CALLOUT and CPU_STATE_CALLIN, and then keep consistency.

Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>


diff -r 96917cf25bf3 xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Fri May 28 10:54:07 2010 +0100
+++ b/xen/arch/x86/smpboot.c    Tue Jun 01 13:58:44 2010 +0800
@@ -202,6 +202,8 @@ void smp_callin(void)
     /* Save our processor parameters. */
     smp_store_cpu_info(cpu);
 
+    mtrr_ap_init();
+
     if ( (rc = hvm_cpu_up()) != 0 )
     {
         extern void (*dead_idle) (void);
@@ -374,7 +376,6 @@ void start_secondary(void *unused)
 
     /* We can take interrupts now: we're officially "up". */
     local_irq_enable();
-    mtrr_ap_init();
 
     microcode_resume_cpu(cpu);
 

Attachment: fix-cpu-hotplug-mtrr.patch
Description: fix-cpu-hotplug-mtrr.patch

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