* merge shadow level check in FNAME(fetch)
@ 2008-01-02 6:29 Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A02976A44-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Dong, Eddie @ 2008-01-02 6:29 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
clean the redundant level check when fetching
shadow pte for present & non-present spte.
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 56b88f7..735d532 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -292,16 +292,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;
[-- Attachment #2: tlb-clean4.patch --]
[-- Type: application/octet-stream, Size: 851 bytes --]
clean the redundant level check when fetching
shadow pte for present & non-present spte.
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 56b88f7..735d532 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -292,16 +292,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;
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-02 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-02 6:29 merge shadow level check in FNAME(fetch) Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A02976A44-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-01-02 9:32 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox