[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1199630379-28638-33-git-send-email-avi@qumranet.com>
Date: Sun, 6 Jan 2008 16:39:38 +0200
From: Avi Kivity <avi@...ranet.com>
To: linux-kernel@...r.kernel.org, kvm-devel@...ts.sourceforge.net
Cc: "Dong, Eddie" <eddie.dong@...el.com>
Subject: [PATCH 32/33] KVM: MMU: Merge shadow level check in FNAME(fetch)
From: Dong, Eddie <eddie.dong@...el.com>
Remove the redundant level check when fetching
shadow pte for present & non-present spte.
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@...el.com>
Signed-off-by: Avi Kivity <avi@...ranet.com>
---
arch/x86/kvm/paging_tmpl.h | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 3499205..03ba860 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -300,16 +300,13 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
bool new_page = 0;
shadow_ent = ((u64 *)__va(shadow_addr)) + index;
+ if (level == PT_PAGE_TABLE_LEVEL)
+ break;
if (is_shadow_present_pte(*shadow_ent)) {
- if (level == PT_PAGE_TABLE_LEVEL)
- break;
shadow_addr = *shadow_ent & PT64_BASE_ADDR_MASK;
continue;
}
- if (level == PT_PAGE_TABLE_LEVEL)
- break;
-
if (level - 1 == PT_PAGE_TABLE_LEVEL
&& walker->level == PT_DIRECTORY_LEVEL) {
metaphysical = 1;
--
1.5.3.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists