From: Stefano Stabellini <sstabellini@kernel.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Stefano Stabellini" <stefano.stabellini@amd.com>,
"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 1/2] x86/vlapic: size the all-ones broadcast by the sender's mode
Date: Fri, 20 Nov 2026 13:55:03 -0800 (PST) [thread overview]
Message-ID: <63acd724-1eb6-e1da-a986-c8fdaf3e955b@kernel.org> (raw)
In-Reply-To: <6c0f9314-05ea-413d-89d2-5e63d0182065@suse.com>
On Fri, 20 Nov 2026, Jan Beulich wrote:
> On 19.11.2026 23:00, Stefano Stabellini wrote:
> > vlapic_match_dest() detects a broadcast by comparing the destination
> > with all ones in the target's mode, but an IPI's destination has the
> > width of the sender's mode.
> >
> > Use the sender's mode when there is one, as is_multicast_dest() does:
> > whether a destination is a broadcast is decided by the sender. vIO-APIC
> > and MSI destinations have no sender and are still compared in the
> > target's mode.
>
> But that isn't right: Those simply cannot express wide target IDs. Aiui
> 0xff is uniformly "broadcast" there. (Or alternatively 0xff cannot
> validly be used in x2APIC mode, or even at all. I fear different sources
> say different things as to the validity of this.)
>
> The situation is perhaps yet more fuzzy there with the 15-bit ID extension,
> for which patches are floating around. All we've got in the tree so far is
> XEN_HVM_CPUID_EXT_DEST_ID afaics.
>
> Overall with no sender it may be best to simply skip the broadcast check.
Is this what you are thinking?
if ( source && dest == _VLAPIC_ID(source, 0xffffffffU) )
return true;
Note that this also drops the physical 0xff broadcast from IO-APIC/MSI
to xAPIC-mode vLAPICs.
If 0xff is uniformly a broadcast for IO-APIC/MSI, the alternative is to
accept a physical 0xff from them for every vLAPIC, independent of the
target's mode:
case APIC_DEST_NOSHORT:
if ( source ? dest == _VLAPIC_ID(source, 0xffffffffU)
: !dest_mode && dest == 0xff )
return true;
prev parent reply other threads:[~2026-11-20 21:55 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
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 [this message]
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=63acd724-1eb6-e1da-a986-c8fdaf3e955b@kernel.org \
--to=sstabellini@kernel.org \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.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.