summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGui Jianfeng2010-04-16 11:18:01 +0200
committerAvi Kivity2010-05-17 11:18:07 +0200
commit814a59d2077d630cffca7e2878c5b6f9b91ba725 (patch)
tree95de3baeaeb1f1e4cf78b87065bfd9f1d14a575c /arch
parentKVM: MMU: Move sync_page() first pte address calculation out of loop (diff)
downloadkernel-qcow2-linux-814a59d2077d630cffca7e2878c5b6f9b91ba725.tar.gz
kernel-qcow2-linux-814a59d2077d630cffca7e2878c5b6f9b91ba725.tar.xz
kernel-qcow2-linux-814a59d2077d630cffca7e2878c5b6f9b91ba725.zip
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: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/paging_tmpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 5910557b3f33..d0cc07eb6eda 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -190,10 +190,10 @@ walk:
if ((walker->level == PT_PAGE_TABLE_LEVEL) ||
((walker->level == PT_DIRECTORY_LEVEL) &&
- (pte & PT_PAGE_SIZE_MASK) &&
+ is_large_pte(pte) &&
(PTTYPE == 64 || is_pse(vcpu))) ||
((walker->level == PT_PDPE_LEVEL) &&
- (pte & PT_PAGE_SIZE_MASK) &&
+ is_large_pte(pte) &&
is_long_mode(vcpu))) {
int lvl = walker->level;