diff options
author | Sean Christopherson <seanjc@google.com> | 2024-01-11 05:00:43 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-02-23 03:28:45 +0300 |
commit | 6577f1efdff443277b19c0fbe4b933404e7c84e6 (patch) | |
tree | de2fa5836dc418600fa9e8b406c46e8bbd20d2bc /arch/x86/realmode/Makefile | |
parent | fcdffe97f80e6fb488f6b5c6bd38f6cd899944ab (diff) | |
download | linux-6577f1efdff443277b19c0fbe4b933404e7c84e6.tar.xz |
KVM: x86/mmu: Allow passing '-1' for "all" as_id for TDP MMU iterators
Modify for_each_tdp_mmu_root() and __for_each_tdp_mmu_root_yield_safe() to
accept -1 for _as_id to mean "process all memslot address spaces". That
way code that wants to process both SMM and !SMM doesn't need to iterate
over roots twice (and likely copy+paste code in the process).
Deliberately don't cast _as_id to an "int", just in case not casting helps
the compiler elide the "_as_id >=0" check when being passed an unsigned
value, e.g. from a memslot.
No functional change intended.
Link: https://lore.kernel.org/r/20240111020048.844847-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/realmode/Makefile')
0 files changed, 0 insertions, 0 deletions