[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 02/21] i386/xen: Don't resample GSI when per-vCPU upcall vector is in use
- To: David Woodhouse <dwmw2@xxxxxxxxxxxxx>, qemu-devel@xxxxxxxxxx
- From: Paul Durrant <xadimgnik@xxxxxxxxx>
- Date: Wed, 25 Nov 2026 10:58:03 +0000
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20260707 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Content-Type:In-Reply-To:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID:From"
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Peter Maydell <peter.maydell@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, "Edgar E . Iglesias" <edgar.iglesias@xxxxxxxxx>, "Michael S . Tsirkin" <mst@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Marcelo Tosatti <mtosatti@xxxxxxxxxx>, Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>, Jason Wang <jasowangio@xxxxxxxxx>, Hui Peng <benquike@xxxxxxxxx>, Mark Syms <mark.syms@xxxxxxxxxx>, Feifan Qian <bea1e@xxxxxxxxx>, David Woodhouse <dwmw@xxxxxxxxxxxx>
- Delivery-date: Wed, 25 Nov 2026 10:58:16 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 24/11/2026 16:22, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>
The callback_via GSI (or PCI INTx) and the per-vCPU upcall vector are
mutually exclusive delivery mechanisms for Xen event channel upcalls.
Xen itself will never assert the callback GSI for a vCPU which has a
per-vCPU upcall vector configured.
When the interrupt is acked, QEMU's resampling logic reasserts the
GSI if evtchn_upcall_pending is still set. If the guest has configured
a per-vCPU upcall vector, events are delivered through that vector and
the GSI is unexpected; a guest which receives both the vector upcall
and a spurious GSI interrupt for the same event can crash. This was
observed in production with Windows guests on a different VMM which
implements the same resampling logic.
If a per-vCPU upcall vector is configured, don't resample the GSI;
just deassert it.
Fixes: ddf0fd9ae1fd ("hw/xen: Support HVM_PARAM_CALLBACK_TYPE_GSI callback")
Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
target/i386/kvm/xen-emu.c | 7 +++++++
1 file changed, 7 insertions(+)
Reviewed-by: Paul Durrant <paul@xxxxxxx>
|