On Thu, 2023-10-26 at 10:26 +0200, Kevin Wolf wrote: > > > > > > +.. parsed-literal:: > > > > > + > > > > > + |qemu_system| --accel kvm,xen-version=0x40011,kernel-irqchip=split \\ > > > > > + -chardev stdio,id=char0 -device xen-console,chardev=char0 \\ > > > > > + -display none -m 1G -kernel xen -initrd bzImage \\ > > > > > + -append "pv-shim console=xen,pv -- console=hvc0 root=/dev/xvda1" \\ > > > > > + -drive file=${GUEST_IMAGE},if=xen > > > > Is the space between -- and console= intentionsl? > > > Yes, that one is correct. The -- is how you separate Xen's command line > > > (on the left) from the guest kernel command line (on the right). > > > > To expand on this a bit. > > > > Multiboot1 supports multiple modules but only a single command line. As > > one of the modules passed to Xen is the dom0 kernel, we need some way to > > pass it's command line, hence the " -- ". > > That's not right, even Multiboot 1 contains a 'string' field in the > module structure that is defined to typically hold a command line. The > exact meaning is OS dependent, so Xen could use it however it wants. > > In QEMU (and I believe this is the same behaviour as in GRUB), > everything before the space in an -initrd argument is treated as a > filename to load, everything after it is just passed as the command > line. > > So it would have been entirely possible to use -initrd 'bzImage > console=hvc0 root=/dev/xvda1' if Xen worked like that. Xen does allow that too. I didn't realise our multiboot loader did though. So yes, you *can* use -initrd 'bzImage root=/dev/xvda1'. And you can even load more than one module, it seems. Separate them by commas, so -initrd 'bzImage,initrd.img' should work. You can even do both at the same time. If you have commas on the kernel command line, *double* them: -initrd 'bzImage root=/dev/xvda earlyprintk=xen,,keep,initrd.img' I'll update the documentation accordingly.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature