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

Re: [Xen-devel] [PATCH v6 08/11] vpci/bars: add handlers to map the BARs



On Thu, Oct 05, 2017 at 10:56:20AM +0000, Julien Grall wrote:
> Hi Roger,
> 
> On 19/09/17 16:29, Roger Pau Monne wrote:
> > +static int vpci_map_range(unsigned long s, unsigned long e, void *data,
> > +                          unsigned long *c)
> > +{
> > +    const struct map_data *map = data;
> > +    int rc;
> > +
> > +    for ( ; ; )
> > +    {
> > +        unsigned long size = e - s + 1;
> > +
> > +        rc = (map->map ? map_mmio_regions : unmap_mmio_regions)
> > +             (map->d, _gfn(s), size, _mfn(s));
> 
> Again, this is relying on *map_mmio_regions to support preemption. This is
> not the case on ARM.
> 
> I am not asking to add preemption in the ARM code. But we should at least
> add a check similar to XEN_DOMCTL_memory_mapping ( if (size > 64) ) to
> remind us that *map_mmio_regions have to be fixed.

I've added a bodge for ARM in order to limit the mappings to 64 for
each call to {un}map_mmio_regions.

> 
> Similarly, on IRC said you will add a TODO regarding the lack of passing the
> type of the BAR.

Sorry, not sure if we spoke about this before or after sending this
series, but in any case I've added it now.

Thanks, Roger.

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

 


Rackspace

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