|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/2] x86/vlapic: size the all-ones broadcast by the sender's mode
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.
Fixes: 82d29b97d013 ("x86/vlapic: accept a logical destination of all ones as a
broadcast")
Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Link:
https://lore.kernel.org/xen-devel/95e0e0fb-2978-4c87-b723-fb7c30f36883@xxxxxxxxxx/
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
---
CC: Jan Beulich <jbeulich@xxxxxxxx>
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Roger Pau Monné <roger@xxxxxxxxxxxxxx>
CC: Teddy Astie <teddy.astie@xxxxxxxxxx>
xen/arch/x86/hvm/vlapic.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index 50b515d254..b7861bd2ba 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -247,8 +247,12 @@ bool vlapic_match_dest(
switch ( short_hand )
{
case APIC_DEST_NOSHORT:
- /* All ones is a broadcast in either destination mode. */
- if ( dest == _VLAPIC_ID(target, 0xffffffffU) )
+ /*
+ * All ones is a broadcast in either destination mode. An IPI's
+ * destination has the width of its sender's mode; IO-APIC and MSI
+ * destinations are compared in the target's.
+ */
+ if ( dest == _VLAPIC_ID(source ?: target, 0xffffffffU) )
return true;
if ( dest_mode )
return vlapic_match_logical_addr(target, dest);
--
2.47.3
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |