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

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

Hello, all!

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 -
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) 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)?

Best regards.

Iurii Konovalenko | Senior Software Engineer

Xen-devel mailing list



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