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

Re: Uses of /hypervisor memory range (was: FreeBSD/Xen/ARM issues)



On Fri, May 14, 2021 at 09:32:10AM +0100, Julien Grall wrote:
> Hi Elliott,
> 
> On 14/05/2021 03:42, Elliott Mitchell wrote:
> > Was it intended for the /hypervisor range to dynamically scale with the
> > size of the domain?
> As per above, this doesn't depend on the size of the domain. Instead, this
> depends on what sort of the backend will be present in the domain.

It should instead scale based on the total memory on the system, ie:
if your hardware has 4GB of RAM the unpopulated range should at least
be: 4GB - memory of the current domain, so that it could map any
possible page assigned to a different domain (and even then I'm not
sure we shouldn't account for duplicated mappings).

> > Might it be better to deprecate the /hypervisor range and have domains
> > allocate any available address space for foreign mappings?
> 
> It may be easy for FreeBSD to find available address space but so far this
> has not been the case in Linux (I haven't checked the latest version
> though).
> 
> To be clear, an OS is free to not use the range provided in /hypervisor
> (maybe this is not clear enough in the spec?). This was mostly introduced to
> overcome some issues we saw in Linux when Xen on Arm was introduced.
> 
> > 
> > Should the FreeBSD implementation be treating grant tables as distinct
> > from other foreign mappings?
> 
> Both require unallocated addres space to work. IIRC FreeBSD is able to find
> unallocated space easily, so I would recommend to use it.

I agree. I think the main issue here is that there seems to be some
bug (or behavior not understood properly) with the resource manager
on Arm that returns an error when requesting a region anywhere in the
memory address space, ie: [0, ~0].

> > (is treating them the same likely to
> > induce buggy behavior on x86?)
> 
> I will leave this answer to Roger.

x86 is already treating them the same by using xenmem_alloc to request
memory to map the grant table or foreign mappings, so there's no
change on x86 in that regard.

Maybe I'm not getting that last question right.

Roger.



 


Rackspace

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