[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 36/40] vl: switch -M parsing to keyval
From: |
Peter Krempa |
Subject: |
Re: [PULL 36/40] vl: switch -M parsing to keyval |
Date: |
Thu, 22 Jul 2021 10:19:04 +0200 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
CC libvir-list
On Tue, Jul 06, 2021 at 12:01:37 +0200, Paolo Bonzini wrote:
> Switch from QemuOpts to keyval. This enables the introduction
> of non-scalar machine properties, and JSON syntax in the future.
>
> For JSON syntax to be supported right now, we would have to
> consider what would happen if string-based dictionaries (produced by
> -M key=val) were to be merged with strongly-typed dictionaries
> (produced by -M {'key': 123}).
>
> The simplest way out is to never enter the situation, and only allow one
> -M option when JSON syntax is in use. However, we want options such as
> -smp to become syntactic sugar for -M, and this is a problem; as soon
> as -smp becomes a shortcut for -M, QEMU would forbid using -M '{....}'
> together with -smp. Therefore, allowing JSON syntax right now for -M
> would be a forward-compatibility nightmare and it would be impossible
> anyway to introduce -M incrementally in tools.
>
> Instead, support for JSON syntax is delayed until after the main
> options are converted to QOM compound properties. These include -boot,
> -acpitable, -smbios, -m, -semihosting-config, -rtc and -fw_cfg. Once JSON
> syntax is introduced, these options will _also_ be forbidden together
> with -M '{...}'.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> softmmu/vl.c | 315 ++++++++++++++++++++++++---------------------------
> 1 file changed, 146 insertions(+), 169 deletions(-)
This patch breaks detection of certain machine options features in
libvirt which were being detected from 'query-command-line-options'.
I presume the change simply removed this from the output of
query-command-line-options due to the historical cruft how the
aforementioned command works.
Unfortunately I didn't find any suitable replacement from what we are
querying.
The entries which we now lack detection are:
{ "machine", "mem-merge", QEMU_CAPS_MEM_MERGE },
{ "machine", "aes-key-wrap", QEMU_CAPS_AES_KEY_WRAP },
{ "machine", "dea-key-wrap", QEMU_CAPS_DEA_KEY_WRAP },
{ "machine", "kernel_irqchip", QEMU_CAPS_MACHINE_KERNEL_IRQCHIP },
{ "machine", "loadparm", QEMU_CAPS_LOADPARM },
Note that the oldest supported qemu version in libvirt is 2.11 at this
point and all the above flags are included in 2.11 and later.
This means we can theoretically remove the detection and always assume
the flags in case when they are unlikely to be removed in the future.
Alternatively if you can suggest an option how to detect this it will be
welcome.
Thanks
Peter
Re: [PULL 36/40] vl: switch -M parsing to keyval,
Peter Krempa <=
[PULL 38/40] qemu-option: remove now-dead code, Paolo Bonzini, 2021/07/06
[PULL 37/40] machine: add smp compound property, Paolo Bonzini, 2021/07/06
[PULL 32/40] configure: convert compiler tests to meson, part 6, Paolo Bonzini, 2021/07/06
[PULL 39/40] Set icon for QEMU binary on Mac OS, Paolo Bonzini, 2021/07/06
Re: [PULL 00/40] Misc patches for 2021-07-06, Peter Maydell, 2021/07/06