]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86/mmu: Voluntarily reschedule as needed when zapping MMIO sptes
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 5 Feb 2019 21:01:24 +0000 (13:01 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Feb 2019 12:34:05 +0000 (13:34 +0100)
commit0e6ff42a317acbc6d291ea8e57fe7fd761560055
tree3303a23752ba96460b9d909e2f7ed42047d78db8
parent47d95eaf6eb2dcc0841a1369eb49839f388092a9
KVM: x86/mmu: Voluntarily reschedule as needed when zapping MMIO sptes

Call cond_resched_lock() when zapping MMIO to reschedule if needed or to
release and reacquire mmu_lock in case of contention.  There is no need
to flush or zap when temporarily dropping mmu_lock as zapping MMIO sptes
is done when holding the memslots lock and with the "update in-progress"
bit set in the memslots generation, which disables MMIO spte caching.
The walk does need to be restarted if mmu_lock is dropped as the active
pages list may be modified.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c