From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: kvm@vger.kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
linux-kernel@vger.kernel.org, "Andrew Jones" <drjones@redhat.com>,
"Cornelia Huck" <cohuck@redhat.com>,
"Jim Mattson" <jmattson@google.com>
Subject: Re: [PATCH] x86/kvm/nVMX: don't skip emulated instruction twice when vmptr address is not backed
Date: Wed, 9 Jan 2019 09:27:38 -0800 [thread overview]
Message-ID: <20190109172738.GC1821@linux.intel.com> (raw)
In-Reply-To: <20190109172256.16711-1-vkuznets@redhat.com>
On Wed, Jan 09, 2019 at 06:22:56PM +0100, Vitaly Kuznetsov wrote:
> Since commit 09abb5e3e5e50 ("KVM: nVMX: call kvm_skip_emulated_instruction
> in nested_vmx_{fail,succeed}") nested_vmx_failValid() results in
> kvm_skip_emulated_instruction() so doing it again in handle_vmptrld() when
> vmptr address is not backed is wrong, we end up advancing RIP twice.
>
> Fixes: fca91f6d60b6e ("kvm: nVMX: Set VM instruction error for VMPTRLD of unbacked page")
> Reported-by: Cornelia Huck <cohuck@redhat.com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
> arch/x86/kvm/vmx/nested.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index 3170e291215d..2616bd2c7f2c 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -4540,9 +4540,8 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu)
> * given physical address won't match the required
> * VMCS12_REVISION identifier.
> */
> - nested_vmx_failValid(vcpu,
> + return nested_vmx_failValid(vcpu,
> VMXERR_VMPTRLD_INCORRECT_VMCS_REVISION_ID);
> - return kvm_skip_emulated_instruction(vcpu);
> }
> new_vmcs12 = kmap(page);
> if (new_vmcs12->hdr.revision_id != VMCS12_REVISION ||
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-01-09 17:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 17:22 [PATCH] x86/kvm/nVMX: don't skip emulated instruction twice when vmptr address is not backed Vitaly Kuznetsov
2019-01-09 17:27 ` Sean Christopherson [this message]
2019-01-09 17:51 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190109172738.GC1821@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=cohuck@redhat.com \
--cc=drjones@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.