From: Anthony PERARD <anthony.perard@vates.tech>
To: Jiqian Chen <Jiqian.Chen@amd.com>
Cc: xen-devel@lists.xenproject.org, "Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
"George Dunlap" <gwd@xenproject.org>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Juergen Gross" <jgross@suse.com>,
"Daniel P . Smith" <dpsmith@apertussolutions.com>,
"Stewart Hildebrand" <Stewart.Hildebrand@amd.com>,
"Huang Rui" <ray.huang@amd.com>
Subject: Re: [RFC XEN PATCH v14 4/5] tools: Add new function to get gsi from dev
Date: Tue, 03 Sep 2024 14:12:57 +0000 [thread overview]
Message-ID: <ZtcZZh6ebgFonQDR@l14> (raw)
In-Reply-To: <20240903070424.982218-5-Jiqian.Chen@amd.com>
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@amd.com>
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> Signed-off-by: Chen Jiqian <Jiqian.Chen@amd.com>
> ---
> 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@amd.com/
> ---
> 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@vates.tech>
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2024-09-03 14:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 7:04 [XEN PATCH v14 0/5] Support device passthrough when dom0 is PVH on Xen Jiqian Chen
2024-09-03 7:04 ` [XEN PATCH v14 1/5] xen/pci: Add hypercall to support reset of pcidev Jiqian Chen
2024-09-09 9:34 ` Roger Pau Monné
2024-09-03 7:04 ` [XEN PATCH v14 2/5] x86/pvh: Allow (un)map_pirq when dom0 is PVH Jiqian Chen
2024-09-03 7:42 ` Jan Beulich
2024-09-03 7:58 ` Chen, Jiqian
2024-09-03 9:25 ` Jan Beulich
2024-09-03 10:53 ` Chen, Jiqian
2024-09-03 14:14 ` Jan Beulich
2024-09-04 1:43 ` Stefano Stabellini
2024-09-04 6:04 ` Jan Beulich
2024-09-05 6:45 ` Chen, Jiqian
2024-09-05 9:44 ` Jan Beulich
2024-09-05 22:51 ` Stefano Stabellini
2024-09-06 6:26 ` Jan Beulich
2024-09-06 23:34 ` Stefano Stabellini
2024-09-09 8:56 ` Jan Beulich
2024-09-09 10:04 ` Roger Pau Monné
2024-09-09 10:22 ` Jan Beulich
2024-09-09 10:35 ` Chen, Jiqian
2024-09-03 7:04 ` [XEN PATCH v14 3/5] x86/domctl: Add hypercall to set the access of x86 gsi Jiqian Chen
2024-09-09 9:15 ` Roger Pau Monné
2024-09-09 10:30 ` Chen, Jiqian
2024-09-03 7:04 ` [RFC XEN PATCH v14 4/5] tools: Add new function to get gsi from dev Jiqian Chen
2024-09-03 14:12 ` Anthony PERARD [this message]
2024-09-03 15:51 ` Anthony PERARD
2024-09-03 15:57 ` Jan Beulich
2024-09-03 7:04 ` [RFC XEN PATCH v14 5/5] tools: Add new function to do PIRQ (un)map on PVH dom0 Jiqian Chen
2024-09-03 17:16 ` Anthony PERARD
2024-09-04 9:31 ` Chen, Jiqian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZtcZZh6ebgFonQDR@l14 \
--to=anthony.perard@vates.tech \
--cc=Jiqian.Chen@amd.com \
--cc=Stewart.Hildebrand@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=dpsmith@apertussolutions.com \
--cc=gwd@xenproject.org \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=ray.huang@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.