kvm: mmu: ITLB_MULTIHIT mitigation
[linux-2.6-block.git] / arch / x86 / include / asm / kvm_host.h
index 23edf56cf577c97bfd3719933b8f56e5be7e0f8c..a37b03483b66cfef8c40f0044e0c7d426a96862f 100644 (file)
@@ -219,13 +219,6 @@ enum {
                                 PFERR_WRITE_MASK |             \
                                 PFERR_PRESENT_MASK)
 
-/*
- * The mask used to denote special SPTEs, which can be either MMIO SPTEs or
- * Access Tracking SPTEs. We use bit 62 instead of bit 63 to avoid conflicting
- * with the SVE bit in EPT PTEs.
- */
-#define SPTE_SPECIAL_MASK (1ULL << 62)
-
 /* apic attention bits */
 #define KVM_APIC_CHECK_VAPIC   0
 /*
@@ -322,6 +315,7 @@ struct kvm_mmu_page {
        bool unsync;
        u8 mmu_valid_gen;
        bool mmio_cached;
+       bool lpage_disallowed; /* Can't be replaced by an equiv large page */
 
        /*
         * The following two entries are used to key the shadow page in the
@@ -953,6 +947,7 @@ struct kvm_vm_stat {
        ulong mmu_unsync;
        ulong remote_tlb_flush;
        ulong lpages;
+       ulong nx_lpage_splits;
        ulong max_mmu_page_hash_collisions;
 };
 
@@ -1196,7 +1191,7 @@ struct kvm_x86_ops {
        int (*set_nested_state)(struct kvm_vcpu *vcpu,
                                struct kvm_nested_state __user *user_kvm_nested_state,
                                struct kvm_nested_state *kvm_state);
-       void (*get_vmcs12_pages)(struct kvm_vcpu *vcpu);
+       bool (*get_vmcs12_pages)(struct kvm_vcpu *vcpu);
 
        int (*smi_allowed)(struct kvm_vcpu *vcpu);
        int (*pre_enter_smm)(struct kvm_vcpu *vcpu, char *smstate);