]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: caps: add virCPUFeaturePolicy param to virQEMUCapsUpdateCPUDeprecatedFeatures
authorCollin Walling <walling@linux.ibm.com>
Mon, 30 Jun 2025 03:19:27 +0000 (23:19 -0400)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 25 Jul 2025 13:36:21 +0000 (15:36 +0200)
commit30335e5fc5e7e1d9863b3dfeec0c496391f0eb07
tree9fc57f529500b7ae4a28ecd2f5bfe28b218b9773
parente03995e63e66db013dbbb71f7577814458c1ceaa
qemu: caps: add virCPUFeaturePolicy param to virQEMUCapsUpdateCPUDeprecatedFeatures

Currently, virQEMUCapsUpdateCPUDeprecatedFeatures only allows for
disabling deprecated features.  This locks the deprecated_features
attribute to only do something if set to 'off'.

Let's add a virCPUFeaturePolicy to the function's parameters which will
allow the caller to decide what happens to these features.

Add a test with guest XML using deprecated_features='on' to ensure the
API is working properly.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Acked-by: Thomas Huth <thuth@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_driver.c
src/qemu/qemu_process.c
tests/qemuxmlconfdata/cpu-model-deprecated-features-on.s390x-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/cpu-model-deprecated-features-on.s390x-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/cpu-model-deprecated-features-on.xml [new file with mode: 0644]
tests/qemuxmlconftest.c