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

Re: [Xen-devel] [PATCH v2 20/21] libxl: Add support for non-PCI passthrough



On Tue, 2014-09-09 at 12:12 -0700, Julien Grall wrote:
> Hi Stefano,
> 
> On 06/08/14 09:58, Stefano Stabellini wrote:
> > On Wed, 6 Aug 2014, Julien Grall wrote:
> >> Hi Stefano,
> >>
> >> On 08/06/2014 05:44 PM, Stefano Stabellini wrote:
> >>> On Thu, 31 Jul 2014, Julien Grall wrote:
> >>>> On ARM, every non-PCI device are described in the device tree. Each of 
> >>>> them
> >>>> can be found via a path.
> >>>>
> >>>> This path will be used to retrieved the different informations about the
> >>>> device (compatible string, interrupts, MMIOs). Libxl will take care of:
> >>>>      - Allocate the MMIOs regions for the device in the guest
> >>>>      - Create the device node in the guest device tree
> >>>>      - Map the IRQs and MMIOs range in the guest P2M
> >>>>
> >>>> Note, that the device node won't contains specific properties for the 
> >>>> node.
> >>>> Only generic one (compatible, interrupts, regs) will be created by libxl.
> >>>>
> >>>> In the future, per-device properties will be added. Maybe via a 
> >>>> configuration
> >>>> file listing what is needed.
> >>>>
> >>>> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
> >>>> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> >>>> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> >>>> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> >>>>
> >>>> ---
> >>>>      Changes in v2:
> >>>>          - Get DT infos earlier
> >>>>          - Allocate/map IRQ in libxl__arch_domain_create rather than in
> >>>>          libxl__device_dt_add
> >>>
> >>> I understand why you moved it earlier but if it is not too hard I would
> >>> suggest to try to keep mmio and irq mapping all together, because it
> >>> would make the code much easier to read and modify in the future, being
> >>> all in one place.
> >>
> >> I could fixup the device tree later. So we don't have to "map/retrieve"
> >> the IRQ earlier.
> >>
> >> But I don't much like this solution.
> >
> > Urgh, that's horrible. I'll leave it to Ian to decide what's best.
> 
> I think I found a way to avoid this hackish code. We could let the 
> toolstack decides of the VIRQ number.

That would fit nicely with the toolstack picking nr_spis, and also helps
people who want a 1:1 mapping to achieve that.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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