Commit 814a59d2 authored by Gui Jianfeng's avatar Gui Jianfeng Committed by Avi Kivity

KVM: MMU: Make use of is_large_pte() in walker

Make use of is_large_pte() instead of checking PT_PAGE_SIZE_MASK
bit directly.
Signed-off-by: default avatarGui Jianfeng <guijianfeng@cn.fujitsu.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 51fb60d8
...@@ -190,10 +190,10 @@ static int FNAME(walk_addr)(struct guest_walker *walker, ...@@ -190,10 +190,10 @@ static int FNAME(walk_addr)(struct guest_walker *walker,
if ((walker->level == PT_PAGE_TABLE_LEVEL) || if ((walker->level == PT_PAGE_TABLE_LEVEL) ||
((walker->level == PT_DIRECTORY_LEVEL) && ((walker->level == PT_DIRECTORY_LEVEL) &&
(pte & PT_PAGE_SIZE_MASK) && is_large_pte(pte) &&
(PTTYPE == 64 || is_pse(vcpu))) || (PTTYPE == 64 || is_pse(vcpu))) ||
((walker->level == PT_PDPE_LEVEL) && ((walker->level == PT_PDPE_LEVEL) &&
(pte & PT_PAGE_SIZE_MASK) && is_large_pte(pte) &&
is_long_mode(vcpu))) { is_long_mode(vcpu))) {
int lvl = walker->level; int lvl = walker->level;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment