]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: vgic: Split out mapping IRQs and setting irq_ops
authorSascha Bischoff <Sascha.Bischoff@arm.com>
Thu, 19 Mar 2026 15:51:01 +0000 (15:51 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 19 Mar 2026 18:21:27 +0000 (18:21 +0000)
commit663594aafb438f8c4e51d4bf2dbf48b9f68aedb7
tree3af16fcd4b20cbe6bb11be21983bd6681711a846
parentcbd8c958be54abdf2c0f9b9c3eac971428b9d4b1
KVM: arm64: vgic: Split out mapping IRQs and setting irq_ops

Prior to this change, the act of mapping a virtual IRQ to a physical
one also set the irq_ops. Unmapping then reset the irq_ops to NULL. So
far, this has been fine and hasn't caused any major issues.

Now, however, as GICv5 support is being added to KVM, it has become
apparent that conflating mapping/unmapping IRQs and setting/clearing
irq_ops can cause issues. The reason is that the upcoming GICv5
support introduces a set of default irq_ops for PPIs, and removing
this when unmapping will cause things to break rather horribly.

Split out the mapping/unmapping of IRQs from the setting/clearing of
irq_ops. The arch timer code is updated to set the irq_ops following a
successful map. The irq_ops are intentionally not removed again on an
unmap as the only irq_op introduced by the arch timer only takes
effect if the hw bit in struct vgic_irq is set. Therefore, it is safe
to leave this in place, and it avoids additional complexity when GICv5
support is introduced.

Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com>
Link: https://patch.msgid.link/20260319154937.3619520-6-sascha.bischoff@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/arch_timer.c
arch/arm64/kvm/vgic/vgic.c
include/kvm/arm_vgic.h