linux/include/uapi/xen
Jiqian Chen 2fae6bb7be xen/privcmd: Add new syscall to get gsi from dev
On PVH dom0, when passthrough a device to domU, QEMU and xl tools
want to use gsi number to do pirq mapping, see QEMU code
xen_pt_realize->xc_physdev_map_pirq, and xl code
pci_add_dm_done->xc_physdev_map_pirq, 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.
And in current linux codes, there is no method to get gsi
for userspace.

For above purpose, record gsi of pcistub devices when init
pcistub and add a new syscall into privcmd to let userspace
can get gsi when they have a need.

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>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Message-ID: <20240924061437.2636766-4-Jiqian.Chen@amd.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
2024-09-25 09:54:55 +02:00
..
evtchn.h xen/evtchn: Introduce new IOCTL to bind static evtchn 2023-07-26 08:42:34 +02:00
gntalloc.h xen/gntalloc: Replace UAPI 1-element array 2024-02-13 09:06:48 +01:00
gntdev.h Improve docs for IOCTL_GNTDEV_MAP_GRANT_REF 2022-02-03 08:23:32 +01:00
privcmd.h xen/privcmd: Add new syscall to get gsi from dev 2024-09-25 09:54:55 +02:00