From patchwork Sun Apr 28 07:24:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 2497981 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4AA58DF2E5 for ; Sun, 28 Apr 2013 07:24:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751527Ab3D1HYr (ORCPT ); Sun, 28 Apr 2013 03:24:47 -0400 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 Received: from mchn199C.mchp.siemens.de ([95.157.56.37]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0MbQKW-1UDa8c1ROG-00J7xU; Sun, 28 Apr 2013 09:24:42 +0200 Message-ID: <517CCEB9.7030504@web.de> Date: Sun, 28 Apr 2013 09:24:41 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Gleb Natapov , Marcelo Tosatti CC: kvm , "Nakajima, Jun" , "Ren, Yongjie" Subject: [PATCH] KVM: nVMX: Skip PF interception check when queuing during nested run X-Enigmail-Version: 1.5.1 X-Provags-ID: V02:K0:tYJUSpNxeUvnF4Eqo1VapwZGQ33QL8edgG/PymJtt2q kWRthBsg7ybQI+mk+psYtvNoxKgqU8JmMoy2b8G6DVaAXhD633 l9asImttOvQBRJ4Q4hmcDYoUF/0MgfdssxxajEsrTAe7ELKyJW c2v5eRm2sSu1NWq0HfTzx+x2J6DLXX+8NNR/JrWihU7lV0dk4X A/tJHUGRwxEOGSvnc+xjw== Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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) {