]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: Protect vLPI translation with vgic_irq::irq_lock
authorOliver Upton <oliver.upton@linux.dev>
Fri, 23 May 2025 19:47:19 +0000 (12:47 -0700)
committerMarc Zyngier <maz@kernel.org>
Fri, 30 May 2025 08:11:29 +0000 (09:11 +0100)
commitfc4dafe87b93ec94204896c4bc8cad7e71bdd151
tree60fb41f033b3bcf65684a9b9b974294486cbd3f5
parent761aabe76e6b1eb8850e72141cb026c7057e46fd
KVM: arm64: Protect vLPI translation with vgic_irq::irq_lock

Though undocumented, KVM generally protects the translation of a vLPI
with the its_lock. While this makes perfectly good sense, as the ITS
itself contains the guest translation, an upcoming change will require
twiddling the vLPI mapping in an atomic context.

Switch to using the vIRQ's irq_lock to protect the translation. Use of
the its_lock in vgic_v4_unset_forwarding() is preserved for now as it
still needs to walk the ITS.

Tested-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250523194722.4066715-3-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/vgic/vgic-its.c
arch/arm64/kvm/vgic/vgic-v4.c