diff options
author | Sean Christopherson <[email protected]> | 2023-10-27 11:21:52 -0700 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2023-11-13 05:31:37 -0500 |
commit | cec29eef0a815386d520d61c2cbe16d537931639 (patch) | |
tree | 1821e7d4a62f39e239e776021372c8461542d909 /tools/perf/scripts/python/check-perf-trace.py | |
parent | 16f95f3b95caded251a0440051e44a2fbe9e5f55 (diff) |
KVM: Add a dedicated mmu_notifier flag for reclaiming freed memory
Handle AMD SEV's kvm_arch_guest_memory_reclaimed() hook by having
__kvm_handle_hva_range() return whether or not an overlapping memslot
was found, i.e. mmu_lock was acquired. Using the .on_unlock() hook
works, but kvm_arch_guest_memory_reclaimed() needs to run after dropping
mmu_lock, which makes .on_lock() and .on_unlock() asymmetrical.
Use a small struct to return the tuple of the notifier-specific return,
plus whether or not overlap was found. Because the iteration helpers are
__always_inlined, practically speaking, the struct will never actually be
returned from a function call (not to mention the size of the struct will
be two bytes in practice).
Signed-off-by: Sean Christopherson <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Fuad Tabba <[email protected]>
Tested-by: Fuad Tabba <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions