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

Re: [Xen-devel] [PATCH] xen: arm: configure correct dom0_gnttab_start/size

On Thu, 2014-09-11 at 16:54 +0100, Andrew Cooper wrote:
> Why it is hard coded at all? (x86 appears to manage fine.)  Without it
> being variably-located, there will always be a risk of collisions like this.

For x86 PV (and shadow?) you can establish a mapping of the gnttab from
a virtual address directly to the machine address without needing a p2m
entry, via whichever hypercall it is which does that.

For HAP (and shadow?) you need a p2m mapping to get at the grant table,
so somewhere has to be found in the physical address space where it can

In theory a guest kernel could try and find some io space which it isn't
using but to help them out we give them a hint.

For x86 HVM the IOBAR of the platform device as a handy place to put the
hint, for ARM domU we have a defined region in our address map which we
use and communicate via device tree.

But for ARM dom0 the physical address space layout follows the host,
figuring out a free bit of space is a bit tricky so each platform is
currently required (except some don't and there is a broken default) to
say where is a safe place to use (i.e. a person has to read the
datasheet and figure it out).

Ideally we would in the future walk the device tree and try and find a
hole in the address space, but that isn't implemented yet (for x86 PVHVM
Linux or ARM AFAICT, I heard a rumour that the windows PV drivers were
moving away from the platform device IOBAR somehow).


Xen-devel mailing list



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