On 3/3/21 6:36 PM, Alex Bennée wrote:
Hypervisors, especially type-1 ones, need the firmware/bootcode to put their initial guest somewhere in memory and pass the information to it via platform data. The guest-loader is modelled after the generic loader for exactly this sort of purpose:
$QEMU $ARGS -kernel ~/xen.git/xen/xen \ -append "dom0_mem=1G,max:1G loglvl=all guest_loglvl=all" \ -device guest-loader,addr=0x42000000,kernel=Image,bootargs="root=/dev/sda2 ro console=hvc0 earlyprintk=xen" \ -device guest-loader,addr=0x47000000,initrd=rootfs.cpio
Signed-off-by: Alex Bennée alex.bennee@linaro.org Message-Id: 20201105175153.30489-5-alex.bennee@linaro.org Message-Id: 20210211171945.18313-5-alex.bennee@linaro.org
hw/core/guest-loader.h | 34 ++++++++++ hw/core/guest-loader.c | 145 +++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 5 ++ hw/core/meson.build | 2 + 4 files changed, 186 insertions(+) create mode 100644 hw/core/guest-loader.h create mode 100644 hw/core/guest-loader.c
Missing documentation, otherwise: Reviewed-by: Philippe Mathieu-Daudé philmd@redhat.com