summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorTalons Lee <xin.li@citrix.com>2018-12-10 18:03:00 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-27 10:08:05 +0100
commitb226fe953da01c4f6267e65c178e315526cb244f (patch)
treea95c4c563973975a9a1b1ec9d2e73b86fc099a55 /arch/x86
parent88c556795a158bbdee44abb46ac195eef4d5e2f6 (diff)
always clear the X2APIC_ENABLE bit for PV guest
[ Upstream commit 5268c8f39e0efef81af2aaed160272d9eb507beb ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/x86')
-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 fd173e6425cc..481d7920ea24 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -900,10 +900,7 @@ static u64 xen_read_msr_safe(unsigned int msr, int *err)
val = native_read_msr_safe(msr, err);
switch (msr) {
case MSR_IA32_APICBASE:
-#ifdef CONFIG_X86_X2APIC
- if (!(cpuid_ecx(1) & (1 << (X86_FEATURE_X2APIC & 31))))
-#endif
- val &= ~X2APIC_ENABLE;
+ val &= ~X2APIC_ENABLE;
break;
}
return val;