[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 28/28] docs: update Xen-on-KVM documentation
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v3 28/28] docs: update Xen-on-KVM documentation |
Date: |
Thu, 26 Oct 2023 10:26:53 +0200 |
Am 25.10.2023 um 20:56 hat Andrew Cooper geschrieben:
> On 25/10/2023 7:26 pm, David Woodhouse wrote:
> > On Wed, 2023-10-25 at 13:20 -0500, Eric Blake wrote:
> >> On Wed, Oct 25, 2023 at 03:50:42PM +0100, David Woodhouse wrote:
> >>> +
> >>> +Booting Xen PV guests
> >>> +---------------------
> >>> +
> >>> +Booting PV guest kernels is possible by using the Xen PV shim (a version
> >>> of Xen
> >>> +itself, designed to run inside a Xen HVM guest and provide memory
> >>> management
> >>> +services for one guest alone).
> >>> +
> >>> +The Xen binary is provided as the ``-kernel`` and the guest kernel
> >>> itself (or
> >>> +PV Grub image) as the ``-initrd`` image, which actually just means the
> >>> first
> >>> +multiboot "module". For example:
> >>> +
> >>> +.. 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.
> Multiboot2 and PVH support a command line per module, which is the
> preferred way to pass the commandlines, given a choice.
Multiboot 2 seems to integrate the string in a variable length module
structure instead of just having a pointer in a fixed length one, but
the model behind it is essentially the same as before.
Kevin
- [PATCH v3 27/28] hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs, (continued)
- [PATCH v3 27/28] hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs, David Woodhouse, 2023/10/25
- [PATCH v3 22/28] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info(), David Woodhouse, 2023/10/25
- [PATCH v3 09/28] hw/xen: Clean up event channel 'type_val' handling to use union, David Woodhouse, 2023/10/25
- [PATCH v3 07/28] hw/xen: use correct default protocol for xen-block on x86, David Woodhouse, 2023/10/25
- [PATCH v3 28/28] docs: update Xen-on-KVM documentation, David Woodhouse, 2023/10/25
- Re: [PATCH v3 28/28] docs: update Xen-on-KVM documentation, Eric Blake, 2023/10/25
- Re: [PATCH v3 28/28] docs: update Xen-on-KVM documentation, David Woodhouse, 2023/10/25
- Re: [PATCH v3 28/28] docs: update Xen-on-KVM documentation, Andrew Cooper, 2023/10/25
- Re: [PATCH v3 28/28] docs: update Xen-on-KVM documentation, David Woodhouse, 2023/10/25
- Re: [PATCH v3 28/28] docs: update Xen-on-KVM documentation,
Kevin Wolf <=
- Re: [PATCH v3 28/28] docs: update Xen-on-KVM documentation, David Woodhouse, 2023/10/26
- Re: [PATCH v3 28/28] docs: update Xen-on-KVM documentation, David Woodhouse, 2023/10/26
[PATCH v3 02/28] i386/xen: fix per-vCPU upcall vector for Xen emulation, David Woodhouse, 2023/10/25
[PATCH v3 12/28] hw/xen: populate store frontend nodes with XenStore PFN/port, David Woodhouse, 2023/10/25
[PATCH v3 20/28] net: do not delete nics in net_cleanup(), David Woodhouse, 2023/10/25
[PATCH v3 04/28] hw/xen: don't clear map_track[] in xen_gnttab_reset(), David Woodhouse, 2023/10/25
[PATCH v3 01/28] i386/xen: Don't advertise XENFEAT_supervisor_mode_kernel, David Woodhouse, 2023/10/25
[PATCH v3 10/28] include: update Xen public headers to Xen 4.17.2 release, David Woodhouse, 2023/10/25
[PATCH v3 15/28] hw/xen: do not repeatedly try to create a failing backend device, David Woodhouse, 2023/10/25