From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run Date: Sun, 28 Apr 2013 13:36:04 +0300 Message-ID: <20130428103604.GJ30504@redhat.com> References: <517CCEB9.7030504@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Marcelo Tosatti , kvm , "Nakajima, Jun" , "Ren, Yongjie" To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44857 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755413Ab3D1KgJ (ORCPT ); Sun, 28 Apr 2013 06:36:09 -0400 Content-Disposition: inline In-Reply-To: <517CCEB9.7030504@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Apr 28, 2013 at 09:24:41AM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > 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 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.