aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2024-02-21 09:27:32 +0000
committerMarc Zyngier <maz@kernel.org>2024-02-21 10:06:41 +0000
commit85a71ee9a0700f6c18862ef3b0011ed9dad99aca (patch)
treec8cab034bc8b836484dbbeea377c97f6a5573832
parent8d3a7dfb801d157ac423261d7cd62c33e95375f8 (diff)
downloadlinux-85a71ee9a0700f6c18862ef3b0011ed9dad99aca.tar.gz
KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler
It is possible that an LPI mapped in a different ITS gets unmapped while handling the MOVALL command. If that is the case, there is no state that can be migrated to the destination. Silently ignore it and continue migrating other LPIs. Cc: stable@vger.kernel.org Fixes: ff9c114394aa ("KVM: arm/arm64: GICv4: Handle MOVALL applied to a vPE") Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20240221092732.4126848-3-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org>
Notes
Fixes: ff9c114394aa ("KVM: arm/arm64: GICv4: Handle MOVALL applied to a vPE") # v4.15-rc1 Stable: fcf90b4703bd # v6.6.19 Stable: 72fdbc728c33 # v6.1.80 Stable: 4deb8413eccb # v5.15.150 Stable: 615af9cb3e70 # v5.10.211 Stable: 9d17e7350403 # v5.4.270 Stable: e7908309867e # v4.19.308 Lore: https://lore.kernel.org/r/20240221092732.4126848-3-oliver.upton@linux.dev # kvmarm, stable Lore: https://lore.kernel.org/r/20240226213822.1228736-3-oliver.upton@linux.dev # stable Lore: https://lore.kernel.org/r/20240226215612.1387774-3-oliver.upton@linux.dev # stable Lore: https://lore.kernel.org/r/20240227131550.178198134@linuxfoundation.org # linux-patches, stable Lore: https://lore.kernel.org/r/20240227131552.946973582@linuxfoundation.org # linux-patches, stable Lore: https://lore.kernel.org/r/20240227131601.225565731@linuxfoundation.org # linux-patches, stable Lore: https://lore.kernel.org/r/20240227131613.871883250@linuxfoundation.org # linux-patches, stable Lore: https://lore.kernel.org/r/20240227131617.901798585@linuxfoundation.org # linux-patches, stable Lore: https://lore.kernel.org/r/20240227131631.221285443@linuxfoundation.org # linux-patches, stable Lore: https://lore.kernel.org/r/20240227131636.750697106@linuxfoundation.org # linux-patches, stable
-rw-r--r--arch/arm64/kvm/vgic/vgic-its.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 082448de27ed9..28a93074eca17 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -1435,6 +1435,8 @@ static int vgic_its_cmd_handle_movall(struct kvm *kvm, struct vgic_its *its,
for (i = 0; i < irq_count; i++) {
irq = vgic_get_irq(kvm, NULL, intids[i]);
+ if (!irq)
+ continue;
update_affinity(irq, vcpu2);