* [PATCH] KVM: VMX: do not check bit 12 of EPT violation exit qualification when undefined
@ 2013-09-25 7:58 Gleb Natapov
2013-09-25 9:49 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Gleb Natapov @ 2013-09-25 7:58 UTC (permalink / raw)
To: kvm; +Cc: pbonzini, mtosatti
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>
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index a1216de..0e06c1c4 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)
* There are errata that may cause this bit to not be set:
* AAK134, BY25.
*/
- if (exit_qualification & INTR_INFO_UNBLOCK_NMI)
+ if (!(to_vmx(vcpu)->idt_vectoring_info & VECTORING_INFO_VALID_MASK) &&
+ cpu_has_virtual_nmis() &&
+ exit_qualification & INTR_INFO_UNBLOCK_NMI)
vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, GUEST_INTR_STATE_NMI);
gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS);
--
Gleb.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: VMX: do not check bit 12 of EPT violation exit qualification when undefined
2013-09-25 7:58 [PATCH] KVM: VMX: do not check bit 12 of EPT violation exit qualification when undefined Gleb Natapov
@ 2013-09-25 9:49 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2013-09-25 9:49 UTC (permalink / raw)
To: Gleb Natapov; +Cc: kvm, mtosatti
Il 25/09/2013 09:58, Gleb Natapov ha scritto:
> 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>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index a1216de..0e06c1c4 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)
> * There are errata that may cause this bit to not be set:
> * AAK134, BY25.
> */
> - if (exit_qualification & INTR_INFO_UNBLOCK_NMI)
> + if (!(to_vmx(vcpu)->idt_vectoring_info & VECTORING_INFO_VALID_MASK) &&
> + cpu_has_virtual_nmis() &&
> + exit_qualification & INTR_INFO_UNBLOCK_NMI)
> vmcs_set_bits(GUEST_INTERRUPTIBILITY_INFO, GUEST_INTR_STATE_NMI);
>
> gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS);
> --
> Gleb.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Applied to kvm/master, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-25 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-25 7:58 [PATCH] KVM: VMX: do not check bit 12 of EPT violation exit qualification when undefined Gleb Natapov
2013-09-25 9:49 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).