How to use Xen for linux(ubuntu) and Android


hi, @leo-yan
yes, it is 3GB.
[ 0.000000] Memory: 3019664K/3109084K available (10236K kernel code, 1180K rwdata, 4728K rodata, 1152K init, 405K bss, 73036K reserved, 16384K cma-reserved)
also according to
hikey960 DRAM is 3GB.


as for the booting image, I am using the latest version.


My board is also 3GB.


hi, @dradspd
seems this doesn’t matter 3G or 4G, I have another 4GB DRAM hikey960, the result is the same. I guess this is related to somewhere DRAM configuration or kernel size.


hi, @leo-yan
your 5.0-xen kernel, I tried, but failed, after boot, there is nothing coming out from console.
after deleted following section code in dts, now it works, also my xen can work now.

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
index 665c74d…33ea836 100644
— a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
@@ -45,16 +45,6 @@
#size-cells = <2>;

– uefi-reboot-mode {
– reg = <0x0 0x32100000 0x0 0x00001000>;
– no-map;
– };

– bl31 {
– reg = <0x0 0x20200000 0x0 0x200000>;
– no-map;
– };


Thanks a lot for sharing this, @jackyard. At my side I don’t need to remove these two memory sections from dts.

Actually, UEFI will overwrite the memory regions with the code [1], thus ‘uefi-reboot-mode’ region will be reserved by UEFI by default; thus whether you remove it from dts or not, it will be reserved and cannot be used by Xen/kernels.

So I think BL31 region is the only cause for your booting failure; there has a conflict between the BL31 region [0x20200000-0x20400000) and Xen loading Image target address range [0000000020080000-00000000214bba00]; you could see my built Xen image can handle it by loading image to higher memory address so that avoid confliction.

I can confirm you are using a newer Xen code base than mine, so suppose there has some regression in Xen (my Xen code base last commit id is: commit a5b0eb363694e7e15405f0b3fc5fb6fab79df1db " x86/mm/p2m: stop checking for IOMMU shared page tables in mmio_order()"). I will rebuild Xen with latest code base and let you know the result.

Come back to your fixing, you could use it as temporary fixing but it’s not safe enough. Since you are using one conflicted memory region with ARM-TF BL31, which is runtime firmware.