aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTalons Lee <xin.li@citrix.com>2018-12-10 05:03:00 -0500
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2019-01-14 09:00:32 -0500
commit5268c8f39e0efef81af2aaed160272d9eb507beb (patch)
treee9c2a8520fb79f0dc6f233c6e4e93fae91d5d201
parent9f51c05dc41a6d69423e3d03d18eb7ab22f9ec19 (diff)
always clear the X2APIC_ENABLE bit for PV guest
Commit e657fcc clears cpu capability bit instead of using fake cpuid value, the EXTD should always be off for PV guest without depending on cpuid value. So remove the cpuid check in xen_read_msr_safe() to always clear the X2APIC_ENABLE bit. Signed-off-by: Talons Lee <xin.li@citrix.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-rw-r--r--arch/x86/xen/enlighten_pv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index 2f6787fc7106..c54a493e139a 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -898,10 +898,7 @@ static u64 xen_read_msr_safe(unsigned int msr, int *err)
898 val = native_read_msr_safe(msr, err); 898 val = native_read_msr_safe(msr, err);
899 switch (msr) { 899 switch (msr) {
900 case MSR_IA32_APICBASE: 900 case MSR_IA32_APICBASE:
901#ifdef CONFIG_X86_X2APIC 901 val &= ~X2APIC_ENABLE;
902 if (!(cpuid_ecx(1) & (1 << (X86_FEATURE_X2APIC & 31))))
903#endif
904 val &= ~X2APIC_ENABLE;
905 break; 902 break;
906 } 903 }
907 return val; 904 return val;