diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-11-25 03:33:57 -0500 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-12-01 07:52:07 -0800 |
commit | 5f3c8c9187b6fa8675951f9fad5b99b11fed21f6 (patch) | |
tree | 32fde6540152481339e9bfcdd32da88071cc7b26 /arch/x86/kvm/mmu/mmu.c | |
parent | 45a61ebb221117748d3567a86908618f431ac824 (diff) | |
download | lwn-5f3c8c9187b6fa8675951f9fad5b99b11fed21f6.tar.gz lwn-5f3c8c9187b6fa8675951f9fad5b99b11fed21f6.zip |
KVM: x86/mmu: remove unnecessary "bool shared" argument from functions
Neither tdp_mmu_next_root nor kvm_tdp_mmu_put_root need to know
if the lock is taken for read or write. Either way, protection
is achieved via RCU and tdp_mmu_pages_lock. Remove the argument
and just assert that the lock is taken.
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20231125083400.1399197-2-pbonzini@redhat.com
Signed-off-by: Sean Christopherson <seanjc@google.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 29ac130fcb84..ace9f7c13132 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -3580,7 +3580,7 @@ static void mmu_free_root_page(struct kvm *kvm, hpa_t *root_hpa, return; if (is_tdp_mmu_page(sp)) - kvm_tdp_mmu_put_root(kvm, sp, false); + kvm_tdp_mmu_put_root(kvm, sp); else if (!--sp->root_count && sp->role.invalid) kvm_mmu_prepare_zap_page(kvm, sp, invalid_list); |