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

Re: [Xen-devel] Fail to start Dom0 in ARM highmem.

On 10/28/2014 03:47 PM, Iurii Konovalenko wrote:
> Hello, all!

Hello Iurii,

> I try to bring up Xen on Renesas Lager board (r8a7790 SoC - R-Car H2).
> Xen revision is 4.4.
> I try to run Linux (kernel 3.14 + LTSI patches) as Dom0.
> This SoC support ARM LPAE. Physical address is 40-bit long.
> Board has 4GB of RAM. Adress Map is following:
> 0x00_4000_0000 - 0x00_7FFF_FFFF 1 GBytes of RAM
> 0x01_4000_0000 - 0x01_FFFF_FFFF 3 GBytes of RAM
> I want to provide 1 GB of memory for Dom0.
> As there is not enough memory for Dom0 in first bank of memory, it is
> allocated by Xen from second bank on pa 0x01_4000_0000 -
> 0x01_7FFF_FFFF.
> And in context of this task I've faced with problem. Here is log print:
>> (XEN) Populate P2M 0x140000000->0x180000000 (1:1 mapping for dom0)
>> (XEN) Loading kernel from boot module 2
>> (XEN) Loading zImage from 0000000072000040 to 
>> 0000000140008000-0000000140327aa8
>> (XEN)
>> (XEN) ****************************************
>> (XEN) Panic on CPU 0:
>> (XEN) Unable to map translate guest address
>> (XEN) ****************************************
> My investigations show, that it is because of type cast truncating.
> In file xen/arch/arm/kernel.c in line 152 we call
>     rc = gvirt_to_maddr(load_addr + offs, &ma);
> where load_addr has type paddr_t (64-bit), in my case
> 0x0000000140008000, but function deceleration is
>     static inline int gvirt_to_maddr(vaddr_t va, paddr_t *pa)
> where va has type vaddr_t (32-bit), in my case is truncated to 0x40008000
> That's why bits 33-40 are lost and function fails.
> Could you please provide any suggestions, is it possible to start Dom0
> with 1:1 mapping and memory in second bank (over32-bit high memory)?

32-bit processor is only able to address 32 bits virtual address. When
pagination is disabled, only 32 bits physical address will work.

Therefore DOM0 should have at least few MB of RAM below 4GB, where the
kernel should be loaded.

I suspect Xen is not able to find free space below 4G, because your
bootloader is loading the kernel, initramfs... in this first bank. Can
you teach your bootloader to load them above 4G to free the space?

Although, Xen should throw a warning on 32bit Xen is we are unable to
find space below 4G. I will look to send a patch for this purpose.


Julien Grall

Xen-devel mailing list



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