diff options
author | Gleb Natapov <gleb@redhat.com> | 2013-09-25 03:58:22 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-09-25 05:38:26 -0400 |
commit | bcd1c2949501869631b25fd62d8df5079677a101 (patch) | |
tree | e046939cadad578c7334206f534e15654e80226f /arch | |
parent | ac570e0493815e0b41681c89cb50d66421429d27 (diff) |
KVM: VMX: do not check bit 12 of EPT violation exit qualification when undefined
Bit 12 is undefined in any of the following cases:
- If the "NMI exiting" VM-execution control is 1 and the "virtual NMIs"
VM-execution control is 0.
- If the VM exit sets the valid bit in the IDT-vectoring information field
Signed-off-by: Gleb Natapov <gleb@redhat.com>
[Add parentheses around & within && - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a1216de9ffda..3b8e7459dd4d 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -5345,7 +5345,9 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu) | |||
5345 | * There are errata that may cause this bit to not be set: | 5345 | * There are errata that may cause this bit to not be set: |
5346 | * AAK134, BY25. | 5346 | * AAK134, BY25. |
5347 | */ | 5347 | */ |
5348 | if (exit_qualification & INTR_INFO_UNBLOCK_NMI) | 5348 | if (!(to_vmx(vcpu)->idt_vectoring_info & VECTORING_INFO_VALID_MASK) && |
5349 | cpu_has_virtual_nmis() && | ||
5350 | (exit_qualification & INTR_INFO_UNBLOCK_NMI)) | ||
5349 | vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, GUEST_INTR_STATE_NMI); | 5351 | vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, GUEST_INTR_STATE_NMI); |
5350 | 5352 | ||
5351 | gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); | 5353 | gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); |