KVM: MMU: Make use of is_large_pte() in walker
authorGui Jianfeng <guijianfeng@cn.fujitsu.com>
Fri, 16 Apr 2010 09:18:01 +0000 (17:18 +0800)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:18:07 +0000 (12:18 +0300)
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>
arch/x86/kvm/paging_tmpl.h

index 5910557b3f33dde25fc393a4279edaca62f5b53b..d0cc07eb6eda18f98abc04cb420bb067361dc8c8 100644 (file)
@@ -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;