[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC XEN PATCH v15 3/4] tools: Add new function to get gsi from dev


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Date: Thu, 12 Sep 2024 02:01:13 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eG/XOykJTzFmDlbeVjKwUxdR+Vr6FvmaDNYHf5D3K6Q=; b=iuQYZZVETASP7GHb7V3t8uM4gkYg3hfoq9aU00H5PIhFBEprXfWqncYi0gt+TpzEqcIUjf9nDEetEX9bPr6RyAt8g9etf0fNQ9jgjrh2dLwo7KHdoBg8FlgSHwMu4nBA7qLIRQPyL+6SkcfJd+coEjWoh7bhQh9qSTFGqEZrjrt9/FTOF3NF2ZuglI406ViDz3QlBowzRruxASu/t99zcFN6qtKIbaWExzXo2BrHz8Jbq/G5CVQd3Ynt5bn/AIV17kDMceIBA9FwHjGaA4UE2aGj4NH0Whk0oiDQOW2K9tYmza+b6rvlsWcz3lY1pHlna6JixDl8LZLjQqwCrZmSMw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eGVb2PSeie53Rg8WCr4hSUXe0LffJIpfqKBb1SoHfc81PjEGO+ZZv0HPe9m/9QAMFZ6/Xg+NJV2J5AXBJyPY/PcjSiAOyr2OzuvN5LvMklt98EE/gMeNNjt7eAQ+C/A8uFkvAxQY1jz2tHAw25/i6SYuY/HMxpZkA0qlawQbPqAPRPDYdRZDk4G5ph0BdXSEJC+m2v/98qCgz5kSdaqXeSxVjazuyt89GQ1QhOKz0nc8kTAkGjiDR9KZ2Q5sRw2tbHjI/R4TCkg743xeTgpmNjwNE0S/PfV68Dgm5ZHqtZjSU+Vge5TkCVBNg0u8Js96beQqKPStzkBGeSfNy2E3jg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Daniel P . Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "Huang, Ray" <Ray.Huang@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Delivery-date: Thu, 12 Sep 2024 02:01:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHbBBkohrVZJsKTNkeCOpd+VdxVurJSaGuAgAAAhICAAYJlgA==
  • Thread-topic: [RFC XEN PATCH v15 3/4] tools: Add new function to get gsi from dev

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.Chen@xxxxxxx>
>>> Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
>>> Signed-off-by: Chen Jiqian <Jiqian.Chen@xxxxxxx>
>>> Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
>>> ---
>>> 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/
>>
>> 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.

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.