From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gui Jianfeng Subject: [PATCH 2/4] KVM: Make use of is_large_pte() instead Date: Fri, 16 Apr 2010 17:18:01 +0800 Message-ID: <4BC82B49.5090902@cn.fujitsu.com> References: <4BC82AF8.8080308@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:51939 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753544Ab0DPJTI (ORCPT ); Fri, 16 Apr 2010 05:19:08 -0400 In-Reply-To: <4BC82AF8.8080308@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: Make use of is_large_pte() instead of checking PT_PAGE_SIZE_MASK bit directly. Signed-off-by: Gui Jianfeng --- arch/x86/kvm/paging_tmpl.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 5910557..d0cc07e 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -190,10 +190,10 @@ walk: if ((walker->level == PT_PAGE_TABLE_LEVEL) || ((walker->level == PT_DIRECTORY_LEVEL) && - (pte & PT_PAGE_SIZE_MASK) && + is_large_pte(pte) && (PTTYPE == 64 || is_pse(vcpu))) || ((walker->level == PT_PDPE_LEVEL) && - (pte & PT_PAGE_SIZE_MASK) && + is_large_pte(pte) && is_long_mode(vcpu))) { int lvl = walker->level; -- 1.6.5.2