Public bug reported:
[Impact]
With kvm-arm.mode=nested on a 64K-page host, an L1 guest started with
virtualization=on hits repeated soft lockups and RCU stalls under ordinary
load such as a package install.
When 2 MB mTHP is enabled (hugepages-2048kB/enabled=madvise), khugepaged
keeps collapsing QEMU guest RAM. Each collapse fires an MMU notifier, and
kvm_nested_s2_unmap() unmaps and TLB-flushes the full IPA range of every
shadow stage-2 while khugepaged holds mmap_lock for write. vCPU faults
queue behind it.
[Fix]
Cherry-pick the shadow stage-2 reverse-map series from v7.4-rc1, which
unmaps only the affected shadow ranges, plus a comment-only follow-up:
3b8ce2b5132a KVM: arm64: Use a variable for the canonical IPA in
kvm_s2_fault_map()
a6ca6cba5959 KVM: arm64: nv: Introduce guest stage-2 tracking structures
c2778d14cd2f KVM: arm64: nv: Track guest stage-2 mapping creation
5491980c1a41 KVM: arm64: nv: Track guest stage-2 mapping removal
e6084aecaeef KVM: arm64: nv: Avoid full shadow stage-2 unmap
2064f15b0848 KVM: arm64: nv: Drop kvm_s2_mmu pointer from
kvm_guest_s2_mapping
862fa568078c KVM: arm64: Refactor kvm_unmap_gfn_range() with common
variables
4bc0c9cd8476 KVM: arm64: Remove stale remark on canonical IPA alignment
https://lore.kernel.org/all/[email protected]/
[Test Plan]
On a 64K host with kvm-arm.mode=nested and hugepages-2048kB/enabled=madvise,
boot an Ubuntu L1 (-machine virt,virtualization=on -cpu host -smp 8 -m 16G)
that installs packages via cloud-init, and watch its console for 15 min.
Bad: soft lockups / RCU stalls; cloud-init doesn't finish.
Good: none; cloud-init finishes in ~3 min.
[Where problems could occur]
The tracking code only runs for nested-virt VMs. A missed mapping could
leave a stale shadow stage-2 entry visible to an L2 guest. Shadow
stage-2 faults gain a small allocation that can fail with -ENOMEM.
** Affects: linux-nvidia-7.3 (Ubuntu)
Importance: Undecided
Status: New
** Package changed: linux-nvidia (Ubuntu) => linux-nvidia-7.3 (Ubuntu)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2179407
Title:
[linux-nvidia-7.3]: KVM arm64 nested-virt guests hit soft lockups on
64K hosts
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-7.3/+bug/2179407/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs