mbox series

[qemu,RFC,0/4] spapr: Kexec style boot

Message ID 20190720012850.14369-1-aik@ozlabs.ru (mailing list archive)
Headers show
Series spapr: Kexec style boot | expand

Message

Alexey Kardashevskiy July 20, 2019, 1:28 a.m. UTC
This is an attempts to boot a pseries guest without a firmware.

The idea is to boot a VM with petitboot as a more powerful boot loader
and eliminate scanning phase of the SLOF booting process.

This provides environment without SLOF but with the device tree
and few modifications to already existing H_CAS and H_RTAS hypeprcalls.

This is made on top of these 2 patches:
spapr: Stop providing RTAS blob
spapr_pci: Advertise BAR reallocation capability

This requires a modified pseries kernel, posted separately
as "powerpc/pseries: Kexec style boot".

This also requires patched kexec-lite from the openpower build as
currently it requires linux,rtas-base and rtas-size properties in
the DT which we won't have in such environment.

1/1 is not necessary but having vmlinux at 0 helps debugging via
the qemu gdb stub easier.

The example command line is:
/home/aik/pbuild/qemu-killslof-localhost-ppc64/ppc64-softmmu/qemu-system-ppc64 \
-nodefaults \
-chardev stdio,id=STDIO0,signal=off,mux=on \
-device spapr-vty,id=svty0,reg=0x71000110,chardev=STDIO0 \
-mon id=MON0,chardev=STDIO0,mode=readline -nographic -vga none \
-enable-kvm \
-device nec-usb-xhci,id=nec-usb-xhci0 -m 4G \
-kernel /home/aik/pbuild/kernel-guest-nv2-le/vmlinux \
-initrd op-build/output/images/rootfs.cpio \
-machine pseries,bios=no,cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken \
-snapshot \
-netdev "tap,id=TAP0,helper=/home/aik/qemu-bridge-helper --br=br0" \
-device \
"virtio-net-pci,id=vnet0,bus=pci.0,addr=1.0,mac=C0:41:49:4b:00:02,netdev=TAP0" \
-device virtio-scsi-pci,id=vscsi0 \
-drive \
id=DRIVE0,if=none,file=pbuild/__img/u1804-64le-killslof.qcow2,format=qcow2 \
-device scsi-disk,id=scsi-disk0,drive=DRIVE0 \
-smp 8,threads=8 \
-L /home/aik/t/qemu-ppc64-bios/ \
-trace events=qemu_trace_events -d guest_errors \
-chardev socket,id=SOCKET0,server,nowait,path=qemu.mon.mac02 \
-mon chardev=SOCKET0,mode=control



This is based on sha1
216965b20b04 Joel Stanley "ppc/pnv: update skiboot to v6.4".

Please comment. Thanks.



Alexey Kardashevskiy (4):
  spapr: Allow changing kernel loading address
  spapr: Allow bios-less configuration
  spapr: Advertise H_RTAS to the guest
  spapr: Implement SLOF-less client_architecture_support

 include/hw/ppc/spapr.h |   7 +++
 hw/ppc/spapr.c         | 118 ++++++++++++++++++++++++++++++++---------
 hw/ppc/spapr_hcall.c   |  49 +++++++++++++++--
 3 files changed, 146 insertions(+), 28 deletions(-)