[PATCH 2/3] qemu: capabilities: Condemn the use of 'device.json' capability name

Ján Tomko jtomko at redhat.com
Mon Jan 3 15:56:32 UTC 2022

On a Monday in 2022, Peter Krempa wrote:
>As a workaround for users using 'libvirt-7.9' and 'libvirt-7.10' with
>'qemu-6.2' who wish to use device hot-unplug we are going to be
>suggesting to filter out the 'device.json' qemu capability via either
>the global 'qemu.conf' config:
>  capability_filters = [ "device.json" ]
>or the per-VM XML capability override:
> <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
> [...]
>  <qemu:capabilities>
>    <qemu:del capability='device.json'/>
>  </qemu:capabilities>
> </domain>
>Doing this poisons the capability name 'device.json' for any further
>use, so to ensure that we can re-add JSON usage for -device also for
>users which filtered it out originally once it's fixed in qemu we need
>to condemn the old name and add a new one.
>To achieve this the old capability is renamed to
>'X_QEMU_CAPS_DEVICE_JSON_BROKEN' and a new capability
>'QEMU_CAPS_DEVICE_JSON' is mapped to 'device.json-fixed'. For now we

I am not a fan of the new string but we can change it later once it's
clear how to probe for this in QEMU.


>leave it unasserted, but this allows to keep all the code in place.
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> src/qemu/qemu_capabilities.c | 3 ++-
> src/qemu/qemu_capabilities.h | 3 ++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220103/fda98c40/attachment-0001.sig>

More information about the libvir-list mailing list