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] ix86: re-do permanent disabling of x2apic

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ix86: re-do permanent disabling of x2apic
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 11 Feb 2011 06:20:17 -0800
Delivery-date: Fri, 11 Feb 2011 06:22:10 -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@xxxxxxx>
# Date 1297347264 0
# Node ID 332c1f73a594f6c17d9c252c4efc16e3b59a64ba
# Parent  21df67ee70406aa5a0dd452322de5601696efcda
ix86: re-do permanent disabling of x2apic

Move logic into check_x2apic_preenabled() (to make sure
generic_apic_probe() doesn't see genapic already set).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
 xen/arch/x86/apic.c           |   16 ----------------
 xen/arch/x86/genapic/x2apic.c |   12 ++++++++++++
 2 files changed, 12 insertions(+), 16 deletions(-)

diff -r 21df67ee7040 -r 332c1f73a594 xen/arch/x86/apic.c
--- a/xen/arch/x86/apic.c       Thu Feb 10 11:27:52 2011 +0000
+++ b/xen/arch/x86/apic.c       Thu Feb 10 14:14:24 2011 +0000
@@ -961,22 +961,6 @@ void __init x2apic_bsp_setup(void)
     if ( !cpu_has_x2apic )
         return;
 
-#ifdef __i386__
-    clear_bit(X86_FEATURE_X2APIC, boot_cpu_data.x86_capability);
-    if ( x2apic_enabled )
-    {
-        uint64_t msr_content;
-        rdmsrl(MSR_IA32_APICBASE, msr_content);
-        msr_content &= ~(MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD);
-        wrmsrl(MSR_IA32_APICBASE, msr_content);
-        msr_content |= MSR_IA32_APICBASE_ENABLE;
-        wrmsrl(MSR_IA32_APICBASE, msr_content);
-        x2apic_enabled = 0;
-    }
-    printk("x2APIC disabled permanently on x86_32.\n");
-    return;
-#endif
-
     if ( !opt_x2apic )
     {
         if ( !x2apic_enabled )
diff -r 21df67ee7040 -r 332c1f73a594 xen/arch/x86/genapic/x2apic.c
--- a/xen/arch/x86/genapic/x2apic.c     Thu Feb 10 11:27:52 2011 +0000
+++ b/xen/arch/x86/genapic/x2apic.c     Thu Feb 10 14:14:24 2011 +0000
@@ -138,7 +138,19 @@ void __init check_x2apic_preenabled(void
     if ( lo & MSR_IA32_APICBASE_EXTD )
     {
         printk("x2APIC mode is already enabled by BIOS.\n");
+#ifndef __i386__
         x2apic_enabled = 1;
         genapic = apic_x2apic_probe();
+#else
+        lo &= ~(MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_EXTD);
+        wrmsr(MSR_IA32_APICBASE, lo, hi);
+        lo |= MSR_IA32_APICBASE_ENABLE;
+        wrmsr(MSR_IA32_APICBASE, lo, hi);
+        printk("x2APIC disabled permanently on x86_32.\n");
+#endif
     }
+
+#ifdef __i386__
+    clear_bit(X86_FEATURE_X2APIC, boot_cpu_data.x86_capability);
+#endif
 }

_______________________________________________
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] ix86: re-do permanent disabling of x2apic, Xen patchbot-unstable <=