From: Anthony PERARD <anthony.perard@vates.tech>
To: "Chen, Jiqian" <Jiqian.Chen@amd.com>
Cc: "Jan Beulich" <jbeulich@suse.com>,
"Keir Fraser" <keir@xensource.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
"George Dunlap" <george.dunlap@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Juergen Gross" <jgross@suse.com>,
"Daniel P . Smith" <dpsmith@apertussolutions.com>,
"Hildebrand, Stewart" <Stewart.Hildebrand@amd.com>,
"Huang, Ray" <Ray.Huang@amd.com>,
xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH v10 5/5] domctl: Add XEN_DOMCTL_gsi_permission to grant gsi
Date: Mon, 24 Jun 2024 12:33:12 +0000 [thread overview]
Message-ID: <Znlnf2CHxCFadcIX@l14> (raw)
In-Reply-To: <BL1PR12MB58493B55E074243D356B0CAAE7C92@BL1PR12MB5849.namprd12.prod.outlook.com>
On Fri, Jun 21, 2024 at 08:20:55AM +0000, Chen, Jiqian wrote:
> On 2024/6/20 18:42, Jan Beulich wrote:
> > On 20.06.2024 11:40, Chen, Jiqian wrote:
> >> On 2024/6/18 17:23, Jan Beulich wrote:
> >>> On 18.06.2024 10:23, Chen, Jiqian wrote:
> >>>> On 2024/6/17 23:32, Jan Beulich wrote:
> >>>>> On 17.06.2024 11:00, Jiqian Chen wrote:
> >>>>>> @@ -1516,14 +1519,39 @@ static void pci_add_dm_done(libxl__egc *egc,
> >>>>>> rc = ERROR_FAIL;
> >>>>>> goto out;
> >>>>>> }
> >>>>>> - r = xc_domain_irq_permission(ctx->xch, domid, irq, 1);
> >>>>>> +#ifdef CONFIG_X86
> >>>>>> + /* If dom0 doesn't have PIRQs, need to use xc_domain_gsi_permission */
> >>>>>> + r = xc_domain_getinfo_single(ctx->xch, 0, &info);
> >>>>>
> >>>>> Hard-coded 0 is imposing limitations. Ideally you would use DOMID_SELF, but
> >>>>> I didn't check if that can be used with the underlying hypercall(s). Otherwise
> >> From the commit 10ef7a91b5a8cb8c58903c60e2dd16ed490b3bcf, DOMID_SELF is not allowed for XEN_DOMCTL_getdomaininfo.
> >> And now XEN_DOMCTL_getdomaininfo gets domain through rcu_lock_domain_by_id.
> >>
> >>>>> you want to pass the actual domid of the local domain here.
> >> What is the local domain here?
> >
> > The domain your code is running in.
> >
> >> What is method for me to get its domid?
> >
> > I hope there's an available function in one of the libraries to do that.
> I didn't find relate function.
> Hi Anthony, do you know?
Yes, I managed to find:
LIBXL_TOOLSTACK_DOMID
That's the value you can use instead of "0" do designate dom0.
(That was harder than necessary to find.)
Cheers,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2024-06-24 12:33 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 9:00 [XEN PATCH v10 0/5] Support device passthrough when dom0 is PVH on Xen Jiqian Chen
2024-06-17 9:00 ` [XEN PATCH v10 1/5] xen/vpci: Clear all vpci status of device Jiqian Chen
2024-06-17 14:17 ` Jan Beulich
2024-06-18 6:25 ` Chen, Jiqian
2024-06-18 8:33 ` Jan Beulich
2024-06-19 3:39 ` Chen, Jiqian
2024-06-19 7:02 ` Jan Beulich
2024-06-17 9:00 ` [XEN PATCH v10 2/5] x86/pvh: Allow (un)map_pirq when dom0 is PVH Jiqian Chen
2024-06-17 14:45 ` Jan Beulich
2024-06-18 6:49 ` Chen, Jiqian
2024-06-18 8:38 ` Jan Beulich
2024-06-19 5:35 ` Chen, Jiqian
2024-06-17 9:00 ` [XEN PATCH v10 3/5] x86/pvh: Add PHYSDEVOP_setup_gsi for PVH dom0 Jiqian Chen
2024-06-17 14:52 ` Jan Beulich
2024-06-18 6:57 ` Chen, Jiqian
2024-06-18 8:55 ` Jan Beulich
2024-06-19 7:53 ` Chen, Jiqian
2024-06-19 8:06 ` Jan Beulich
2024-06-19 8:51 ` Chen, Jiqian
2024-06-19 9:49 ` Jan Beulich
2024-06-19 10:10 ` Chen, Jiqian
2024-06-17 9:00 ` [XEN PATCH v10 4/5] tools: Add new function to get gsi from dev Jiqian Chen
2024-06-17 15:10 ` Jan Beulich
2024-06-18 8:10 ` Chen, Jiqian
2024-06-18 9:13 ` Jan Beulich
2024-06-20 7:03 ` Chen, Jiqian
2024-06-20 7:43 ` Jan Beulich
2024-06-20 10:23 ` Chen, Jiqian
2024-06-20 10:37 ` Jan Beulich
2024-06-21 8:15 ` Chen, Jiqian
2024-06-24 8:13 ` Jan Beulich
2024-06-25 7:38 ` Chen, Jiqian
2024-06-20 14:38 ` Anthony PERARD
2024-06-21 8:34 ` Chen, Jiqian
2024-06-24 12:08 ` Anthony PERARD
2024-06-17 9:00 ` [XEN PATCH v10 5/5] domctl: Add XEN_DOMCTL_gsi_permission to grant gsi Jiqian Chen
2024-06-17 9:15 ` Chen, Jiqian
2024-06-17 15:32 ` Jan Beulich
2024-06-18 8:23 ` Chen, Jiqian
2024-06-18 9:23 ` Jan Beulich
2024-06-20 9:40 ` Chen, Jiqian
2024-06-20 10:42 ` Jan Beulich
2024-06-21 8:20 ` Chen, Jiqian
2024-06-24 8:17 ` Jan Beulich
2024-06-25 7:44 ` Chen, Jiqian
2024-06-25 7:48 ` Jan Beulich
2024-06-24 12:33 ` Anthony PERARD [this message]
2024-06-25 7:46 ` 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=Znlnf2CHxCFadcIX@l14 \
--to=anthony.perard@vates.tech \
--cc=Jiqian.Chen@amd.com \
--cc=Ray.Huang@amd.com \
--cc=Stewart.Hildebrand@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=dpsmith@apertussolutions.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=keir@xensource.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.