[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC XEN PATCH v14 4/5] tools: Add new function to get gsi from dev
On Tue, Sep 03, 2024 at 03:04:23PM +0800, Jiqian Chen wrote: > When passthrough a device to domU, QEMU and xl tools use its 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 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.Chen@xxxxxxx> > Signed-off-by: Huang Rui <ray.huang@xxxxxxx> > Signed-off-by: Chen Jiqian <Jiqian.Chen@xxxxxxx> > --- > 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.Chen@xxxxxxx/ > --- > v13->v14 changes: > No. > > v12->v13 changes: > Rename the function xc_physdev_gsi_from_pcidev to xc_pcidev_get_gsi to avoid > confusion with physdev namesapce. > Move the implementation of xc_pcidev_get_gsi into xc_linux.c. > Directly use xencall_fd(xch->xcall) in the function xc_pcidev_get_gsi instead > of opening "privcmd". Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |