qemu/hw/xen
Jiqian Chen cfcacbab38 xen/passthrough: use gsi to map pirq when dom0 is PVH
In PVH dom0, when passthrough a device to domU, QEMU code
xen_pt_realize->xc_physdev_map_pirq wants to use gsi, but in current codes
the gsi number is got from file /sys/bus/pci/devices/<sbdf>/irq, that is
wrong, because irq is not equal with gsi, they are in different spaces, so
pirq mapping fails.

To solve above problem, use new interface of Xen, xc_pcidev_get_gsi to get
gsi and use xc_physdev_map_pirq_gsi to map pirq when dom0 is PVH.

Signed-off-by: Jiqian Chen <Jiqian.Chen@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Jiqian Chen <Jiqian.Chen@amd.com>
Acked-by: Anthony PERARD <anthony@xenproject.org>
Reviewed-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
Message-Id: <20241106061418.3655304-1-Jiqian.Chen@amd.com>
Signed-off-by: Anthony PERARD <anthony.perard@vates.tech>
2025-03-10 13:25:14 +01:00
..
Kconfig xen: add CONFIG_XEN_BUS and CONFIG_XEN_EMU options for Xen emulation 2023-03-01 08:22:49 +00:00
meson.build hw/arm: xenpvh: Break out a common PVH machine 2024-09-04 16:50:42 +02:00
trace-events hw/xen: Use xs_node_read() from xs_node_vscanf() 2025-01-15 17:07:04 +00:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
xen-backend.c hw/xen: do not repeatedly try to create a failing backend device 2023-11-07 08:54:20 +00:00
xen-bus-helper.c hw/xen: Use xs_node_read() from xs_node_vscanf() 2025-01-15 17:07:04 +00:00
xen-bus.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
xen-host-pci-device.c xen: fix stubdom PCI addr 2024-07-01 14:57:18 +02:00
xen-host-pci-device.h xen: fix stubdom PCI addr 2024-07-01 14:57:18 +02:00
xen-hvm-common.c hw/xen/xen-hvm: Reduce included headers 2025-03-04 14:45:34 +01:00
xen-legacy-backend.c hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE 2025-02-16 14:25:08 +01:00
xen-mapcache.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
xen-operations.c xen: Drop support for Xen versions below 4.7.1 2023-06-07 15:07:10 +01:00
xen-pvh-common.c hw/xen/xen-pvh: Reduce included headers 2025-03-04 14:45:34 +01:00
xen_devconfig.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
xen_pt.c xen/passthrough: use gsi to map pirq when dom0 is PVH 2025-03-10 13:25:14 +01:00
xen_pt.h hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' 2024-03-09 18:51:45 +01:00
xen_pt_config_init.c xen/pt: Emulate multifunction bit in header type 2024-03-12 14:13:08 +00:00
xen_pt_graphics.c hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' 2024-03-09 18:51:45 +01:00
xen_pt_load_rom.c hw/pci: Replace -1 with UINT32_MAX for romsize 2024-07-03 18:14:07 -04:00
xen_pt_msi.c hw/xen: Rename xen_common.h to xen_native.h 2023-03-07 17:04:30 +00:00
xen_pt_stub.c hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' 2024-03-09 18:51:45 +01:00
xen_pvdev.c hw/xen: Prefer QOM cast for XenLegacyDevice 2025-02-16 14:25:08 +01:00