public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
	"Nakajima, Jun" <jun.nakajima@intel.com>,
	"Ren, Yongjie" <yongjie.ren@intel.com>
Subject: Re: [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run
Date: Sun, 28 Apr 2013 13:36:04 +0300	[thread overview]
Message-ID: <20130428103604.GJ30504@redhat.com> (raw)
In-Reply-To: <517CCEB9.7030504@web.de>

On Sun, Apr 28, 2013 at 09:24:41AM +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> While a nested run is pending, vmx_queue_exception is only called to
> requeue exceptions that were previously picked up via
> vmx_cancel_injection. Therefore, we must not check for PF interception
> by L1, possibly causing a bogus nested vmexit.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Applied thanks. We should get rid of nested_run_pending state, but
re-executing instruction if emulation cannot be complete.

> ---
> 
> This and the KVM_REQ_IMMEDIATE_EXIT fix allows me to boot an L2 Linux
> without problems. Yongjie, please check if it resolves your issue(s) as
> well.
> 
>  arch/x86/kvm/vmx.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index d663a59..45eb949 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -1917,7 +1917,7 @@ static void vmx_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,
>  	u32 intr_info = nr | INTR_INFO_VALID_MASK;
>  
>  	if (nr == PF_VECTOR && is_guest_mode(vcpu) &&
> -		nested_pf_handled(vcpu))
> +	    !vmx->nested.nested_run_pending && nested_pf_handled(vcpu))
>  		return;
>  
>  	if (has_error_code) {
> -- 
> 1.7.3.4

--
			Gleb.

  reply	other threads:[~2013-04-28 10:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-28  7:24 [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run Jan Kiszka
2013-04-28 10:36 ` Gleb Natapov [this message]
2013-04-28 14:30 ` Ren, Yongjie
2013-04-28 14:33   ` Gleb Natapov
2013-04-28 16:20     ` Ren, Yongjie
2013-04-28 16:26       ` Jan Kiszka
2013-04-28 16:40         ` [PATCH] KVM: x86: Account for failing enable_irq_window for NMI window request Jan Kiszka
2013-04-29 14:37           ` Paolo Bonzini
2013-04-29 14:46             ` [PATCH v2] " Jan Kiszka
2013-04-29 15:38               ` Paolo Bonzini
2013-05-03  1:17                 ` Marcelo Tosatti

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=20130428103604.GJ30504@redhat.com \
    --to=gleb@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=jun.nakajima@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=yongjie.ren@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox