From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run Date: Sun, 28 Apr 2013 09:24:41 +0200 Message-ID: <517CCEB9.7030504@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm , "Nakajima, Jun" , "Ren, Yongjie" To: Gleb Natapov , Marcelo Tosatti Return-path: Received: from mout.web.de ([212.227.15.3]:50581 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751384Ab3D1HYq (ORCPT ); Sun, 28 Apr 2013 03:24:46 -0400 Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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