mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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>
This commit is contained in:
parent
e799794e02
commit
4d88954d62
1 changed files with 5 additions and 0 deletions
|
@ -1302,6 +1302,11 @@ static bool shadow_walk_okay(struct kvm_shadow_walk_iterator *iterator)
|
||||||
{
|
{
|
||||||
if (iterator->level < PT_PAGE_TABLE_LEVEL)
|
if (iterator->level < PT_PAGE_TABLE_LEVEL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (iterator->level == PT_PAGE_TABLE_LEVEL)
|
||||||
|
if (is_large_pte(*iterator->sptep))
|
||||||
|
return false;
|
||||||
|
|
||||||
iterator->index = SHADOW_PT_INDEX(iterator->addr, iterator->level);
|
iterator->index = SHADOW_PT_INDEX(iterator->addr, iterator->level);
|
||||||
iterator->sptep = ((u64 *)__va(iterator->shadow_addr)) + iterator->index;
|
iterator->sptep = ((u64 *)__va(iterator->shadow_addr)) + iterator->index;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue