KVM: MMU: set ad_disabled in TDP MMU role
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 17 Aug 2021 11:34:04 +0000 (07:34 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 1 Oct 2021 07:44:55 +0000 (03:44 -0400)
Prepare for removing the ad_disabled argument of make_spte; instead it can
be found in the role of a struct kvm_mmu_page.  First of all, the TDP MMU
must set the role accurately.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c

index 6de2c95..1cdb561 100644 (file)
@@ -167,6 +167,7 @@ static union kvm_mmu_page_role page_role_for_level(struct kvm_vcpu *vcpu,
        role.direct = true;
        role.gpte_is_8_bytes = true;
        role.access = ACC_ALL;
+       role.ad_disabled = !shadow_accessed_mask;
 
        return role;
 }