On Wed, 14 Oct 2020, Alex Bennée via Stratos-dev wrote:
Booting with Xen as a Dom0:
This uses the guest-loader device to setup the Dom0 kernel/initrd. I boosted the system memory to 4G and allocated 2G to Dom0. You can find my QEMU tree with guest-loader support at:
I love it BTW
The command line is as before except more memory and a different -kernel line to load Xen:
./aarch64-softmmu/qemu-system-aarch64 -cpu cortex-a57 \ -machine type=virt,virtualization=on,gic-version=3 \ ... -m 4096 \ -kernel ~/lsrc/xen.git/xen/xen \ -append "dom0_mem=2G,max:2G loglvl=all guest_loglvl=all" \ -device guest-loader,addr=0x42000000,kernel=$HOME/images/agl/Image,bootargs="console=ttyAMA0 root=/dev/vda" \
Can you try using console=hvc0 instead of console=ttyAMA0?
If you are running on Xen as Dom0, you don't have access to the primary physical UART because it is used by Xen, and the PV console is a "hvc" not "ttyAMA".
-device guest-loader,addr=0x47000000,initrd=$HOME/images/agl/initramfs-netboot-image-qemuarm64.ext4 \ -display gtk,show-cursor=on \ -smp 4
The system boots up although I don't get any kernel messages from the console which Xen still has control over. It throws up some complains about un-handled writes:
(XEN) *************************************************** (XEN) No support for ARM_SMCCC_ARCH_WORKAROUND_1. (XEN) Please update your firmware. (XEN) *************************************************** (XEN) 3... 2... 1... (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) (XEN) Freed 364kB init memory. (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER4 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER8 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER12 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER16 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER20 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER24 (XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER28 (XEN) d0v0: vGICR: SGI: unhandled word write 0x000000ffffffff to ICACTIVER0 (XEN) d0v1: vGICR: SGI: unhandled word write 0x000000ffffffff to ICACTIVER0 (XEN) d0v2: vGICR: SGI: unhandled word write 0x000000ffffffff to ICACTIVER0 (XEN) d0v3: vGICR: SGI: unhandled word write 0x000000ffffffff to ICACTIVER0
All the ICACTIVER* messages are "benign" in the sense that ICACTIVER* are not emulated by Xen, so writes to them do nothing and Xen prints a warning. However they are very unlikely to be the cause of any issues you are seeing.
Although I couldn't access the console I was able to ssh into the machine via my 2222 port-fwd.
Very good! :-)