summaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2024-02-21 09:27:32 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-03-01 13:06:11 +0100
commite7908309867e8132b57e16a6bcc949991b643501 (patch)
treebeb523fa71fee9628cdc5bbd3a3607255da6a21f /virt/kvm
parentc2462b26faab4d40a78fc2862387bd615e0b7c25 (diff)
downloadlinux-stable-e7908309867e8132b57e16a6bcc949991b643501.tar.gz
linux-stable-e7908309867e8132b57e16a6bcc949991b643501.tar.bz2
linux-stable-e7908309867e8132b57e16a6bcc949991b643501.zip
KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler
commit 85a71ee9a0700f6c18862ef3b0011ed9dad99aca upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/arm/vgic/vgic-its.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
index 30d1809f720b..2fb26bd3106e 100644
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -1232,6 +1232,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);