All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.21] tools/libxc: fix xc_physdev_map_pirq_msi() with PCI segments != 0
@ 2025-10-17 14:14 Roger Pau Monne
  2025-10-17 15:41 ` Oleksii Kurochko
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Roger Pau Monne @ 2025-10-17 14:14 UTC (permalink / raw)
  To: xen-devel
  Cc: oleksii.kurochko, Roger Pau Monne, Anthony PERARD, Juergen Gross

Otherwise it's not possible for device models to map IRQs of devices on
segments different than 0.  Keep the same function prototype and pass the
segment in the high 16bits of the bus parameter, like it's done for the
hypercall itself.

Fixes: 7620c0cf9a4d ("PCI multi-seg: add new physdevop-s")
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
I think it's 4.21 material, as otherwise it's not possible to passthrough
PCI devices on segments != 0.
---
 tools/libs/ctrl/xc_physdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libs/ctrl/xc_physdev.c b/tools/libs/ctrl/xc_physdev.c
index 25e686d7b389..1307d6836d72 100644
--- a/tools/libs/ctrl/xc_physdev.c
+++ b/tools/libs/ctrl/xc_physdev.c
@@ -79,7 +79,7 @@ int xc_physdev_map_pirq_msi(xc_interface *xch,
     }
     memset(&map, 0, sizeof(struct physdev_map_pirq));
     map.domid = domid;
-    map.type = MAP_PIRQ_TYPE_MSI;
+    map.type = MAP_PIRQ_TYPE_MSI_SEG;
     map.index = index;
     map.pirq = *pirq;
     map.bus = bus;
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-10-20 10:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 14:14 [PATCH for-4.21] tools/libxc: fix xc_physdev_map_pirq_msi() with PCI segments != 0 Roger Pau Monne
2025-10-17 15:41 ` Oleksii Kurochko
2025-10-18  4:46 ` Frediano Ziglio
2025-10-20  7:50   ` Jan Beulich
2025-10-20  7:46 ` Jan Beulich
2025-10-20  9:07   ` Roger Pau Monné
2025-10-20 10:50     ` Jan Beulich

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.