aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/paging_tmpl.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 349920556be3..03ba8608fe0f 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,
300 bool new_page = 0; 300 bool new_page = 0;
301 301
302 shadow_ent = ((u64 *)__va(shadow_addr)) + index; 302 shadow_ent = ((u64 *)__va(shadow_addr)) + index;
303 if (level == PT_PAGE_TABLE_LEVEL)
304 break;
303 if (is_shadow_present_pte(*shadow_ent)) { 305 if (is_shadow_present_pte(*shadow_ent)) {
304 if (level == PT_PAGE_TABLE_LEVEL)
305 break;
306 shadow_addr = *shadow_ent & PT64_BASE_ADDR_MASK; 306 shadow_addr = *shadow_ent & PT64_BASE_ADDR_MASK;
307 continue; 307 continue;
308 } 308 }
309 309
310 if (level == PT_PAGE_TABLE_LEVEL)
311 break;
312
313 if (level - 1 == PT_PAGE_TABLE_LEVEL 310 if (level - 1 == PT_PAGE_TABLE_LEVEL
314 && walker->level == PT_DIRECTORY_LEVEL) { 311 && walker->level == PT_DIRECTORY_LEVEL) {
315 metaphysical = 1; 312 metaphysical = 1;