kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: KarimAllah Ahmed <karahmed@amazon.de>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: "Jim Mattson" <jmattson@google.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H . Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org
Subject: Re: [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE
Date: Wed, 18 Jul 2018 19:33:01 +0200	[thread overview]
Message-ID: <e0bf0d2e-6aaf-6ce8-f4f7-832011d0cf3f@redhat.com> (raw)
In-Reply-To: <1531214840-24686-2-git-send-email-karahmed@amazon.de>

On 10/07/2018 11:27, KarimAllah Ahmed wrote:
> @@ -11772,7 +11772,6 @@ static int enter_vmx_non_root_mode(struct kvm_vcpu *vcpu)
>  	if (prepare_vmcs02(vcpu, vmcs12, &exit_qual))
>  		goto fail;
>  
> -	nested_get_vmcs12_pages(vcpu, vmcs12);
>  
>  	r = EXIT_REASON_MSR_LOAD_FAIL;
>  	msr_entry_idx = nested_vmx_load_msr(vcpu,

I think this is not enough, the MSR load should not be redone on
KVM_SET_NESTED_STATE.  This issue is preexisting and happens for SMM
exit as well.  SMM exit in fact also needs to defer
nested_get_vmcs12_pages, or the pages could be read from SMRAM.

I'll send a v6 patch and a testcase, and in the meanwhile I have applied
patch 1.

Paolo

  reply	other threads:[~2018-07-18 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10  9:27 [PATCH v5 1/2] KVM: Switch 'requests' to be 64-bit (explicitly) KarimAllah Ahmed
2018-07-10  9:27 ` [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE KarimAllah Ahmed
2018-07-18 17:33   ` Paolo Bonzini [this message]
2018-07-18 17:55   ` Radim Krčmář
2018-07-18 18:03     ` Jim Mattson
2018-07-18 21:10       ` Paolo Bonzini
2018-07-18 15:34 ` [PATCH v5 1/2] KVM: Switch 'requests' to be 64-bit (explicitly) Radim Krčmář

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=e0bf0d2e-6aaf-6ce8-f4f7-832011d0cf3f@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=karahmed@amazon.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 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).