From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: VMX: do not check bit 12 of EPT violation exit qualification when undefined Date: Wed, 25 Sep 2013 11:49:20 +0200 Message-ID: <5242B1A0.5050904@redhat.com> References: <20130925075822.GL17294@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mtosatti@redhat.com To: Gleb Natapov Return-path: Received: from mail-ea0-f179.google.com ([209.85.215.179]:58469 "EHLO mail-ea0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753371Ab3IYJtG (ORCPT ); Wed, 25 Sep 2013 05:49:06 -0400 Received: by mail-ea0-f179.google.com with SMTP id b10so3026252eae.38 for ; Wed, 25 Sep 2013 02:49:04 -0700 (PDT) In-Reply-To: <20130925075822.GL17294@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 > 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