aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-05-31 12:27:52 +0200
committerJan Beulich <jbeulich@suse.com>2013-05-31 12:27:52 +0200
commit360d23bfb87588809719ecd3c319f8b514034a04 (patch)
treed627dd2cad471f166ae6500a6a3c7c132bbd2efb
parent682949335b90b5fcf3a600d7067453b459a04af2 (diff)
downloadxen-360d23bfb87588809719ecd3c319f8b514034a04.tar.gz
xen-360d23bfb87588809719ecd3c319f8b514034a04.tar.bz2
xen-360d23bfb87588809719ecd3c319f8b514034a04.zip
x86: fix boot time APIC mode detection
current_cpu_data becomes valid only relatively late in the boot process, so looking there for a particular feature early in the game would generally give the appearance of the feature being unavailable. Getting this wrong means that at kexec time the system would get returned to xAPIC mode, causing disconnect_bsp_APIC() to try to access the APIC page, which on systems with x2APIC pre-enabled will never get set up. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> master commit: 234c4dde2fd4f1182fe1a6bea6bced83fe363007 master date: 2013-05-23 13:08:32 +0200
-rw-r--r--xen/arch/x86/apic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
index 2845d23b01..903a9ce7a3 100644
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -1565,7 +1565,7 @@ enum apic_mode current_local_apic_mode(void)
/* Reading EXTD bit from the MSR is only valid if CPUID
* says so, else reserved */
- if ( cpu_has(&current_cpu_data, X86_FEATURE_X2APIC)
+ if ( boot_cpu_has(X86_FEATURE_X2APIC)
&& (msr_contents & MSR_IA32_APICBASE_EXTD) )
return APIC_MODE_X2APIC;