From patchwork Thu Nov 4 10:32:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 301742 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA4ASMRx020214 for ; Thu, 4 Nov 2010 10:28:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755327Ab0KDK2S (ORCPT ); Thu, 4 Nov 2010 06:28:18 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:60562 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752461Ab0KDK2S (ORCPT ); Thu, 4 Nov 2010 06:28:18 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 812C91705C7; Thu, 4 Nov 2010 18:29:14 +0800 (CST) Received: from mailserver.fnst.cn.fujitus.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id oA4AO1KO017028; Thu, 4 Nov 2010 18:24:01 +0800 Received: from [10.167.225.99] ([10.167.225.99]) by mailserver.fnst.cn.fujitus.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2010110418284915-148 ; Thu, 4 Nov 2010 18:28:49 +0800 Message-ID: <4CD28BCA.1060907@cn.fujitsu.com> Date: Thu, 04 Nov 2010 18:32:42 +0800 From: Xiao Guangrong User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 MIME-Version: 1.0 To: Avi Kivity CC: Marcelo Tosatti , Gleb Natapov , LKML , KVM Subject: [PATCH 2/3] KVM: MMU: don not retry #PF for nonpaging guest References: <4CD28B5F.1040205@cn.fujitsu.com> In-Reply-To: <4CD28B5F.1040205@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2010-11-04 18:28:49, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2010-11-04 18:28:49, Serialize complete at 2010-11-04 18:28:49 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 04 Nov 2010 10:28:22 +0000 (UTC) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 2044302..aacc5eb 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6174,7 +6174,7 @@ void kvm_arch_async_page_ready(struct kvm_vcpu *vcpu, struct kvm_async_pf *work) { int r; - if (!vcpu->arch.mmu.direct_map || is_error_page(work->page)) + if (!tdp_enabled || is_error_page(work->page)) return; r = kvm_mmu_reload(vcpu);