KVM: MMU: Drop cr4.pge from shadow page role
authorAvi Kivity <avi@redhat.com>
Mon, 19 Apr 2010 14:25:53 +0000 (17:25 +0300)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:18:03 +0000 (12:18 +0300)
Since commit bf47a760f66ad, we no longer handle ptes with the global bit
set specially, so there is no reason to distinguish between shadow pages
created with cr4.gpe set and clear.

Such tracking is expensive when the guest toggles cr4.pge, so drop it.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmutrace.h
arch/x86/kvm/x86.c

index 3c31c5ad37abb638d37f0d04a6a7369792df9ab6..d47d087568fe0279249a5e28ca17c9f56b638bbf 100644 (file)
@@ -178,7 +178,6 @@ union kvm_mmu_page_role {
                unsigned direct:1;
                unsigned access:3;
                unsigned invalid:1;
-               unsigned cr4_pge:1;
                unsigned nxe:1;
        };
 };
index 3851f1f3030cd8be25a23d38218185605022c9a2..bc4f7f0be2b1d14c41c2c1fbdaa4e9185efc36ca 100644 (file)
@@ -28,7 +28,7 @@
                                                                        \
        role.word = __entry->role;                                      \
                                                                        \
-       trace_seq_printf(p, "sp gfn %llx %u%s q%u%s %s%s %spge"         \
+       trace_seq_printf(p, "sp gfn %llx %u%s q%u%s %s%s"               \
                         " %snxe root %u %s%c",                         \
                         __entry->gfn, role.level,                      \
                         role.cr4_pae ? " pae" : "",                    \
@@ -36,7 +36,6 @@
                         role.direct ? " direct" : "",                  \
                         access_str[role.access],                       \
                         role.invalid ? " invalid" : "",                \
-                        role.cr4_pge ? "" : "!",                       \
                         role.nxe ? "" : "!",                           \
                         __entry->root_count,                           \
                         __entry->unsync ? "unsync" : "sync", 0);       \
index 638248c969994bd968b9600df0120ed82b569537..cf37ac6644e0bfabb747659fa89551943b13ba60 100644 (file)
@@ -488,7 +488,6 @@ void kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
        }
        kvm_x86_ops->set_cr4(vcpu, cr4);
        vcpu->arch.cr4 = cr4;
-       vcpu->arch.mmu.base_role.cr4_pge = (cr4 & X86_CR4_PGE) && !tdp_enabled;
        kvm_mmu_reset_context(vcpu);
 }
 EXPORT_SYMBOL_GPL(kvm_set_cr4);