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

Re: [Xen-devel] [v4][PATCH 4/9] tools:libxc: check if mmio BAR is out of RMRR mappings

On Wed, 2014-08-27 at 09:46 +0800, Chen, Tiejun wrote:
> On 2014/8/27 4:36, Ian Campbell wrote:
> > On Fri, 2014-08-22 at 18:09 +0800, Tiejun Chen wrote:
> >
> >> +    /* We should check if mmio range is out of RMRR mapping.
> >> +     *
> >> +     * Assume we have one entry if not enough we'll expand.
> >> +     */
> >
> > The usual approach with such hypervisor interfaces (which I suppose
> > xc_reserved_device_memory_map turns into) is to first call it with NULL
> > to get the required size and then allocate a suitable buffer and call a
> > second time.
> Ofentimes, RMRR should be rare with one or two entries, even zero.

It's not clear to me what number you are saying is the norm here.

Even if some N is common today what guarantee is there that N won't grow
or shrink with the next generation of systems?

>  So I 
> think its reasonable to start posting one entry since this can cover 
> such a scenario the platform really owns one entry.

Making the call twice is not terribly expensive (nor is this a hot path)
and it allows you to avoid the reallocation and recall and the twisty
error handling structure which that implies.


Xen-devel mailing list



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