On 11.09.2024 08:58, Jiqian Chen wrote:
> 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 codes, there is no method to get gsi for userspace.
> For above purpose, add new function to get gsi, and the
> corresponding ioctl is implemented on linux kernel side.
> 
> Signed-off-by: Jiqian Chen <jiqian.c...@amd.com>
> Signed-off-by: Huang Rui <ray.hu...@amd.com>
> Signed-off-by: Chen Jiqian <jiqian.c...@amd.com>
> Reviewed-by: Anthony PERARD <anthony.per...@vates.tech>
> ---
> RFC: it needs to wait for the corresponding third patch on linux kernel side 
> to be merged.
> https://lore.kernel.org/xen-devel/20240607075109.126277-4-jiqian.c...@amd.com/

I'm afraid I don't understand this remark: The change here (and similarly
patch 4) ought to be independent of when the kernel change goes in. After
all the libraries need to work on older Linux as well. Please clarify.

Jan

Reply via email to