From: Oliver Upton <oupton@kernel.org>
To: kvmarm@lists.linux.dev
Cc: Marc Zyngier <maz@kernel.org>, Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Wei-Lin Chang <weilin.chang@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Fuad Tabba <fuad.tabba@linux.dev>,
Oliver Upton <oupton@kernel.org>
Subject: [PATCH 4/4] KVM: arm64: vgic-v3: Pause the source vCPU when processing MOVALL cmd
Date: Tue, 29 Sep 2026 14:29:25 -0700 [thread overview]
Message-ID: <20260929212925.31775-5-oupton@kernel.org> (raw)
In-Reply-To: <20260929212925.31775-1-oupton@kernel.org>
We currently pause the VM to process a MOVALL command to avoid
undesirable contention on the AP list with guest entry/exit. This is no
longer quite as big of an issue, as the migrations of active/pending
IRQs no longer happens in vgic_prune_ap_list().
To cope with this, vgic_update_lpi_affinity() may pause the source vCPU
internally for a pending LPI to remove it from the AP list. Since
keeping the vCPU paused for the duration of the MOVALL command can
reduce the overhead, relax (but preserve) the VM pause to only pause the
source vCPU.
Signed-off-by: Oliver Upton <oupton@kernel.org>
---
arch/arm64/kvm/vgic/vgic-its.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 585df69d1ffe..4e4970944ee0 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -1382,11 +1382,11 @@ static int vgic_its_cmd_handle_movall(struct kvm *kvm, struct vgic_its *its,
/*
* 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...
+ * guest, should they be affected by it. Stopping the source vCPU
+ * is a safer bet to ensure uncontended access and ultimately
+ * forward progress. Yeah...
*/
- kvm_arm_halt_guest(kvm);
+ kvm_pause_vcpu(vcpu1);
xa_for_each(&dist->lpi_xa, intid, irq) {
irq = vgic_get_irq(kvm, intid);
@@ -1400,7 +1400,7 @@ static int vgic_its_cmd_handle_movall(struct kvm *kvm, struct vgic_its *its,
vgic_its_invalidate_cache(its);
- kvm_arm_resume_guest(kvm);
+ kvm_resume_vcpu(vcpu1);
return 0;
}
--
2.47.3
next prev parent reply other threads:[~2026-09-29 21:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 21:29 [PATCH 0/4] KVM: arm64: vgic: Stop migrating IRQ from vgic_prune_ap_list() Oliver Upton
2026-09-29 21:29 ` [PATCH 1/4] KVM: arm64: Add helpers to halt a vCPU Oliver Upton
2026-09-30 13:33 ` Fuad Tabba
2026-09-29 21:29 ` [PATCH 2/4] KVM: arm64: vgic: Move IRQ migrations out of vgic_prune_ap_list() Oliver Upton
2026-09-30 13:55 ` Fuad Tabba
2026-09-30 21:50 ` Oliver Upton
2026-09-29 21:29 ` [PATCH 3/4] KVM: arm64: vgic-v3: Only pause the targeted vCPU when disabling LPIs Oliver Upton
2026-09-29 21:29 ` Oliver Upton [this message]
2026-09-30 13:25 ` [PATCH 0/4] KVM: arm64: vgic: Stop migrating IRQ from vgic_prune_ap_list() Fuad Tabba
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=20260929212925.31775-5-oupton@kernel.org \
--to=oupton@kernel.org \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=seiden@linux.ibm.com \
--cc=suzuki.poulose@arm.com \
--cc=weilin.chang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.