aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/surface/aggregator/ssh_parser.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2024-08-09 19:43:25 +0000
committerSean Christopherson <[email protected]>2024-09-10 03:22:04 +0000
commit548f87f667a38ffeb2f021d9cfbc1f1b34fb4cb5 (patch)
treee4776eeced952920bea8ecdfea3f62310191a9b4 /drivers/platform/surface/aggregator/ssh_parser.c
parentKVM: x86/mmu: Add a helper to walk and zap rmaps for a memslot (diff)
downloadkernel-548f87f667a38ffeb2f021d9cfbc1f1b34fb4cb5.tar.gz
kernel-548f87f667a38ffeb2f021d9cfbc1f1b34fb4cb5.zip
KVM: x86/mmu: Honor NEED_RESCHED when zapping rmaps and blocking is allowed
Convert kvm_unmap_gfn_range(), which is the helper that zaps rmap SPTEs in response to an mmu_notifier invalidation, to use __kvm_rmap_zap_gfn_range() and feed in range->may_block. In other words, honor NEED_RESCHED by way of cond_resched() when zapping rmaps. This fixes a long-standing issue where KVM could process an absurd number of rmap entries without ever yielding, e.g. if an mmu_notifier fired on a PUD (or larger) range. Opportunistically rename __kvm_zap_rmap() to kvm_zap_rmap(), and drop the old kvm_zap_rmap(). Ideally, the shuffling would be done in a different patch, but that just makes the compiler unhappy, e.g. arch/x86/kvm/mmu/mmu.c:1462:13: error: ‘kvm_zap_rmap’ defined but not used Reported-by: Peter Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_parser.c')
0 files changed, 0 insertions, 0 deletions