Home Home > GIT Browse > SLE12-SP3-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2019-02-21 14:45:31 +0100
committerJoerg Roedel <jroedel@suse.de>2019-02-21 14:59:01 +0100
commitc1f8455681d236aa8e30b96868cc571801facc24 (patch)
tree4beb51445295cacb917f087e8f0171c6ffd9e9bc
parent8513d6678f833471a9df7710af9df63dc100eac6 (diff)
KVM: VMX: Fix x2apic check in vmx_msr_bitmap_mode() (bsc#1124166).
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index b61d3ebb9951..6ce76429ce0c 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4800,7 +4800,9 @@ static u8 vmx_msr_bitmap_mode(struct kvm_vcpu *vcpu)
{
u8 mode = 0;
- if (irqchip_in_kernel(vcpu->kvm) && apic_x2apic_mode(vcpu->arch.apic)) {
+ if (cpu_has_secondary_exec_ctrls() &&
+ (vmcs_read32(SECONDARY_VM_EXEC_CONTROL) &
+ SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE)) {
mode |= MSR_BITMAP_MODE_X2APIC;
if (enable_apicv)
mode |= MSR_BITMAP_MODE_X2APIC_APICV;