From: Jan Beulich <jbeulich@suse.com>
To: Stefano Stabellini <stefano.stabellini@amd.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger@xenproject.org>,
"Teddy Astie" <teddy.astie@vates.tech>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/2] x86/passthrough: skip disabled vLAPICs in vector_hashing_dest()
Date: Fri, 20 Nov 2026 09:24:44 +0100 [thread overview]
Message-ID: <016e60bb-6835-4568-a55c-4e97dfca9de9@suse.com> (raw)
In-Reply-To: <20261119220003.38517-2-stefano.stabellini@amd.com>
On 19.11.2026 23:00, Stefano Stabellini wrote:
> Unlike vlapic_lowest_prio(), vector_hashing_dest() does not check
> vlapic_enabled(), so a lowest-priority MSI can be posted to a vCPU
> whose LAPIC is disabled, e.g. an AP not yet started, and the interrupt
> is left pending in that vCPU's PIR instead of being delivered.
>
> Skip such vCPUs, as vlapic_lowest_prio() does, and as vioapic_deliver()
> already mimics where it uses vlapic_match_dest() on its own.
>
> Fixes: 35a1caf8b6b5 ("pass-through: update IRTE according to guest interrupt config changes")
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Please see https://lists.xen.org/archives/html/xen-devel/2026-11/msg01815.html
for a more extensive fix.
Jan
> --- a/xen/drivers/passthrough/x86/hvm.c
> +++ b/xen/drivers/passthrough/x86/hvm.c
> @@ -191,7 +191,8 @@ static struct vcpu *vector_hashing_dest(const struct domain *d,
> for_each_vcpu ( d, v )
> {
> if ( !vlapic_match_dest(vcpu_vlapic(v), NULL, APIC_DEST_NOSHORT,
> - dest_id, dest_mode) )
> + dest_id, dest_mode) ||
> + !vlapic_enabled(vcpu_vlapic(v)) )
> continue;
>
> __set_bit(v->vcpu_id, dest_vcpu_bitmap);
next prev parent reply other threads:[~2026-11-20 8:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 22:00 [PATCH 1/2] x86/vlapic: size the all-ones broadcast by the sender's mode Stefano Stabellini
2026-11-19 22:00 ` [PATCH 2/2] x86/passthrough: skip disabled vLAPICs in vector_hashing_dest() Stefano Stabellini
2026-11-20 8:24 ` Jan Beulich [this message]
2026-11-20 8:58 ` [PATCH 1/2] x86/vlapic: size the all-ones broadcast by the sender's mode Jan Beulich
2026-11-20 21:55 ` Stefano Stabellini
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=016e60bb-6835-4568-a55c-4e97dfca9de9@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=roger@xenproject.org \
--cc=stefano.stabellini@amd.com \
--cc=teddy.astie@vates.tech \
--cc=xen-devel@lists.xenproject.org \
/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.