How to use Xen for linux(ubuntu) and Android


Hi @leo-yan

I tried your kernel version, I’m able to have shell access. But, somehow I still getting the XEN CPU error.
Here is the full log from boot till I got shell access:

root@linaro-developer:~# uname -a
Linux linaro-developer 5.0.0-rc3-315296-gff9fd24304a2 #2 SMP PREEMPT Thu Feb 14 09:05:08 CET 2019 aarch64x

Is the UEFI matters? I use this one:

And I use

  1. boot-linaro-stretch-developer-hikey-20190120-27.img
  2. rootfs-linaro-stretch-developer-hikey-20190120-27.img

I unsprase the rootfs, mount it, put the kernel, grub.cfg, xen.efi and so on to the boot. Then I sparse it again.
I also replace the grub to the efi folder (in the boot img)

Can you maybe kindly share your boot and rootfs img?



Hi @scorpionzezz,

Sure, I found I am using different versions for ARM-TF/UEFI and Xen:

Xen: I built Xen with its master branch, so I can see the version is: Xen 4.12-unstable (c/s Mon Dec 17 09:22:59 2018 +0000 git:a5b0eb3636) EFI loader

As @dradspd mentioned, we need to add below options ‘hmp-unsafe’ and ‘dom0_vcpus_pin’ into Xen command line thus can dismiss CPU4-CPU7 booting failure issue; In your log it show the booting failure not only for CPU4~7 (big CPUs) but also CPU1~3 failure (LITTLE CPUs), so firstly could try update Xen and UEFI/ARM-TF to check if can fix the booting issue for CPU1~CPU3.

xen_hypervisor /boot/xen.efi loglvl=all console=dtuart dtuart=/soc/ serial@fff32000 efi=no-rs hmp-unsafe dom0_vcpus_pin

Though Mani has released the latest boot and rootfs images, but I still use the older boot and rootfs images which downloaded from the folder: ; seems to me the boot-xxx.img and rootfs-xxx.img will not introduce SMP CPU booting failure.

I use a different way for this :slight_smile:.

We can flash the prebuilt boot image: boot-linaro-stretch-developer-hikey-20180828-19.img.gz and with rootfs image for Debian system, thus we can firstly boot up board successfully with WIFI enabled. So after enabling WIFI I can copy Image/Image.dtb and modify grub.cfg; so in the next time we can select grub menu for Xen booting.


Hi @leo-yan

thanks! I updated the UEFI, added the hmp-unsafe and dom0_vcpus_pin, not all the CPUs are up :slight_smile:
I managed to install the xen-tools as well :slight_smile:
If you try to run “xl list”, can you see the Domain-0?

thanks you so much!



can you somehow explain how you able to run android as domU?



if you want to see domain 0 in xl list,
you can run /etc/init.d/xencommons start after you install xen tools