From: Marc Zyngier <maz@kernel.org>
To: kvmarm@lists.linux.dev, kvm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Steffen Eiden <seiden@linux.ibm.com>,
Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Oliver Upton <oupton@kernel.org>,
Zenghui Yu <yuzenghui@huawei.com>,
Fuad Tabba <fuad.tabba@linux.dev>,
Paolo Bonzini <pbonzini@redhat.com>,
stable@vger.kernel.org, Catalin Marinas <catalin.marinas@arm.com>
Subject: [PATCH 6.1.y 1/5] KVM: arm64: vgic-its: Stop the VM when handling MOVALL
Date: Sat, 5 Dec 2026 10:41:40 +0000 [thread overview]
Message-ID: <20261205104145.1432112-2-maz@kernel.org> (raw)
In-Reply-To: <20261205104145.1432112-1-maz@kernel.org>
commit b31bce255a009b17c26bcada1f23c15ebc3fbff1 upstream.
MOVALL is a royal pain, as it requires us to iterate over all the LPIs
and move them around if they are on the correct source vcpu, and
requiring locking for each of them.
This locking can result in contention for vcpus that enter and exit
the guest, and hinders forward progress. In order to make sure such
process is not contended, just stop the VM altogether.
Nobody in their right mind uses MOVALL anyway, as this is a rather
braindead aspect of the GICv3 architecture.
Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev>
Tested-by: Fuad Tabba <fuad.tabba@linux.dev>
Link: https://patch.msgid.link/20261015100539.1011760-8-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
[catalin.marinas@arm.com: adjust to the vgic_copy_lpi_list() based loop]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
arch/arm64/kvm/vgic/vgic-its.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index b290ccd644e7e..5622c7edd172c 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -1460,6 +1460,15 @@ static int vgic_its_cmd_handle_movall(struct kvm *kvm, struct vgic_its *its,
if (irq_count < 0)
return irq_count;
+ /*
+ * Bulk operations such as MOVALL are a pain, as they can clash
+ * badly locking-wise with other vcpus entering and exiting the
+ * guest, should they be affected by it. Stopping the guest is a
+ * safer bet to ensure uncontended access and ultimately forward
+ * progress. Yeah...
+ */
+ kvm_arm_halt_guest(kvm);
+
for (i = 0; i < irq_count; i++) {
irq = vgic_get_irq(kvm, NULL, intids[i]);
if (!irq)
@@ -1472,6 +1481,8 @@ static int vgic_its_cmd_handle_movall(struct kvm *kvm, struct vgic_its *its,
vgic_its_invalidate_cache(kvm);
+ kvm_arm_resume_guest(kvm);
+
kfree(intids);
return 0;
}
--
2.47.3
next prev parent reply other threads:[~2026-12-05 10:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 10:41 [PATCH 6.1.y 0/5] KVM/arm64 stable fixes Marc Zyngier
2026-12-05 10:41 ` Marc Zyngier [this message]
2026-12-05 10:41 ` [PATCH 6.1.y 2/5] KVM: arm64: vgic-its: Bound PINTID during ITE table restore Marc Zyngier
2026-12-05 10:41 ` [PATCH 6.1.y 3/5] irqchip/gic-v4: Contain VMAPTI vINTID to the expected boundaries Marc Zyngier
2026-12-05 10:41 ` [PATCH 6.1.y 4/5] KVM: arm64: vgic-its: Add signal checks in scan_its_table() Marc Zyngier
2026-12-05 10:41 ` [PATCH 6.1.y 5/5] KVM: arm64: vgic: Linearise AP list pruning process Marc Zyngier
2026-12-05 10:55 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261205104145.1432112-2-maz@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=oupton@kernel.org \
--cc=pbonzini@redhat.com \
--cc=seiden@linux.ibm.com \
--cc=stable@vger.kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=yuzenghui@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox