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

[Xen-devel] Xen on Arm guest memory mapping



Hi,

I went over xen/arch/arm/domain_build.c (especially set_memory_reg(..)
) trying to figure out how Xen maps memory to guest and assigns the
virtual addresses. I couldn't find documentation on this, might have
been looking in the wrong place?

I understand the x86 start_page isn't used and everything is passed
using a device tree. This tree is in the linux kernel repo and
attached to the zImage. Xen reads the dtb and adapts it. The guest
then parses the dtb to get info about the assigned memory.

* What if there is no dtb attached? My guest ( ELF, not zImage ) seems
to boot anyway but the domain_build code seems to always use a
devicetree. where does it get one?

* From what I understand of the set_memory_reg() function mentioned
before it does the following ( as long as there is unassigned memory &
banks left ):
    1. read the value from the dt
    2. if there is more room then unassigned memory only use the
amount unassigned
    3. write out to the dt again
    4. actually allocate it using p2m_populate_ram

 => This seems to indicate the xen doesn't adapt the dt if it fits and
just allocates those addresses. This doesn't seem to be true since
they are set at 0x8000000 (xenvm-4.2.dts) and that's a machine
address. The guest needs to receive/work with virtual ones does it
not? Is the dt adapted before this call, I couldn't find where?

* How does Xen pick the virtual addresses?

Thanks,
Sander

_______________________________________________
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®.