]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: command: Introduce JSON variant of qemuBuildVirtioDevStr
authorPeter Krempa <pkrempa@redhat.com>
Thu, 30 Sep 2021 15:55:45 +0000 (17:55 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 12 Oct 2021 08:26:03 +0000 (10:26 +0200)
commit89b5bc626a9a761563da88955de758d388dbbfd0
tree61f147f5b608aa62c9fd9b25277ff55a26a1a9d0
parent24be92b8e38762e9ba13e32a4f68568ed26380ea
qemu: command: Introduce JSON variant of qemuBuildVirtioDevStr

Add a JSON variant of the generator of properties for virtio devices.
For convenience both the old and new are for now marked as unused, which
will be removed once the conversion is complete.

The formatted properties have following types according to QEMU.
'virtio-blk-pci' was used as an example:

  disable-legacy=<OnOffAuto> - on/off/auto (default: "auto")
  disable-modern=<bool>  -  (default: false)
  iommu_platform=<bool>  - on/off (default: false)
  ats=<bool>             - on/off (default: false)
  packed=<bool>          - on/off (default: false)

Note that <OnOffAuto> is an enum type without alternates in QMP so it
must be represented as a string in JSON.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c