From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: [PATCH 6/8] KVM: MMU: optimize handing invlpg Date: Fri, 16 Dec 2011 18:17:39 +0800 Message-ID: <4EEB1AC3.3020709@linux.vnet.ibm.com> References: <4EEB19AF.5070501@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , LKML , KVM To: Xiao Guangrong Return-path: Received: from e28smtp03.in.ibm.com ([122.248.162.3]:60112 "EHLO e28smtp03.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751869Ab1LPKR4 (ORCPT ); Fri, 16 Dec 2011 05:17:56 -0500 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Dec 2011 15:47:53 +0530 In-Reply-To: <4EEB19AF.5070501@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Use unsync bit to see if the spte is point to unsync child Signed-off-by: Xiao Guangrong --- arch/x86/kvm/paging_tmpl.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index c79c503..5333256 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -706,7 +706,7 @@ static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva) FNAME(update_pte)(vcpu, sp, sptep, &gpte); } - if (!is_shadow_present_pte(*sptep) || !sp->unsync_children) + if (!mmu_spte_is_unsync_child(sptep)) break; } spin_unlock(&vcpu->kvm->mmu_lock); -- 1.7.7.4