From: Gleb Natapov Subject: [PATCH 5/6] KVM: MMU: drop superfluous is_present_gpte() check. Date: Wed, 30 Jan 2013 16:45:04 +0200 Message-ID: <1359557105-30821-6-git-send-email-gleb@redhat.com> References: <1359557105-30821-1-git-send-email-gleb@redhat.com> Cc: mtosatti@redhat.com, xiaoguangrong@linux.vnet.ibm.com, yoshikawa_takuya_b1@lab.ntt.co.jp To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:7719 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752478Ab3A3OpW (ORCPT ); Wed, 30 Jan 2013 09:45:22 -0500 In-Reply-To: <1359557105-30821-1-git-send-email-gleb@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Gust page walker puts only present ptes into ptes[] array. No need to check it again. Signed-off-by: Gleb Natapov --- arch/x86/kvm/paging_tmpl.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index ca69dcc..34c5c99 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -409,9 +409,6 @@ static int FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, unsigned direct_access, access = gw->pt_access; int top_level, emulate = 0; - if (!is_present_gpte(gw->ptes[gw->level - 1])) - return 0; - direct_access = gw->pte_access; top_level = vcpu->arch.mmu.root_level; -- 1.7.10.4