KVM/arm64 fixes for 6.16, take #1
Marc Zyngier
maintainerPaolo,
Here's the first batch of fixes for KVM/arm64. Nothing very exciting, except for yet another annoying race condition in the vgic init code spotted by everybody's favourite backtrace generator (syzkaller).
Details in the tag below.
Please pull,
M.
The following changes since commit 1b85d923ba8c9e6afaf19e26708411adde94fba8:
Merge branch kvm-arm64/misc-6.16 into kvmarm-master/next (2025-05-23 10:59:43 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-fixes-6.16-1
for you to fetch changes up to 4d62121ce9b58ea23c8d62207cbc604e98ecdc0a:
KVM: arm64: vgic-debug: Avoid dereferencing NULL ITE pointer (2025-05-30 10:24:49 +0100)
----------------------------------------------------------------
KVM/arm64 fixes for 6.16, take #1
- Make the irqbypass hooks resilient to changes in the GSI<->MSI routing, avoiding behind stale vLPI mappings being left behind. The fix is to resolve the VGIC IRQ using the host IRQ (which is stable) and nuking the vLPI mapping upon a routing change.
- Close another VGIC race where vCPU creation races with VGIC creation, leading to in-flight vCPUs entering the kernel w/o private IRQs allocated.
- Fix a build issue triggered by the recently added workaround for Ampere's AC04_CPU_23 erratum.
- Correctly sign-extend the VA when emulating a TLBI instruction potentially targeting a VNCR mapping.
- Avoid dereferencing a NULL pointer in the VGIC debug code, which can happen if the device doesn't have any mapping yet.
----------------------------------------------------------------
Marc Zyngier (3):
arm64: sysreg: Drag linux/kconfig.h to work around vdso build issue
KVM: arm64: Mask out non-VA bits from TLBI VA* on VNCR invalidation
KVM: arm64: vgic-debug: Avoid dereferencing NULL ITE pointer
Oliver Upton (5):
KVM: arm64: Use lock guard in vgic_v4_set_forwarding()
KVM: arm64: Protect vLPI translation with vgic_irq::irq_lock
KVM: arm64: Resolve vLPI by host IRQ in vgic_v4_unset_forwarding()
KVM: arm64: Unmap vLPIs affected by changes to GSI routing information
KVM: arm64: vgic-init: Plug vCPU vs. VGIC creation race
arch/arm64/include/asm/sysreg.h | 1 + arch/arm64/kvm/arm.c | 26 +++++++++++- arch/arm64/kvm/nested.c | 6 ++- arch/arm64/kvm/vgic/vgic-debug.c | 5 ++- arch/arm64/kvm/vgic/vgic-init.c | 27 +++++++++++- arch/arm64/kvm/vgic/vgic-its.c | 48 ++++++++++----------- arch/arm64/kvm/vgic/vgic-v4.c | 92 ++++++++++++++++++++++------------------ include/kvm/arm_vgic.h | 3 +- 8 files changed, 134 insertions(+), 74 deletions(-)
Paolo Bonzini
maintainerQuoted 6 lines · Marc Zyngier
Paolo,
Here's the first batch of fixes for KVM/arm64. Nothing very exciting, except for yet another annoying race condition in the vgic init code spotted by everybody's favourite backtrace generator (syzkaller).
That was fast. :) Pulled, thanks.
Paolo