]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Feb 2024 09:17:40 +0000 (10:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Feb 2024 09:17:40 +0000 (10:17 +0100)
added patches:
kvm-arm64-vgic-its-test-for-valid-irq-in-its_sync_lpi_pending_table.patch
kvm-arm64-vgic-its-test-for-valid-irq-in-movall-handler.patch

queue-5.4/kvm-arm64-vgic-its-test-for-valid-irq-in-its_sync_lpi_pending_table.patch [new file with mode: 0644]
queue-5.4/kvm-arm64-vgic-its-test-for-valid-irq-in-movall-handler.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/kvm-arm64-vgic-its-test-for-valid-irq-in-its_sync_lpi_pending_table.patch b/queue-5.4/kvm-arm64-vgic-its-test-for-valid-irq-in-its_sync_lpi_pending_table.patch
new file mode 100644 (file)
index 0000000..b3e19e0
--- /dev/null
@@ -0,0 +1,36 @@
+From 8d3a7dfb801d157ac423261d7cd62c33e95375f8 Mon Sep 17 00:00:00 2001
+From: Oliver Upton <oliver.upton@linux.dev>
+Date: Wed, 21 Feb 2024 09:27:31 +0000
+Subject: KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()
+
+From: Oliver Upton <oliver.upton@linux.dev>
+
+commit 8d3a7dfb801d157ac423261d7cd62c33e95375f8 upstream.
+
+vgic_get_irq() may not return a valid descriptor if there is no ITS that
+holds a valid translation for the specified INTID. If that is the case,
+it is safe to silently ignore it and continue processing the LPI pending
+table.
+
+Cc: stable@vger.kernel.org
+Fixes: 33d3bc9556a7 ("KVM: arm64: vgic-its: Read initial LPI pending table")
+Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
+Link: https://lore.kernel.org/r/20240221092732.4126848-2-oliver.upton@linux.dev
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ virt/kvm/arm/vgic/vgic-its.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/virt/kvm/arm/vgic/vgic-its.c
++++ b/virt/kvm/arm/vgic/vgic-its.c
+@@ -459,6 +459,9 @@ static int its_sync_lpi_pending_table(st
+               }
+               irq = vgic_get_irq(vcpu->kvm, NULL, intids[i]);
++              if (!irq)
++                      continue;
++
+               raw_spin_lock_irqsave(&irq->irq_lock, flags);
+               irq->pending_latch = pendmask & (1U << bit_nr);
+               vgic_queue_irq_unlock(vcpu->kvm, irq, flags);
diff --git a/queue-5.4/kvm-arm64-vgic-its-test-for-valid-irq-in-movall-handler.patch b/queue-5.4/kvm-arm64-vgic-its-test-for-valid-irq-in-movall-handler.patch
new file mode 100644 (file)
index 0000000..afd2996
--- /dev/null
@@ -0,0 +1,35 @@
+From 85a71ee9a0700f6c18862ef3b0011ed9dad99aca Mon Sep 17 00:00:00 2001
+From: Oliver Upton <oliver.upton@linux.dev>
+Date: Wed, 21 Feb 2024 09:27:32 +0000
+Subject: KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler
+
+From: Oliver Upton <oliver.upton@linux.dev>
+
+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>
+---
+ virt/kvm/arm/vgic/vgic-its.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/virt/kvm/arm/vgic/vgic-its.c
++++ b/virt/kvm/arm/vgic/vgic-its.c
+@@ -1376,6 +1376,8 @@ static int vgic_its_cmd_handle_movall(st
+       for (i = 0; i < irq_count; i++) {
+               irq = vgic_get_irq(kvm, NULL, intids[i]);
++              if (!irq)
++                      continue;
+               update_affinity(irq, vcpu2);
index ffc3cb2022be2977cabe494527c950248d41ffb3..c506bc1b8c893152ea49d28abc9fd57f6b6c9d4d 100644 (file)
@@ -1,3 +1,5 @@
+kvm-arm64-vgic-its-test-for-valid-irq-in-its_sync_lpi_pending_table.patch
+kvm-arm64-vgic-its-test-for-valid-irq-in-movall-handler.patch
 net-sched-retire-cbq-qdisc.patch
 net-sched-retire-atm-qdisc.patch
 net-sched-retire-dsmark-qdisc.patch