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

Re: [Xen-devel] Xen on ARM: "Failed to allocate contiguous memory for dom0" with dom0_mem greater than 256MB



On Fri, 2014-01-24 at 11:00 +0100, Arianna Avanzini wrote:
> I noticed that Xen 4.4 fails to boot the dom0 if more than 256MB of RAM are
> assigned to it by providing the dom0_mem boot option. The error message 
> produced
> during the boot process is the following.

This is an unfortunate side effect of the use of the 1:1 mapping. The
threads:
        "Master not working on Allwinner A20"
        "create multiple banks for dom0 in 1:1 mapping if necessary"
Have some more details, but in short the allocation of dom0 memory needs
to be done in a single chunk and because of the way the Xen allocator
works it will also be aligned to its own size -- this creates some
limitations on the size of the region vs what memory is free at start of
day

I'm afraid this probably won't be solved for Xen 4.4, since the change
is likely to be rather intrusive.

As a workaround you could try changing the load addresses of Xen and the
kernel, dtb etc used by u-boot to pack them towards the top of RAM. This
*should* result in the entire lower half of RAM being available which
will make it more likely to achieve the necessary alignment constraints
for a dom0 taking up to half of the system RAM. I've not actually tried
this but I'd recommend trying the following addresses from the top of
RAM:
        -2M: Leave free for Xen to relocate to
        -4M: dom0 kernel
        -6M: DTB
        -8M: Initial Xen load address

If you have an initrd then put it between dom0 kernel and dtb and bump
everything else down, likewise if anything is bigger than 2M then round
up to 2M and push everything down to accommodate it.

Also consider that for a Xen system it is common to only give dom0 a
fairly small fraction of the system RAM in order to leave as much as
possible for guest domains. What target amount of dom0 memory are you
aiming for? 256M or even 128M is probably plenty if you are going to run
a few domains.

Ian.


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