[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC XEN PATCH v4 4/5] domctl: Use gsi to grant/revoke irq permission
On Mon, Jan 08, 2024 at 09:55:26AM +0100, Jan Beulich wrote: > On 06.01.2024 02:08, Stefano Stabellini wrote: > > On Fri, 5 Jan 2024, Jiqian Chen wrote: > >> --- a/tools/libs/light/libxl_pci.c > >> +++ b/tools/libs/light/libxl_pci.c > >> @@ -1418,6 +1418,7 @@ static void pci_add_dm_done(libxl__egc *egc, > >> unsigned long long start, end, flags, size; > >> int irq, i; > >> int r; > >> + int gsi; > >> uint32_t flag = XEN_DOMCTL_DEV_RDM_RELAXED; > >> uint32_t domainid = domid; > >> bool isstubdom = libxl_is_stubdom(ctx, domid, &domainid); > >> @@ -1486,6 +1487,7 @@ static void pci_add_dm_done(libxl__egc *egc, > >> goto out_no_irq; > >> } > >> if ((fscanf(f, "%u", &irq) == 1) && irq) { > >> + gsi = irq; > > > > A question for Roger and Jan: are we always guaranteed that gsi == irq > > (also in the PV case)? > > Iirc for IO-APIC based IRQs that's always the case; I think that's always the case on Linux, because it calls PHYSDEVOP_map_pirq with index == pirq (see Linux pci_xen_initial_domain()). But other OSes could possibly make the call with pirq == -1 and get a randomly allocated pirq for GSIs. IOW: I don't think the pirq field in xen_domctl_irq_permission can be altered like proposed here to switch from passing a pirq to a GSI. A new hypercall should be introduced that either is GSI specific, or contains a type field in order to specify the namespace the field targets. Thanks, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |