On 2024/9/11 18:51, Jan Beulich wrote:
> On 11.09.2024 12:49, Jan Beulich wrote:
>> 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.
> 
> Hmm, maybe for this patch the dependency is for the new IOCTL as an
> interface to be accepted. That's fine a dependency of course. Yet then
> why the same remark in patch 4?
Yes, patch#3 depends on the new IOCTL on the kernel side.
Patch#4 uses the new function of patch#3 and new hypercall of patch#2, it 
depends on patch#2/3, so patch#4 also depends on the patches on the kernel side.
And the kernel patches are too old, I will send a new version this week.

> 
> Jan

-- 
Best regards,
Jiqian Chen.

Reply via email to