tools/libxc: fix xc_physdev_map_pirq_msi() with PCI segments != 0

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.

Amends: 7620c0cf9a ("PCI multi-seg: add new physdevop-s")
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
This commit is contained in:
Roger Pau Monne authored and Andrew Cooper committed 2025-10-21 16:56:19 +01:00
1 parent dc645cdf7d
commit b7838d12bd
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -1623,7 +1623,7 @@ int xc_physdev_map_pirq_msi(xc_interface *xch,
int index,
int *pirq,
int devfn,
int bus,
int segbus,
int entry_nr,
uint64_t table_base);
+3 -3
View File
@@ -65,7 +65,7 @@ int xc_physdev_map_pirq_msi(xc_interface *xch,
int index,
int *pirq,
int devfn,
int bus,
int segbus,
int entry_nr,
uint64_t table_base)
{
@@ -79,10 +79,10 @@ 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;
map.bus = segbus;
map.devfn = devfn;
map.entry_nr = entry_nr;
map.table_base = table_base;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.