aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-06-11 11:07:41 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:32:55 -0400
commit4d88954d6246d7d43bb8903981731002179f1a1c (patch)
tree6629e1a9cd6968d9048e078775aeedff43ac133e /arch
parente799794e02a368f79c3fae26aabaaadd0b7466ce (diff)
KVM: MMU: make for_each_shadow_entry aware of largepages
This way there is no need to add explicit checks in every for_each_shadow_entry user. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/mmu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 780ce3fe7911..e18f65bf2de7 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1302,6 +1302,11 @@ static bool shadow_walk_okay(struct kvm_shadow_walk_iterator *iterator)
1302{ 1302{
1303 if (iterator->level < PT_PAGE_TABLE_LEVEL) 1303 if (iterator->level < PT_PAGE_TABLE_LEVEL)
1304 return false; 1304 return false;
1305
1306 if (iterator->level == PT_PAGE_TABLE_LEVEL)
1307 if (is_large_pte(*iterator->sptep))
1308 return false;
1309
1305 iterator->index = SHADOW_PT_INDEX(iterator->addr, iterator->level); 1310 iterator->index = SHADOW_PT_INDEX(iterator->addr, iterator->level);
1306 iterator->sptep = ((u64 *)__va(iterator->shadow_addr)) + iterator->index; 1311 iterator->sptep = ((u64 *)__va(iterator->shadow_addr)) + iterator->index;
1307 return true; 1312 return true;