[PATCH v6 1/4] qemu_capabilities: introduce QEMU_CAPS_ACCEL
Peter Krempa
pkrempa at redhat.com
Mon Nov 22 08:41:11 UTC 2021
On Sat, Nov 20, 2021 at 03:20:45 -0500, huangy81 at chinatelecom.cn wrote:
> From: Hyman Huang(黄勇) <huangy81 at chinatelecom.cn>
>
> since the "-machine" option for accelerators is legacy, "-accel" option
> may be a better mechanism. following are details:
> https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@redhat.com/
>
> this patch introduce QEMU_CAPS_ACCEL capability to tell if we're dealing
> new enough QEMU so that we can replace '-machine accel' with '-accel'.
>
> there were two phases of -accel support in QEMU:
> - 2.9 to 4.2: only one -accel option supported; specifying a fallback
> couldn't be done with -accel and required the older "-machine accel=tcg:kvm"
> instead.
>
> - 5.0 or newer: multiple -accel options supported, e.g. "-accel tcg
> -accel kvm"
> and it would be possible to distinguish them, for example using QOM
> properties.
>
> however libvirt only ever specifies one accelerator so it makes no
> difference.
>
> since the oldest supported qemu by libvirt is qemu-2.11, so modify
> capability test cases with QEMU version >= 2.11.0 carefully.
Well, this actually means we don't need the capability at all, we can
just unconditionally switch to -accel. Michal attempted the same:
https://listman.redhat.com/archives/libvir-list/2021-November/msg00196.html
This patch should be dropped, the capability can be removed from any
subsequent patches.
More information about the libvir-list
mailing list