Skip to content

KVM: x86/mmu: Drop async zapping of TDP MMU roots

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: x86/mmu: Open code walking TDP MMU roots for mmu_notifier's zap SPTEsarch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/tdp_mmu.c arch/x86/kvm/mmu/tdp_mmu.h+12 -71 reply
2/3KVM: x86/mmu: Take "shared" instead of "as_id" TDP MMU's yield-safe iteratorarch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/tdp_mmu.c arch/x86/kvm/mmu/tdp_mmu.h+13 -182 replies
3/3KVM: x86/mmu: Stop zapping invalidated TDP MMU roots asynchronouslyarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/mmu_internal.h +3 more+59 -931 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] KVM: x86/mmu: Drop async zapping of TDP MMU roots

Yank out the asynchronous zapping of TDP MMU roots. In some setups, using unbounded workqueues can consumes all CPUs for extended durations, and create significant jitter in the system.

Specifically, the behavior causes audio glitches in ChromeOS VMs with virtio-gpu when running games in the guest. Gory details in patch 3.

I tagged all of this for stable so that this gets back to v6.1 (I already did the backport to verify it's not awful). This bug is bad enough that the workaround for the ChromeOS usecase is to simply disable the TDP MMU, which I really do not want to do for the v6.1 kernel (or the v6.6. kernel).

Sean Christopherson (3):
KVM: x86/mmu: Open code walking TDP MMU roots for mmu_notifier's zap
SPTEs
KVM: x86/mmu: Take "shared" instead of "as_id" TDP MMU's yield-safe
iterator
KVM: x86/mmu: Stop zapping invalidated TDP MMU roots asynchronously

 arch/x86/include/asm/kvm_host.h |   3 +-
 arch/x86/kvm/mmu/mmu.c          |  21 ++---
 arch/x86/kvm/mmu/mmu_internal.h |  13 ++-
 arch/x86/kvm/mmu/tdp_mmu.c      | 147 ++++++++++++++------------------
 arch/x86/kvm/mmu/tdp_mmu.h      |   5 +-
 arch/x86/kvm/x86.c              |   5 +-
 6 files changed, 80 insertions(+), 114 deletions(-)

base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d

Signature · 1 line
2.42.0.459.ge4e396fd5e-goog