[PATCH 1/7] qemu: capabilities: Introduce QEMU_CAPS_MACHINE_ACPI
Peter Krempa
pkrempa at redhat.com
Mon Feb 27 17:25:23 UTC 2023
On Mon, Feb 27, 2023 at 08:44:57 -0800, Andrea Bolognani wrote:
> On Mon, Feb 27, 2023 at 04:27:37PM +0100, Peter Krempa wrote:
> > Detect that ACPI can be controlled via '-machine acpi=off' rather than
> > use of -no-acpi.
>
> First of all, thank you for picking up this work. I was planning on
> doing this myself, but you've beaten me to it and I'm absolutely
> ecstatic about that :)
>
> > +++ b/src/qemu/qemu_capabilities.c
> > static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = {
> > + { "acpi", NULL, QEMU_CAPS_MACHINE_ACPI },
> > { "fsdev", "multidevs", QEMU_CAPS_FSDEV_MULTIDEVS },
> > { "machine", "hpet", QEMU_CAPS_MACHINE_HPET },
> > { "sandbox", NULL, QEMU_CAPS_SECCOMP_SANDBOX },
> >
> > +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
> > <flag name='virtio-blk.queue-size'/>
> > <flag name='usb-host.guest-resets-all'/>
> > <flag name='virtio-crypto'/>
> > + <flag name='machine-acpi'/>
>
> Are you sure you're detecting this correctly? Based on an earlier
> discussion about this topic[1], I would have expected the flag to
> show up for QEMU 5.0.0, but *not* for QEMU 4.2.0.
Uhh, right!
It was supposed to be:
{ "machine", "acpi", QEMU_CAPS_MACHINE_ACPI },
instead of:
{ "acpi", NULL, QEMU_CAPS_MACHINE_ACPI },
Which only gets detected with the in-dev qemu-8.0 version.
> This looks like you're checking whether -acpi itself exists as a
> top-level option. Which it doesn't, but -no-acpi does and yet it
> doesn't seem to be advertised in the output of
> query-command-line-options?
Well, it actually does exist in the output of
query-command-line-options, but I have no idea what it means:
virsh qemu-monitor-command --pretty cd query-command-line-options | jq .return[].option
One of the options is "acpi".
> Basically it looks like there are some serious introspection
> shenanigans going on, and I'm not sure we can actually reliably
> detect whether -machine acpi can be used until your QEMU patch has
> been merged.
>
> Or I might just have missed something obvious! In which case, please
> let me know what it is :)
I have no idea what the 'acpi' option does but it certainly mislead me.
More information about the libvir-list
mailing list