]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86/mmu: remove unnecessary "bool shared" argument from iterators
authorPaolo Bonzini <pbonzini@redhat.com>
Sat, 25 Nov 2023 08:33:58 +0000 (03:33 -0500)
committerSean Christopherson <seanjc@google.com>
Fri, 1 Dec 2023 15:52:08 +0000 (07:52 -0800)
commit484dd27c0602e01cb49db362ad42b95e70912d43
treead31e8a1716adac82a5a65c1c1357e35ff39cf21
parent5f3c8c9187b6fa8675951f9fad5b99b11fed21f6
KVM: x86/mmu: remove unnecessary "bool shared" argument from iterators

The "bool shared" argument is more or less unnecessary in the
for_each_*_tdp_mmu_root_yield_safe() macros.  Many users check for
the lock before calling it; all of them either call small functions
that do the check, or end up calling tdp_mmu_set_spte_atomic() and
tdp_mmu_iter_set_spte().  Add a few assertions to make up for the
lost check in for_each_*_tdp_mmu_root_yield_safe(), but even this
is probably overkill and mostly for documentation reasons.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20231125083400.1399197-3-pbonzini@redhat.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/tdp_mmu.c