[PATCH 0/3] domain capabilites improvements

The first two patches add USB redirect and channel devices to domcapabilities. Patch3 fixes reporting of spice support. Patch1 was sent previously, before I noticed the others were needed https://listman.redhat.com/archives/libvir-list/2022-August/234045.html Jim Fehlig (3): conf: Add USB redirect devices to domain capabilities conf: Add channel devices to domain capabilities qemu: Use command line to properly check for spice support docs/formatdomaincaps.rst | 46 +++++++++++++++++++ src/conf/domain_capabilities.c | 26 +++++++++++ src/conf/domain_capabilities.h | 16 +++++++ src/conf/schemas/domaincaps.rng | 20 ++++++++ src/qemu/qemu_capabilities.c | 35 +++++++++++++- src/qemu/qemu_capabilities.h | 6 +++ .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 12 +++++ .../qemu_4.2.0-virt.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 7 +++ tests/domaincapsdata/qemu_4.2.0.s390x.xml | 11 +++++ tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 12 +++++ .../qemu_5.0.0-virt.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 7 +++ tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 12 +++++ tests/domaincapsdata/qemu_5.1.0.sparc.xml | 12 +++++ tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 12 +++++ .../qemu_5.2.0-virt.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_5.2.0.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 7 +++ tests/domaincapsdata/qemu_5.2.0.s390x.xml | 11 +++++ tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 12 +++++ .../qemu_6.0.0-virt.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_6.0.0.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_6.0.0.s390x.xml | 11 +++++ tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 12 +++++ tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 12 +++++ .../qemu_6.2.0-virt.aarch64.xml | 12 +++++ tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 12 +++++ tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 7 +++ tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 12 +++++ .../qemu_7.0.0-virt.aarch64.xml | 12 +++++ tests/domaincapsdata/qemu_7.0.0.aarch64.xml | 12 +++++ tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 11 +++++ tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 12 +++++ tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 12 +++++ .../caps_4.2.0.x86_64.xml | 1 + .../caps_5.0.0.riscv64.xml | 1 + .../caps_5.0.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 + .../caps_5.1.0.x86_64.xml | 1 + .../caps_5.2.0.riscv64.xml | 1 + .../caps_5.2.0.x86_64.xml | 1 + .../caps_6.0.0.x86_64.xml | 1 + .../caps_6.1.0.x86_64.xml | 1 + .../caps_6.2.0.aarch64.xml | 1 + .../caps_6.2.0.x86_64.xml | 1 + .../caps_7.0.0.aarch64.xml | 1 + .../caps_7.0.0.x86_64.xml | 1 + .../caps_7.1.0.x86_64.xml | 1 + 68 files changed, 674 insertions(+), 1 deletion(-) -- 2.37.1

