Commit ee98fce7 authored by Oliver Upton's avatar Oliver Upton Committed by sanglipeng1
Browse files

KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler

stable inclusion
from stable-v5.10.211
commit 615af9cb3e7079181c49002976c8aff0f6e7955e
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAF2J4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=615af9cb3e7079181c49002976c8aff0f6e7955e



--------------------------------

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: ff9c1143 ("KVM: arm/arm64: GICv4: Handle MOVALL applied to a vPE")
Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240221092732.4126848-3-oliver.upton@linux.dev


Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng1 <sanglipeng1@jd.com>
parent 577901aa
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1408,6 +1408,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);