diff options
author | Sean Christopherson <seanjc@google.com> | 2022-10-12 18:17:00 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-12-29 15:33:25 -0500 |
commit | de0322f575be9e7fb598d14d58f5a7c7d8394e2b (patch) | |
tree | 330bdd321c6a798b55fa1d32e849aed88d07b755 /arch/x86/kvm/mmu/mmu.c | |
parent | 6c882ef4fc7bd99b67ad152e75428b669281c521 (diff) | |
download | lwn-de0322f575be9e7fb598d14d58f5a7c7d8394e2b.tar.gz lwn-de0322f575be9e7fb598d14d58f5a7c7d8394e2b.zip |
KVM: x86/mmu: Replace open coded usage of tdp_mmu_page with is_tdp_mmu_page()
Use is_tdp_mmu_page() instead of querying sp->tdp_mmu_page directly so
that all users benefit if KVM ever finds a way to optimize the logic.
No functional change intended.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221012181702.3663607-10-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 7fb7a07a389e..27b233eff6e5 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -1928,7 +1928,7 @@ static bool is_obsolete_sp(struct kvm *kvm, struct kvm_mmu_page *sp) return true; /* TDP MMU pages do not use the MMU generation. */ - return !sp->tdp_mmu_page && + return !is_tdp_mmu_page(sp) && unlikely(sp->mmu_valid_gen != kvm->arch.mmu_valid_gen); } |