Centos-kernel-stream-9/include/kvm
Gavin Shan 5c929e49d3 KVM: arm64: Resolve vLPI by host IRQ in vgic_v4_unset_forwarding()
JIRA: https://issues.redhat.com/browse/RHEL-93666

The virtual mapping and "GSI" routing of a particular vLPI is subject to
change in response to the guest / userspace. This can be pretty annoying
to deal with when KVM needs to track the physical state that's managed
for vLPI direct injection.

Make vgic_v4_unset_forwarding() resilient by using the host IRQ to
resolve the vgic IRQ. Since this uses the LPI xarray directly, finding
the ITS by doorbell address + grabbing it's its_lock is no longer
necessary. Note that matching the right ITS / ITE is already handled in
vgic_v4_set_forwarding(), and unless there's a bug in KVM's VGIC ITS
emulation the virtual mapping that should remain stable for the lifetime
of the vLPI mapping.

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-4-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
(cherry picked from commit 05b9405f2fa1848e984f231708fa1e5d385e4d27)
Signed-off-by: Gavin Shan <gshan@redhat.com>
2025-06-25 09:59:21 +10:00
..
arm_arch_timer.h KVM: arm64: Remove unused return value from kvm_reset_vcpu() 2024-01-02 02:31:22 -05:00
arm_hypercalls.h KVM: arm64: Introduce support for userspace SMCCC filtering 2023-07-04 09:11:24 -04:00
arm_pmu.h KVM: arm64: PMU: Reload when resetting 2025-06-25 09:59:20 +10:00
arm_psci.h KVM: arm64: Get rid of vCPU-scoped feature bitmap 2024-01-02 02:31:22 -05:00
arm_vgic.h KVM: arm64: Resolve vLPI by host IRQ in vgic_v4_unset_forwarding() 2025-06-25 09:59:21 +10:00
iodev.h KVM: destruct kvm_io_device while unregistering it from kvm_io_bus 2023-12-01 14:51:08 +01:00