As qemu becomes more modularized, it is important for libvirt to advertise availability of the modularized functionality through capabilities. This change adds USB redirect devices to domain capabilities, allowing clients such as virt-install to avoid using redirdev devices when not supported by the target qemu. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/formatdomaincaps.rst | 22 +++++++++++++++++++ src/conf/domain_capabilities.c | 13 +++++++++++ src/conf/domain_capabilities.h | 8 +++++++ src/conf/schemas/domaincaps.rng | 10 +++++++++ src/qemu/qemu_capabilities.c | 17 ++++++++++++++ src/qemu/qemu_capabilities.h | 3 +++ .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 5 +++++ .../qemu_4.2.0-virt.aarch64.xml | 1 + tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 1 + tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_4.2.0.s390x.xml | 5 +++++ tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 5 +++++ .../qemu_5.0.0-virt.aarch64.xml | 1 + tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 1 + tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 5 +++++ tests/domaincapsdata/qemu_5.1.0.sparc.xml | 5 +++++ tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 5 +++++ .../qemu_5.2.0-virt.aarch64.xml | 1 + tests/domaincapsdata/qemu_5.2.0.aarch64.xml | 1 + tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_5.2.0.s390x.xml | 5 +++++ tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 5 +++++ .../qemu_6.0.0-virt.aarch64.xml | 1 + tests/domaincapsdata/qemu_6.0.0.aarch64.xml | 1 + tests/domaincapsdata/qemu_6.0.0.s390x.xml | 5 +++++ tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 5 +++++ tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 5 +++++ .../qemu_6.2.0-virt.aarch64.xml | 5 +++++ tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 5 +++++ tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 5 +++++ .../qemu_7.0.0-virt.aarch64.xml | 5 +++++ tests/domaincapsdata/qemu_7.0.0.aarch64.xml | 5 +++++ tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 5 +++++ tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 5 +++++ .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 5 +++++ tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 5 +++++ 54 files changed, 265 insertions(+) diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst index 70f46b972a..557b61bf26 100644 --- a/docs/formatdomaincaps.rst +++ b/docs/formatdomaincaps.rst @@ -529,6 +529,28 @@ TPM device capabilities are exposed under the ``tpm`` element. For instance: ``backendVersion`` Options for the ``version`` attribute of the ``<tpm><backend/>`` element. +USB redirect device +^^^^^^^^^^^^^^^^^^^ + +USB redirdev device capabilities are exposed under the ``redirdev`` element. For instance: + +:: + + <domainCapabilities> + ... + <devices> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> + ... + </devices> + </domainCapabilities> + +``bus`` + Options for the ``bus`` attribute of the ``<redirdev/>`` element. + Features ~~~~~~~~ diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 653123f293..9cb1dbe7bd 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -559,6 +559,18 @@ virDomainCapsDeviceFilesystemFormat(virBuffer *buf, } +static void +virDomainCapsDeviceRedirdevFormat(virBuffer *buf, + const virDomainCapsDeviceRedirdev *redirdev) +{ + FORMAT_PROLOGUE(redirdev); + + ENUM_PROCESS(redirdev, bus, virDomainRedirdevBusTypeToString); + + FORMAT_EPILOGUE(redirdev); +} + + /** * virDomainCapsFeatureGICFormat: * @buf: target buffer @@ -672,6 +684,7 @@ virDomainCapsFormat(const virDomainCaps *caps) virDomainCapsDeviceRNGFormat(&buf, &caps->rng); virDomainCapsDeviceFilesystemFormat(&buf, &caps->filesystem); virDomainCapsDeviceTPMFormat(&buf, &caps->tpm); + virDomainCapsDeviceRedirdevFormat(&buf, &caps->redirdev); virBufferAdjustIndent(&buf, -2); virBufferAddLit(&buf, "</devices>\n"); diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index a526969cda..de2a89c963 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -130,6 +130,13 @@ struct _virDomainCapsDeviceTPM { virDomainCapsEnum backendVersion; /* virDomainTPMVersion */ }; +STATIC_ASSERT_ENUM(VIR_DOMAIN_REDIRDEV_BUS_LAST); +typedef struct _virDomainCapsDeviceRedirdev virDomainCapsDeviceRedirdev; +struct _virDomainCapsDeviceRedirdev { + virTristateBool supported; + virDomainCapsEnum bus; /* virDomainRedirdevBus */ +}; + STATIC_ASSERT_ENUM(VIR_DOMAIN_FS_DRIVER_TYPE_LAST); typedef struct _virDomainCapsDeviceFilesystem virDomainCapsDeviceFilesystem; struct _virDomainCapsDeviceFilesystem { @@ -225,6 +232,7 @@ struct _virDomainCaps { virDomainCapsDeviceRNG rng; virDomainCapsDeviceFilesystem filesystem; virDomainCapsDeviceTPM tpm; + virDomainCapsDeviceRedirdev redirdev; /* add new domain devices here */ virDomainCapsFeatureGIC gic; diff --git a/src/conf/schemas/domaincaps.rng b/src/conf/schemas/domaincaps.rng index 9cbc2467ab..8da3fbb352 100644 --- a/src/conf/schemas/domaincaps.rng +++ b/src/conf/schemas/domaincaps.rng @@ -195,6 +195,9 @@ <optional> <ref name="tpm"/> </optional> + <optional> + <ref name="redirdev"/> + </optional> </element> </define> @@ -247,6 +250,13 @@ </element> </define> + <define name="redirdev"> + <element name="redirdev"> + <ref name="supported"/> + <ref name="enum"/> + </element> + </define> + <define name="features"> <element name="features"> <optional> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 71018b4f6b..7d99050fa9 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6342,6 +6342,21 @@ virQEMUCapsFillDomainDeviceTPMCaps(virQEMUCaps *qemuCaps, } +void +virQEMUCapsFillDomainDeviceRedirdevCaps(virQEMUCaps *qemuCaps, + virDomainCapsDeviceRedirdev *redirdev) +{ + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_REDIR)) { + redirdev->supported = VIR_TRISTATE_BOOL_YES; + redirdev->bus.report = true; + VIR_DOMAIN_CAPS_ENUM_SET(redirdev->bus, VIR_DOMAIN_REDIRDEV_BUS_USB); + } else { + redirdev->supported = VIR_TRISTATE_BOOL_NO; + } +} + + + /** * virQEMUCapsSupportsGICVersion: * @qemuCaps: QEMU capabilities @@ -6477,6 +6492,7 @@ virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps, virDomainCapsDeviceRNG *rng = &domCaps->rng; virDomainCapsDeviceFilesystem *filesystem = &domCaps->filesystem; virDomainCapsDeviceTPM *tpm = &domCaps->tpm; + virDomainCapsDeviceRedirdev *redirdev = &domCaps->redirdev; virDomainCapsMemoryBacking *memoryBacking = &domCaps->memoryBacking; virQEMUCapsFillDomainFeaturesFromQEMUCaps(qemuCaps, domCaps); @@ -6509,6 +6525,7 @@ virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps, virQEMUCapsFillDomainDeviceRNGCaps(qemuCaps, rng); virQEMUCapsFillDomainDeviceFSCaps(qemuCaps, filesystem); virQEMUCapsFillDomainDeviceTPMCaps(qemuCaps, tpm); + virQEMUCapsFillDomainDeviceRedirdevCaps(qemuCaps, redirdev); virQEMUCapsFillDomainFeatureGICCaps(qemuCaps, domCaps); virQEMUCapsFillDomainFeatureSEVCaps(qemuCaps, domCaps); virQEMUCapsFillDomainFeatureS390PVCaps(qemuCaps, domCaps); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 382c357a78..85b989368f 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -830,6 +830,9 @@ void virQEMUCapsFillDomainDeviceFSCaps(virQEMUCaps *qemuCaps, void virQEMUCapsFillDomainDeviceTPMCaps(virQEMUCaps *qemuCaps, virDomainCapsDeviceTPM *tpm); +void virQEMUCapsFillDomainDeviceRedirdevCaps(virQEMUCaps *qemuCaps, + virDomainCapsDeviceRedirdev *redirdev); + bool virQEMUCapsGuestIsNative(virArch host, virArch guest); diff --git a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml index 0ec4c570ac..a39ada0182 100644 --- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml @@ -216,6 +216,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml index 4e0cb08b72..e054993aaf 100644 --- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml @@ -231,6 +231,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml index 05d606967b..579ca0eed7 100644 --- a/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml @@ -165,6 +165,7 @@ </enum> </filesystem> <tpm supported='no'/> + <redirdev supported='no'/> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_4.2.0.aarch64.xml b/tests/domaincapsdata/qemu_4.2.0.aarch64.xml index f19ad5e6db..1632c85d7a 100644 --- a/tests/domaincapsdata/qemu_4.2.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_4.2.0.aarch64.xml @@ -163,6 +163,7 @@ </enum> </filesystem> <tpm supported='no'/> + <redirdev supported='no'/> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0.ppc64.xml b/tests/domaincapsdata/qemu_4.2.0.ppc64.xml index 8ea7ad5714..909feac47c 100644 --- a/tests/domaincapsdata/qemu_4.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_4.2.0.ppc64.xml @@ -136,6 +136,7 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0.s390x.xml b/tests/domaincapsdata/qemu_4.2.0.s390x.xml index fb162ea578..1c3877ec0c 100644 --- a/tests/domaincapsdata/qemu_4.2.0.s390x.xml +++ b/tests/domaincapsdata/qemu_4.2.0.s390x.xml @@ -238,6 +238,11 @@ </enum> </filesystem> <tpm supported='no'/> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml index d8793bb38a..666a974489 100644 --- a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml @@ -216,6 +216,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml index 036e446c64..e6625bcdbc 100644 --- a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml @@ -218,6 +218,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml index 4df4e86cf1..9e1ffe3a4d 100644 --- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml @@ -233,6 +233,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml index bb8500baa6..631bb6b15f 100644 --- a/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml @@ -177,6 +177,7 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_5.0.0.aarch64.xml b/tests/domaincapsdata/qemu_5.0.0.aarch64.xml index e7227d092f..dcf8d22806 100644 --- a/tests/domaincapsdata/qemu_5.0.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_5.0.0.aarch64.xml @@ -175,6 +175,7 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml index cac329fd08..fcfc2266d2 100644 --- a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml @@ -142,6 +142,7 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml index e901d12918..f08278cfbf 100644 --- a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml @@ -218,6 +218,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml index df1572c901..814f81defc 100644 --- a/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml @@ -219,6 +219,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml index 3a6dc7b5fc..6391383da7 100644 --- a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml @@ -233,6 +233,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.1.0.sparc.xml b/tests/domaincapsdata/qemu_5.1.0.sparc.xml index 5c1c0c4680..ea4d1d28dd 100644 --- a/tests/domaincapsdata/qemu_5.1.0.sparc.xml +++ b/tests/domaincapsdata/qemu_5.1.0.sparc.xml @@ -105,6 +105,11 @@ </enum> </filesystem> <tpm supported='no'/> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.1.0.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0.x86_64.xml index e0e8e0ed12..5dd7efe165 100644 --- a/tests/domaincapsdata/qemu_5.1.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.1.0.x86_64.xml @@ -219,6 +219,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml index 6a49f568be..8b4c1dd954 100644 --- a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml @@ -219,6 +219,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml index f41f47c346..3306a14ba0 100644 --- a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml @@ -233,6 +233,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml index dfd792c031..4571622c4c 100644 --- a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml @@ -177,6 +177,7 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml index e7227d092f..dcf8d22806 100644 --- a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml @@ -175,6 +175,7 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml index 88e4837ec3..bc43fb6a38 100644 --- a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml @@ -142,6 +142,7 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0.s390x.xml b/tests/domaincapsdata/qemu_5.2.0.s390x.xml index 2a2ca8abcf..041c1ede15 100644 --- a/tests/domaincapsdata/qemu_5.2.0.s390x.xml +++ b/tests/domaincapsdata/qemu_5.2.0.s390x.xml @@ -240,6 +240,11 @@ </enum> </filesystem> <tpm supported='no'/> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml index 0a6f72df7e..6147fc84b8 100644 --- a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml @@ -219,6 +219,11 @@ <value>1.2</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml index 40df34edf0..3e36847385 100644 --- a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml @@ -221,6 +221,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml index e563b0cb59..d622f67ef3 100644 --- a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml @@ -235,6 +235,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml index 958c40437f..9bf854869f 100644 --- a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml @@ -179,6 +179,7 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml index 4164bf49f7..fbd48cac00 100644 --- a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml @@ -177,6 +177,7 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0.s390x.xml b/tests/domaincapsdata/qemu_6.0.0.s390x.xml index 13fa3a637e..880ea5062a 100644 --- a/tests/domaincapsdata/qemu_6.0.0.s390x.xml +++ b/tests/domaincapsdata/qemu_6.0.0.s390x.xml @@ -241,6 +241,11 @@ </enum> </filesystem> <tpm supported='no'/> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml index eb60a2105f..84e575829d 100644 --- a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml @@ -221,6 +221,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml index 0480a086c6..a25fa7bacc 100644 --- a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml @@ -222,6 +222,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml index 7baecb0c73..2972e119e7 100644 --- a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml @@ -235,6 +235,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml index 9cbe93ad46..60da420044 100644 --- a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml @@ -222,6 +222,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml index 07b951b81f..61d43e6599 100644 --- a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml @@ -222,6 +222,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml index 367e656b31..057a67c034 100644 --- a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml @@ -236,6 +236,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml index 99c0fc03fd..2843599b57 100644 --- a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml @@ -181,6 +181,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml index 8e04508694..45806a8f10 100644 --- a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml @@ -179,6 +179,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml index 0bbe501383..cc3a45618c 100644 --- a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml @@ -141,6 +141,7 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='no'/> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml index f363cf1b79..56fae62434 100644 --- a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml @@ -222,6 +222,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml index 136dadaeb4..5e4d4d48da 100644 --- a/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml @@ -223,6 +223,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml index c684759356..8a18d45fca 100644 --- a/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml @@ -237,6 +237,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml index 1d6f29db9f..8e3313f383 100644 --- a/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml @@ -180,6 +180,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_7.0.0.aarch64.xml b/tests/domaincapsdata/qemu_7.0.0.aarch64.xml index 73097470f8..f25ab0b796 100644 --- a/tests/domaincapsdata/qemu_7.0.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_7.0.0.aarch64.xml @@ -178,6 +178,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml index 7765c941c5..c43c63c741 100644 --- a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml @@ -142,6 +142,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0.x86_64.xml index 0f9a65ef1b..410cc84977 100644 --- a/tests/domaincapsdata/qemu_7.0.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.0.0.x86_64.xml @@ -223,6 +223,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml index 30082712f4..3b5a846342 100644 --- a/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml @@ -222,6 +222,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml index bcca02f0a4..dd7b8c2ab9 100644 --- a/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml @@ -235,6 +235,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.1.0.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0.x86_64.xml index f377b8e3a9..d8c83e03f3 100644 --- a/tests/domaincapsdata/qemu_7.1.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.1.0.x86_64.xml @@ -222,6 +222,11 @@ <value>2.0</value> </enum> </tpm> + <redirdev supported='yes'> + <enum name='bus'> + <value>usb</value> + </enum> + </redirdev> </devices> <features> <gic supported='no'/> -- 2.37.1

As qemu becomes more modularized, it is important for libvirt to advertise availability of the modularized functionality through capabilities. This change adds channel devices to domain capabilities, allowing clients such as virt-install to avoid using spicevmc channel devices when not supported by the target qemu. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/formatdomaincaps.rst | 24 +++++++++++++++++++ src/conf/domain_capabilities.c | 13 ++++++++++ src/conf/domain_capabilities.h | 8 +++++++ src/conf/schemas/domaincaps.rng | 10 ++++++++ src/qemu/qemu_capabilities.c | 16 +++++++++++++ src/qemu/qemu_capabilities.h | 3 +++ .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 7 ++++++ .../qemu_4.2.0-virt.aarch64.xml | 6 +++++ tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 6 +++++ tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 6 +++++ tests/domaincapsdata/qemu_4.2.0.s390x.xml | 6 +++++ tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 7 ++++++ .../qemu_5.0.0-virt.aarch64.xml | 6 +++++ tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 6 +++++ tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 6 +++++ tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 7 ++++++ tests/domaincapsdata/qemu_5.1.0.sparc.xml | 7 ++++++ tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 7 ++++++ .../qemu_5.2.0-virt.aarch64.xml | 6 +++++ tests/domaincapsdata/qemu_5.2.0.aarch64.xml | 6 +++++ tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 6 +++++ tests/domaincapsdata/qemu_5.2.0.s390x.xml | 6 +++++ tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 7 ++++++ .../qemu_6.0.0-virt.aarch64.xml | 6 +++++ tests/domaincapsdata/qemu_6.0.0.aarch64.xml | 6 +++++ tests/domaincapsdata/qemu_6.0.0.s390x.xml | 6 +++++ tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 7 ++++++ tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 7 ++++++ .../qemu_6.2.0-virt.aarch64.xml | 7 ++++++ tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 7 ++++++ tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 6 +++++ tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 7 ++++++ .../qemu_7.0.0-virt.aarch64.xml | 7 ++++++ tests/domaincapsdata/qemu_7.0.0.aarch64.xml | 7 ++++++ tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 6 +++++ tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 7 ++++++ .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 7 ++++++ tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 7 ++++++ .../caps_4.2.0.x86_64.xml | 1 + .../caps_5.0.0.riscv64.xml | 1 + .../caps_5.0.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 + .../caps_5.1.0.x86_64.xml | 1 + .../caps_5.2.0.riscv64.xml | 1 + .../caps_5.2.0.x86_64.xml | 1 + .../caps_6.0.0.x86_64.xml | 1 + .../caps_6.1.0.x86_64.xml | 1 + .../caps_6.2.0.aarch64.xml | 1 + .../caps_6.2.0.x86_64.xml | 1 + .../caps_7.0.0.aarch64.xml | 1 + .../caps_7.0.0.x86_64.xml | 1 + .../caps_7.1.0.x86_64.xml | 1 + 68 files changed, 408 insertions(+) diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst index 557b61bf26..38db50fb0d 100644 --- a/docs/formatdomaincaps.rst +++ b/docs/formatdomaincaps.rst @@ -551,6 +551,30 @@ USB redirdev device capabilities are exposed under the ``redirdev`` element. For ``bus`` Options for the ``bus`` attribute of the ``<redirdev/>`` element. +Channel device +^^^^^^^^^^^^^^ + +Channel device capabilities are exposed under the ``channel`` element. For instance: + +:: + + <domainCapabilities> + ... + <devices> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel + ... + </devices> + </domainCapabilities> + +``type`` + Options for the ``type`` attribute of the ``<channel/>`` element. + Features ~~~~~~~~ diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 9cb1dbe7bd..d9d18a2a0b 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -571,6 +571,18 @@ virDomainCapsDeviceRedirdevFormat(virBuffer *buf, } +static void +virDomainCapsDeviceChannelFormat(virBuffer *buf, + const virDomainCapsDeviceChannel *channel) +{ + FORMAT_PROLOGUE(channel); + + ENUM_PROCESS(channel, type, virDomainChrTypeToString); + + FORMAT_EPILOGUE(channel); +} + + /** * virDomainCapsFeatureGICFormat: * @buf: target buffer @@ -685,6 +697,7 @@ virDomainCapsFormat(const virDomainCaps *caps) virDomainCapsDeviceFilesystemFormat(&buf, &caps->filesystem); virDomainCapsDeviceTPMFormat(&buf, &caps->tpm); virDomainCapsDeviceRedirdevFormat(&buf, &caps->redirdev); + virDomainCapsDeviceChannelFormat(&buf, &caps->channel); virBufferAdjustIndent(&buf, -2); virBufferAddLit(&buf, "</devices>\n"); diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index de2a89c963..5023840e21 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -137,6 +137,13 @@ struct _virDomainCapsDeviceRedirdev { virDomainCapsEnum bus; /* virDomainRedirdevBus */ }; +STATIC_ASSERT_ENUM(VIR_DOMAIN_CHR_TYPE_LAST); +typedef struct _virDomainCapsDeviceChannel virDomainCapsDeviceChannel; +struct _virDomainCapsDeviceChannel { + virTristateBool supported; + virDomainCapsEnum type; /* virDomainChrType */ +}; + STATIC_ASSERT_ENUM(VIR_DOMAIN_FS_DRIVER_TYPE_LAST); typedef struct _virDomainCapsDeviceFilesystem virDomainCapsDeviceFilesystem; struct _virDomainCapsDeviceFilesystem { @@ -233,6 +240,7 @@ struct _virDomainCaps { virDomainCapsDeviceFilesystem filesystem; virDomainCapsDeviceTPM tpm; virDomainCapsDeviceRedirdev redirdev; + virDomainCapsDeviceChannel channel; /* add new domain devices here */ virDomainCapsFeatureGIC gic; diff --git a/src/conf/schemas/domaincaps.rng b/src/conf/schemas/domaincaps.rng index 8da3fbb352..35b8f41b07 100644 --- a/src/conf/schemas/domaincaps.rng +++ b/src/conf/schemas/domaincaps.rng @@ -198,6 +198,9 @@ <optional> <ref name="redirdev"/> </optional> + <optional> + <ref name="channel"/> + </optional> </element> </define> @@ -257,6 +260,13 @@ </element> </define> + <define name="channel"> + <element name="channel"> + <ref name="supported"/> + <ref name="enum"/> + </element> + </define> + <define name="features"> <element name="features"> <optional> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7d99050fa9..e894424652 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1394,6 +1394,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "s390-pv-guest", QEMU_CAPS_S390_PV_GUEST }, { "virtio-mem-pci", QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI }, { "virtio-iommu-pci", QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI }, + { "chardev-spicevmc", X_QEMU_CAPS_CHARDEV_SPICEVMC }, }; @@ -6356,6 +6357,19 @@ virQEMUCapsFillDomainDeviceRedirdevCaps(virQEMUCaps *qemuCaps, } +void +virQEMUCapsFillDomainDeviceChannelCaps(virQEMUCaps *qemuCaps, + virDomainCapsDeviceChannel *channel) +{ + channel->supported = VIR_TRISTATE_BOOL_YES; + channel->type.report = true; + VIR_DOMAIN_CAPS_ENUM_SET(channel->type, + VIR_DOMAIN_CHR_TYPE_PTY, VIR_DOMAIN_CHR_TYPE_UNIX); + + if (virQEMUCapsGet(qemuCaps, X_QEMU_CAPS_CHARDEV_SPICEVMC)) + VIR_DOMAIN_CAPS_ENUM_SET(channel->type, VIR_DOMAIN_CHR_TYPE_SPICEVMC); +} + /** * virQEMUCapsSupportsGICVersion: @@ -6493,6 +6507,7 @@ virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps, virDomainCapsDeviceFilesystem *filesystem = &domCaps->filesystem; virDomainCapsDeviceTPM *tpm = &domCaps->tpm; virDomainCapsDeviceRedirdev *redirdev = &domCaps->redirdev; + virDomainCapsDeviceChannel *channel = &domCaps->channel; virDomainCapsMemoryBacking *memoryBacking = &domCaps->memoryBacking; virQEMUCapsFillDomainFeaturesFromQEMUCaps(qemuCaps, domCaps); @@ -6526,6 +6541,7 @@ virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps, virQEMUCapsFillDomainDeviceFSCaps(qemuCaps, filesystem); virQEMUCapsFillDomainDeviceTPMCaps(qemuCaps, tpm); virQEMUCapsFillDomainDeviceRedirdevCaps(qemuCaps, redirdev); + virQEMUCapsFillDomainDeviceChannelCaps(qemuCaps, channel); virQEMUCapsFillDomainFeatureGICCaps(qemuCaps, domCaps); virQEMUCapsFillDomainFeatureSEVCaps(qemuCaps, domCaps); virQEMUCapsFillDomainFeatureS390PVCaps(qemuCaps, domCaps); diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 85b989368f..33263ad0aa 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -833,6 +833,9 @@ void virQEMUCapsFillDomainDeviceTPMCaps(virQEMUCaps *qemuCaps, void virQEMUCapsFillDomainDeviceRedirdevCaps(virQEMUCaps *qemuCaps, virDomainCapsDeviceRedirdev *redirdev); +void virQEMUCapsFillDomainDeviceChannelCaps(virQEMUCaps *qemuCaps, + virDomainCapsDeviceChannel *channel); + bool virQEMUCapsGuestIsNative(virArch host, virArch guest); diff --git a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml index a39ada0182..c4524d800a 100644 --- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml @@ -221,6 +221,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml index e054993aaf..f384c5a822 100644 --- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml @@ -236,6 +236,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml index 579ca0eed7..a7a415e112 100644 --- a/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-virt.aarch64.xml @@ -166,6 +166,12 @@ </filesystem> <tpm supported='no'/> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_4.2.0.aarch64.xml b/tests/domaincapsdata/qemu_4.2.0.aarch64.xml index 1632c85d7a..ea93e248c1 100644 --- a/tests/domaincapsdata/qemu_4.2.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_4.2.0.aarch64.xml @@ -164,6 +164,12 @@ </filesystem> <tpm supported='no'/> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0.ppc64.xml b/tests/domaincapsdata/qemu_4.2.0.ppc64.xml index 909feac47c..2258d4e83b 100644 --- a/tests/domaincapsdata/qemu_4.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_4.2.0.ppc64.xml @@ -137,6 +137,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0.s390x.xml b/tests/domaincapsdata/qemu_4.2.0.s390x.xml index 1c3877ec0c..10f096d4f7 100644 --- a/tests/domaincapsdata/qemu_4.2.0.s390x.xml +++ b/tests/domaincapsdata/qemu_4.2.0.s390x.xml @@ -243,6 +243,12 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml index 666a974489..2f79d16197 100644 --- a/tests/domaincapsdata/qemu_4.2.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0.x86_64.xml @@ -221,6 +221,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml index e6625bcdbc..58bc2f01ab 100644 --- a/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml @@ -223,6 +223,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml index 9e1ffe3a4d..6363589806 100644 --- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml @@ -238,6 +238,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml index 631bb6b15f..1df5f0c873 100644 --- a/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml @@ -178,6 +178,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_5.0.0.aarch64.xml b/tests/domaincapsdata/qemu_5.0.0.aarch64.xml index dcf8d22806..50a48f3f19 100644 --- a/tests/domaincapsdata/qemu_5.0.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_5.0.0.aarch64.xml @@ -176,6 +176,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml index fcfc2266d2..82405aa464 100644 --- a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml @@ -143,6 +143,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml index f08278cfbf..a6d55951a6 100644 --- a/tests/domaincapsdata/qemu_5.0.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0.x86_64.xml @@ -223,6 +223,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml index 814f81defc..d0528ac9d5 100644 --- a/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml @@ -224,6 +224,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml index 6391383da7..be5a3fc7ab 100644 --- a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml @@ -238,6 +238,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.1.0.sparc.xml b/tests/domaincapsdata/qemu_5.1.0.sparc.xml index ea4d1d28dd..5bbf4720dc 100644 --- a/tests/domaincapsdata/qemu_5.1.0.sparc.xml +++ b/tests/domaincapsdata/qemu_5.1.0.sparc.xml @@ -110,6 +110,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.1.0.x86_64.xml b/tests/domaincapsdata/qemu_5.1.0.x86_64.xml index 5dd7efe165..0bece4e96c 100644 --- a/tests/domaincapsdata/qemu_5.1.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.1.0.x86_64.xml @@ -224,6 +224,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml index 8b4c1dd954..605665e67b 100644 --- a/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.2.0-q35.x86_64.xml @@ -224,6 +224,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml index 3306a14ba0..978ed38684 100644 --- a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml @@ -238,6 +238,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml index 4571622c4c..2140650fc6 100644 --- a/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_5.2.0-virt.aarch64.xml @@ -178,6 +178,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml index dcf8d22806..50a48f3f19 100644 --- a/tests/domaincapsdata/qemu_5.2.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_5.2.0.aarch64.xml @@ -176,6 +176,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml index bc43fb6a38..818031df4e 100644 --- a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml @@ -143,6 +143,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0.s390x.xml b/tests/domaincapsdata/qemu_5.2.0.s390x.xml index 041c1ede15..1b915d9bd3 100644 --- a/tests/domaincapsdata/qemu_5.2.0.s390x.xml +++ b/tests/domaincapsdata/qemu_5.2.0.s390x.xml @@ -245,6 +245,12 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml index 6147fc84b8..aeec10fe90 100644 --- a/tests/domaincapsdata/qemu_5.2.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.2.0.x86_64.xml @@ -224,6 +224,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml index 3e36847385..253375faa6 100644 --- a/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.0.0-q35.x86_64.xml @@ -226,6 +226,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml index d622f67ef3..9e419da2d4 100644 --- a/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.0.0-tcg.x86_64.xml @@ -240,6 +240,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml index 9bf854869f..07ace92151 100644 --- a/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_6.0.0-virt.aarch64.xml @@ -180,6 +180,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml index fbd48cac00..7a9563e64d 100644 --- a/tests/domaincapsdata/qemu_6.0.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_6.0.0.aarch64.xml @@ -178,6 +178,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0.s390x.xml b/tests/domaincapsdata/qemu_6.0.0.s390x.xml index 880ea5062a..62701d9a2e 100644 --- a/tests/domaincapsdata/qemu_6.0.0.s390x.xml +++ b/tests/domaincapsdata/qemu_6.0.0.s390x.xml @@ -246,6 +246,12 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml index 84e575829d..9d448f5b8b 100644 --- a/tests/domaincapsdata/qemu_6.0.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.0.0.x86_64.xml @@ -226,6 +226,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml index a25fa7bacc..bb435213e7 100644 --- a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml @@ -227,6 +227,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml index 2972e119e7..353fa2b2d8 100644 --- a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml @@ -240,6 +240,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml index 60da420044..c3e104af34 100644 --- a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml @@ -227,6 +227,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml index 61d43e6599..82a351a1e5 100644 --- a/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.2.0-q35.x86_64.xml @@ -227,6 +227,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml index 057a67c034..48f5f7a930 100644 --- a/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.2.0-tcg.x86_64.xml @@ -241,6 +241,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml index 2843599b57..e0b8f22cfd 100644 --- a/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_6.2.0-virt.aarch64.xml @@ -186,6 +186,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml index 45806a8f10..3b466685a0 100644 --- a/tests/domaincapsdata/qemu_6.2.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_6.2.0.aarch64.xml @@ -184,6 +184,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml index cc3a45618c..a9d1083288 100644 --- a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml @@ -142,6 +142,12 @@ </enum> </tpm> <redirdev supported='no'/> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml index 56fae62434..d54ccd4355 100644 --- a/tests/domaincapsdata/qemu_6.2.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_6.2.0.x86_64.xml @@ -227,6 +227,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml index 5e4d4d48da..e20dd2d448 100644 --- a/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.0.0-q35.x86_64.xml @@ -228,6 +228,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml index 8a18d45fca..c88ce551cd 100644 --- a/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.0.0-tcg.x86_64.xml @@ -242,6 +242,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml b/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml index 8e3313f383..4975a898c8 100644 --- a/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml +++ b/tests/domaincapsdata/qemu_7.0.0-virt.aarch64.xml @@ -185,6 +185,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='yes'> diff --git a/tests/domaincapsdata/qemu_7.0.0.aarch64.xml b/tests/domaincapsdata/qemu_7.0.0.aarch64.xml index f25ab0b796..9a23202eb8 100644 --- a/tests/domaincapsdata/qemu_7.0.0.aarch64.xml +++ b/tests/domaincapsdata/qemu_7.0.0.aarch64.xml @@ -183,6 +183,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml index c43c63c741..e6d60c6eba 100644 --- a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml @@ -147,6 +147,12 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.0.0.x86_64.xml b/tests/domaincapsdata/qemu_7.0.0.x86_64.xml index 410cc84977..e7fb5bdc55 100644 --- a/tests/domaincapsdata/qemu_7.0.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.0.0.x86_64.xml @@ -228,6 +228,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml index 3b5a846342..5d38d864eb 100644 --- a/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.1.0-q35.x86_64.xml @@ -227,6 +227,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml index dd7b8c2ab9..21fb87de51 100644 --- a/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.1.0-tcg.x86_64.xml @@ -240,6 +240,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/domaincapsdata/qemu_7.1.0.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0.x86_64.xml index d8c83e03f3..dac73a91f1 100644 --- a/tests/domaincapsdata/qemu_7.1.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_7.1.0.x86_64.xml @@ -227,6 +227,13 @@ <value>usb</value> </enum> </redirdev> + <channel supported='yes'> + <enum name='type'> + <value>pty</value> + <value>unix</value> + <value>spicevmc</value> + </enum> + </channel> </devices> <features> <gic supported='no'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml index c5a7a7e9dc..0c1573912e 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -10,6 +10,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml index ec74c80bc4..b5d4958daf 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -8,6 +8,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index a8706a1b65..e756864903 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -10,6 +10,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml index dabf2f505f..3a1b1bd1ee 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml @@ -5,6 +5,7 @@ <selfvers>0</selfvers> <flag name='sdl'/> <flag name='spice'/> + <flag name='chardev-spicevmc'/> <flag name='usb-redir'/> <flag name='scsi-disk.channel'/> <flag name='scsi-block'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml index becfb1788d..81f189ed2b 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -10,6 +10,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml index b7ad59760e..57f523e478 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -8,6 +8,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index 4ef0efdcd0..624828b990 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -10,6 +10,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index f2fd699bfc..52b903c19d 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -10,6 +10,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index e5cb039901..aefdb41e04 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -10,6 +10,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml index 0067b7ba8b..c8a4746665 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -9,6 +9,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index 3b2fd0eac8..c0e9925bec 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -10,6 +10,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml index 2b4deea5f1..5cf7abbb45 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -9,6 +9,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml index f168ec4e6b..6a1b60af08 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -10,6 +10,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml index de961e0569..0dc4856b02 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -10,6 +10,7 @@ <flag name='hda-duplex'/> <flag name='ccid-emulated'/> <flag name='ccid-passthru'/> + <flag name='chardev-spicevmc'/> <flag name='piix3-usb-uhci'/> <flag name='piix4-usb-uhci'/> <flag name='usb-ehci'/> -- 2.37.1

domcapabilities reports spice graphics support even against a minimal qemu installation without spice modules. Checking for 'query-spice' in the list of qmp commands supported by qemu is not sufficient to determine spice support. Checking the command line produces acurrate results. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/qemu/qemu_capabilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e894424652..36e10d6e45 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1205,7 +1205,6 @@ struct virQEMUCapsStringFlags { struct virQEMUCapsStringFlags virQEMUCapsCommands[] = { - { "query-spice", QEMU_CAPS_SPICE }, { "query-vnc", QEMU_CAPS_VNC }, { "nbd-server-start", QEMU_CAPS_NBD_SERVER }, { "rtc-reset-reinjection", QEMU_CAPS_RTC_RESET_REINJECTION }, @@ -3271,6 +3270,7 @@ struct virQEMUCapsCommandLineProps { static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = { { "fsdev", "multidevs", QEMU_CAPS_FSDEV_MULTIDEVS }, { "sandbox", NULL, QEMU_CAPS_SECCOMP_SANDBOX }, + { "spice", NULL, QEMU_CAPS_SPICE }, { "spice", "gl", QEMU_CAPS_SPICE_GL }, { "spice", "rendernode", QEMU_CAPS_SPICE_RENDERNODE }, { "vnc", "power-control", QEMU_CAPS_VNC_POWER_CONTROL }, -- 2.37.1

On 9/6/22 14:42, Jim Fehlig wrote:
The first two patches add USB redirect and channel devices to domcapabilities. Patch3 fixes reporting of spice support.
Patch1 was sent previously, before I noticed the others were needed
Another capability I'd like to expose is the functionality provided by qemu's audio-spice module, which IIUC is essentially `-audiodev spice`. After peeking at the qmp ref manual [1] I expected to find an "audiodev" object, however # virsh qemu-monitor-command test \ --cmd '{"execute":"qom-list-types"}' | grep -i audiodev # # virsh qemu-monitor-command test --cmd \ '{"execute":"qom-list-properties","arguments":{"typename":"audiodev"}}' {"id":"libvirt-411","error":{"class":"DeviceNotFound","desc":"Class 'audiodev' not found"}} # virsh qemu-monitor-command test --cmd \ '{"execute":"device-list-properties","arguments":{"typename":"audiodev"}}' {"id":"libvirt-412","error":{"class":"DeviceNotFound","desc":"Device 'audiodev' not found"}} Command line help is not available either, which spawned Claudio's qemu patch [2] # qemu-system-x86_64 -audiodev help qemu-system-x86_64: -audiodev help: Help is not available for this option Have I overlooked alternatives for detecting `-audiodev spice` support? Thanks! Jim [1] https://qemu-project.gitlab.io/qemu/interop/qemu-qmp-ref.html#qapidoc-3005 [2] https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg01181.html

On Wed, Sep 07, 2022 at 15:20:44 -0600, Jim Fehlig wrote:
On 9/6/22 14:42, Jim Fehlig wrote:
The first two patches add USB redirect and channel devices to domcapabilities. Patch3 fixes reporting of spice support.
Patch1 was sent previously, before I noticed the others were needed
Another capability I'd like to expose is the functionality provided by qemu's audio-spice module, which IIUC is essentially `-audiodev spice`. After peeking at the qmp ref manual [1] I expected to find an "audiodev" object, however
# virsh qemu-monitor-command test \ --cmd '{"execute":"qom-list-types"}' | grep -i audiodev # # virsh qemu-monitor-command test --cmd \ '{"execute":"qom-list-properties","arguments":{"typename":"audiodev"}}' {"id":"libvirt-411","error":{"class":"DeviceNotFound","desc":"Class 'audiodev' not found"}} # virsh qemu-monitor-command test --cmd \ '{"execute":"device-list-properties","arguments":{"typename":"audiodev"}}' {"id":"libvirt-412","error":{"class":"DeviceNotFound","desc":"Device 'audiodev' not found"}}
Command line help is not available either, which spawned Claudio's qemu patch [2]
# qemu-system-x86_64 -audiodev help qemu-system-x86_64: -audiodev help: Help is not available for this option
In cases where a command line option parser in qemu was implemented via the modern QOM based approach, but at the same time is not runtime configurable or queryable via the monitor it's not possible for libvirt to detect the options. Historically command line arguments could be queried via 'query-command-line-options' command but that was deemed to be un-extendible and new code is not getting coverage. At the same time libvirt is trying to decrease the reliance on the command to allow deprecation and promote some form of replacement. We had a similar problem for graphics options, which was side-stepped by implementing 'query-display-options' which in turn exposed all the objects in the QMP schema (query-qmp-schema) which allowed us to detet graphics related functionality. At this point we e.g. assume that the modern -audiodev is present. For few specific configs we validate that the appropriate graphics protocol is used for the VM but don't validate anything else. For your specific query, the spice backend for audio is allowed only when spice video is enabled anyways, so the capability you are suggesting does not seem to be that much interesting as the decision can be based on the graphics protocol support.

On 9/8/22 01:52, Peter Krempa wrote:
On Wed, Sep 07, 2022 at 15:20:44 -0600, Jim Fehlig wrote:
On 9/6/22 14:42, Jim Fehlig wrote:
The first two patches add USB redirect and channel devices to domcapabilities. Patch3 fixes reporting of spice support.
Patch1 was sent previously, before I noticed the others were needed
Another capability I'd like to expose is the functionality provided by qemu's audio-spice module, which IIUC is essentially `-audiodev spice`. After peeking at the qmp ref manual [1] I expected to find an "audiodev" object, however
# virsh qemu-monitor-command test \ --cmd '{"execute":"qom-list-types"}' | grep -i audiodev # # virsh qemu-monitor-command test --cmd \ '{"execute":"qom-list-properties","arguments":{"typename":"audiodev"}}' {"id":"libvirt-411","error":{"class":"DeviceNotFound","desc":"Class 'audiodev' not found"}} # virsh qemu-monitor-command test --cmd \ '{"execute":"device-list-properties","arguments":{"typename":"audiodev"}}' {"id":"libvirt-412","error":{"class":"DeviceNotFound","desc":"Device 'audiodev' not found"}}
Command line help is not available either, which spawned Claudio's qemu patch [2]
# qemu-system-x86_64 -audiodev help qemu-system-x86_64: -audiodev help: Help is not available for this option
In cases where a command line option parser in qemu was implemented via the modern QOM based approach, but at the same time is not runtime configurable or queryable via the monitor it's not possible for libvirt to detect the options.
Historically command line arguments could be queried via 'query-command-line-options' command but that was deemed to be un-extendible and new code is not getting coverage. At the same time libvirt is trying to decrease the reliance on the command to allow deprecation and promote some form of replacement.
We had a similar problem for graphics options, which was side-stepped by implementing 'query-display-options' which in turn exposed all the objects in the QMP schema (query-qmp-schema) which allowed us to detet graphics related functionality.
At this point we e.g. assume that the modern -audiodev is present. For few specific configs we validate that the appropriate graphics protocol is used for the VM but don't validate anything else.
For your specific query, the spice backend for audio is allowed only when spice video is enabled anyways, so the capability you are suggesting does not seem to be that much interesting as the decision can be based on the graphics protocol support.
IIUC, it is possible to have a qemu installation with spice video support but without the audio-spice module. If that is the case, seems we need to report the available audio backends in domcaps. Regards, Jim

On Thu, Sep 08, 2022 at 13:18:19 -0600, Jim Fehlig wrote:
On 9/8/22 01:52, Peter Krempa wrote:
On Wed, Sep 07, 2022 at 15:20:44 -0600, Jim Fehlig wrote:
On 9/6/22 14:42, Jim Fehlig wrote:
[...]
In cases where a command line option parser in qemu was implemented via the modern QOM based approach, but at the same time is not runtime configurable or queryable via the monitor it's not possible for libvirt to detect the options.
Historically command line arguments could be queried via 'query-command-line-options' command but that was deemed to be un-extendible and new code is not getting coverage. At the same time libvirt is trying to decrease the reliance on the command to allow deprecation and promote some form of replacement.
We had a similar problem for graphics options, which was side-stepped by implementing 'query-display-options' which in turn exposed all the objects in the QMP schema (query-qmp-schema) which allowed us to detet graphics related functionality.
At this point we e.g. assume that the modern -audiodev is present. For few specific configs we validate that the appropriate graphics protocol is used for the VM but don't validate anything else.
For your specific query, the spice backend for audio is allowed only when spice video is enabled anyways, so the capability you are suggesting does not seem to be that much interesting as the decision can be based on the graphics protocol support.
IIUC, it is possible to have a qemu installation with spice video support but without the audio-spice module. If that is the case, seems we need to report the available audio backends in domcaps.
Well, I'd reckon that in most cases this will be "administratively" solved by simply packaging spice audio together with the graphics protocol. Anyways, at this point it doesn't seem to be possible to introspect the presence of that feature. Luckily the domain capabilities allow tristate logic reasonably since once qemu adds the introspectability we'll have to assume that versions which don't allow introspection may support the audio-spice backend. Regarding qemu adding introspectability I think it will not be that straightforward though. Specifically retrofitting it into query-command-line-options as well as adding a dummy query command (similarly to 'query-display-options') may be frowned upon [1], and I'm not sure how the things are with the qapified command option schema. [1] https://lists.nongnu.org/archive/html/qemu-devel/2018-11/msg05162.html

On 9/6/22 14:42, Jim Fehlig wrote:
The first two patches add USB redirect and channel devices to domcapabilities. Patch3 fixes reporting of spice support.
Hi All! Any comments on this series? Regards, Jim
Patch1 was sent previously, before I noticed the others were needed
https://listman.redhat.com/archives/libvir-list/2022-August/234045.html
Jim Fehlig (3): conf: Add USB redirect devices to domain capabilities conf: Add channel devices to domain capabilities qemu: Use command line to properly check for spice support
docs/formatdomaincaps.rst | 46 +++++++++++++++++++ src/conf/domain_capabilities.c | 26 +++++++++++ src/conf/domain_capabilities.h | 16 +++++++ src/conf/schemas/domaincaps.rng | 20 ++++++++ src/qemu/qemu_capabilities.c | 35 +++++++++++++- src/qemu/qemu_capabilities.h | 6 +++ .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 12 +++++ .../qemu_4.2.0-virt.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 7 +++ tests/domaincapsdata/qemu_4.2.0.s390x.xml | 11 +++++ tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 12 +++++ .../qemu_5.0.0-virt.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 7 +++ tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 12 +++++ tests/domaincapsdata/qemu_5.1.0.sparc.xml | 12 +++++ tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 12 +++++ .../qemu_5.2.0-virt.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_5.2.0.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 7 +++ tests/domaincapsdata/qemu_5.2.0.s390x.xml | 11 +++++ tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 12 +++++ .../qemu_6.0.0-virt.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_6.0.0.aarch64.xml | 7 +++ tests/domaincapsdata/qemu_6.0.0.s390x.xml | 11 +++++ tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 12 +++++ tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 12 +++++ .../qemu_6.2.0-virt.aarch64.xml | 12 +++++ tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 12 +++++ tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 7 +++ tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 12 +++++ .../qemu_7.0.0-virt.aarch64.xml | 12 +++++ tests/domaincapsdata/qemu_7.0.0.aarch64.xml | 12 +++++ tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 11 +++++ tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 12 +++++ .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 12 +++++ tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 12 +++++ .../caps_4.2.0.x86_64.xml | 1 + .../caps_5.0.0.riscv64.xml | 1 + .../caps_5.0.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 + .../caps_5.1.0.x86_64.xml | 1 + .../caps_5.2.0.riscv64.xml | 1 + .../caps_5.2.0.x86_64.xml | 1 + .../caps_6.0.0.x86_64.xml | 1 + .../caps_6.1.0.x86_64.xml | 1 + .../caps_6.2.0.aarch64.xml | 1 + .../caps_6.2.0.x86_64.xml | 1 + .../caps_7.0.0.aarch64.xml | 1 + .../caps_7.0.0.x86_64.xml | 1 + .../caps_7.1.0.x86_64.xml | 1 + 68 files changed, 674 insertions(+), 1 deletion(-)
participants (2)
-
Jim Fehlig
-
Peter Krempa