[PATCH V3] conf: Add channel devices to domain capabilities
by Jim Fehlig
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(a)suse.com>
---
V2:
https://listman.redhat.com/archives/libvir-list/2022-October/234840.html
New in V3:
- rebased to current master
- use existing QEMU_CAPS_SPICE for spicevmc channel device
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 | 15 ++++++++++++
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.ppc64.xml | 6 +++++
tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 7 ++++++
55 files changed, 399 insertions(+)
diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst
index 93d36f2702..f95d3a7083 100644
--- a/docs/formatdomaincaps.rst
+++ b/docs/formatdomaincaps.rst
@@ -565,6 +565,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 f8b2f88376..a7f256e4ec 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -574,6 +574,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
@@ -688,6 +700,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 ba7c2a5e42..e0cfa75531 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 {
@@ -234,6 +241,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 cf7a1d1d89..a6747b20ef 100644
--- a/src/conf/schemas/domaincaps.rng
+++ b/src/conf/schemas/domaincaps.rng
@@ -201,6 +201,9 @@
<optional>
<ref name="redirdev"/>
</optional>
+ <optional>
+ <ref name="channel"/>
+ </optional>
</element>
</define>
@@ -260,6 +263,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 40da6f1b50..0f34957998 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -6347,6 +6347,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, QEMU_CAPS_SPICE))
+ VIR_DOMAIN_CAPS_ENUM_SET(channel->type, VIR_DOMAIN_CHR_TYPE_SPICEVMC);
+}
+
/**
* virQEMUCapsSupportsGICVersion:
@@ -6484,6 +6497,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);
@@ -6517,6 +6531,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 051bfbc0a1..4edbb5d40f 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 5b83883e39..def80fe8cd 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 ab55ec2452..9e920d1ccb 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 e0af576d5c..776173e60e 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 61839a1983..b6711fc3a4 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 1626d9b186..88790451b0 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 ee07f4c274..fa416af038 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 a6eaf7962f..ed9de89dfa 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 232f1f0e12..af0335eb3a 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 ce2c08f205..fc09e9ff28 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 9215371d0c..88bc77f50b 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 fcc77ad8db..5e030047d1 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 711ccc2cb0..0c5aaade40 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 f52613f584..5b2a0bc83d 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 542d32b018..fb9f69bb9a 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 8bd5c6073c..ea31348ab1 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 5c48efc8c6..584dad5a89 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 70c4f3cbd1..f1d20991e9 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 636a84e55f..cec260f56d 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 900d10f720..be7262211c 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 fcc77ad8db..5e030047d1 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 99c2767276..9367738157 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 bdade9c5bb..adc197648f 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 db22085e31..a3707e6804 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 395eb3b9eb..7edb84e9bc 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 769a1147b6..cc0bfcac2d 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 2f56e36c28..db9b45d74e 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 4639a84c1d..1a65156544 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 25abcac608..56d87f7a2f 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 2be8f3e33b..3afab2f4c2 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 f23e758b1a..d0dbadd6d3 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 f78abdefc5..52071fc2c5 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 9de18c682e..17c30b394d 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 dff92d65aa..c185ae4510 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 f027eb25a5..7bebc1f8b2 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 c572b0481c..3d79cd7486 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 eb521a0cfa..4ccffb3695 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 7797b94cf2..ba7bc17a98 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 aff2ee6662..ba40728489 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 e70b0990a7..94c6f3d712 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 03c5411c4e..c6a02b6512 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 59f89afd9b..3addb1fc57 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 1e6bf544dc..9f07a10a90 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 76da1f4f7d..ed6c74aac1 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 da23f5703a..5913f44937 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 05b36ee79e..2d76581915 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 0786cd8430..c0b59c0d44 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.ppc64.xml b/tests/domaincapsdata/qemu_7.1.0.ppc64.xml
index d430e54caa..a5c2d8e598 100644
--- a/tests/domaincapsdata/qemu_7.1.0.ppc64.xml
+++ b/tests/domaincapsdata/qemu_7.1.0.ppc64.xml
@@ -140,6 +140,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.1.0.x86_64.xml b/tests/domaincapsdata/qemu_7.1.0.x86_64.xml
index ae67a16947..a419005ee3 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'/>
--
2.37.3
2 years, 6 months
[PATCH V2 0/3] domain capabilites improvements
by Jim Fehlig
A V2 of
https://listman.redhat.com/archives/libvir-list/2022-September/234189.html
Although not much has changed beyond a rebase to current master
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.3
2 years, 6 months
[PATCH 0/2] qemu: Create base hugepages path on memory hotplug
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (2):
qemu: Separate out hugepages basedir making
qemu: Create base hugepages path on memory hotplug
src/qemu/qemu_conf.c | 27 +++++++++++++++++++++++++++
src/qemu/qemu_conf.h | 3 +++
src/qemu/qemu_driver.c | 17 +----------------
src/qemu/qemu_process.c | 4 ++++
4 files changed, 35 insertions(+), 16 deletions(-)
--
2.35.1
2 years, 6 months
[PATCH] qemu: validate: Clarify error messages for unsupported 3d video acceleration
by Peter Krempa
The error message doesn't really convey the information that 3d
acceleration works only for the 'virtio' model and similarly the same
error would be reported if qemu doesn't support acceleration, which is
hard to debug.
Split and clarify the errors.
Noticed in https://gitlab.com/libvirt/libvirt/-/issues/388
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_validate.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index cb4e32c0ff..079009ea4b 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -2765,15 +2765,20 @@ qemuValidateDomainDeviceDefVideo(const virDomainVideoDef *video,
return -1;
}
} else if (video->accel) {
- if (video->accel->accel3d == VIR_TRISTATE_BOOL_YES &&
- (video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO ||
- !(virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL) ||
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_GL_PCI) ||
- virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_VGA_GL)))) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("%s 3d acceleration is not supported"),
- virDomainVideoTypeToString(video->type));
- return -1;
+ if (video->accel->accel3d == VIR_TRISTATE_BOOL_YES) {
+ if (video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("3d acceleration is supported only with 'virtio' video device"));
+ return -1;
+ }
+
+ if (!(virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_GL_PCI) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_VGA_GL))) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("3d acceleration is not supported by this QEMU binary"));
+ return -1;
+ }
}
}
--
2.37.3
2 years, 6 months
[PATCH 0/3] ppc64: QEMU 7.1 caps + use CAPS_LATEST in xml2argv
by Daniel Henrique Barboza
Hi,
This series updates the remaining pseries tests in qemuxml2argvtest.c to
use CAPS_LATEST instead of using a capability list for each test.
First patch is the usual capability bump for the new QEMU release.
Second patch converts the most simple cases of DO_TEST() to use
DO_TEST_CAPS_LATEST(). The patch is rather big but the changes are
trivial.
Third patch is a change I figured it was worth making to avoid using
DO_TEST() in the pseries feature parse error tests.
After applying this series, there is no more DO_TEST() tests with
'pseries' in the name in qemuxml2argvtest.c.
Daniel Henrique Barboza (3):
tests: qemucapabilities: bump ppc64 caps with qemu 7.1.0
tests: change qemuxml2argv pseries tests to TEST_CAPS_LATEST
tests: refactor pseries features parse failure tests
tests/domaincapsdata/qemu_7.1.0.ppc64.xml | 147 +
.../caps_7.1.0.ppc64.replies | 35113 ++++++++++++++++
.../qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 1109 +
...s.args => pseries-basic.ppc64-latest.args} | 11 +-
.../pseries-console-native.args | 1 -
.../pseries-console-native.ppc64-latest.args | 1 +
... pseries-console-virtio.ppc64-latest.args} | 11 +-
...s => pseries-cpu-compat.ppc64-latest.args} | 10 +-
...gs => pseries-cpu-exact.ppc64-latest.args} | 10 +-
....args => pseries-cpu-le.ppc64-latest.args} | 11 +-
...es-default-phb-numa-node.ppc64-latest.err} | 0
.../qemuxml2argvdata/pseries-features-ccf.xml | 15 +-
.../pseries-features-cfpc.xml | 15 +-
.../pseries-features-hpt-pagesize.xml | 17 +-
.../qemuxml2argvdata/pseries-features-htm.xml | 15 +-
.../qemuxml2argvdata/pseries-features-ibs.xml | 15 +-
.../pseries-features-nested-hv.xml | 15 +-
.../pseries-features-sbbc.xml | 15 +-
...rgs => pseries-features.ppc64-latest.args} | 7 +-
.../pseries-hostdevs-1.ppc64-latest.args | 36 +
.../pseries-hostdevs-2.ppc64-latest.args | 36 +
.../qemuxml2argvdata/pseries-hostdevs-3.args | 32 -
.../pseries-hostdevs-3.ppc64-latest.args | 35 +
.../pseries-many-buses-1.args | 30 -
...=> pseries-many-buses-1.ppc64-latest.args} | 14 +-
.../pseries-many-buses-2.args | 30 -
...=> pseries-many-buses-2.ppc64-latest.args} | 14 +-
.../pseries-many-devices.args | 61 -
.../pseries-many-devices.ppc64-latest.args | 64 +
...m.args => pseries-nvram.ppc64-latest.args} | 9 +-
...=> pseries-panic-address.ppc64-latest.err} | 0
.../pseries-panic-missing.ppc64-latest.args | 34 +
...pseries-panic-no-address.ppc64-latest.args | 34 +
.../pseries-phb-default-missing.args | 30 -
...ies-phb-default-missing.ppc64-latest.args} | 12 +-
...> pseries-phb-numa-node.ppc64-latest.args} | 16 +-
.../qemuxml2argvdata/pseries-phb-simple.args | 30 -
...s => pseries-phb-simple.ppc64-latest.args} | 12 +-
.../pseries-serial+console-native.args | 1 -
...es-serial+console-native.ppc64-latest.args | 1 +
.../pseries-serial-compat.args | 1 -
.../pseries-serial-compat.ppc64-latest.args | 1 +
...> pseries-serial-native.ppc64-latest.args} | 9 +-
...s => pseries-serial-pci.ppc64-latest.args} | 9 +-
...s => pseries-serial-usb.ppc64-latest.args} | 11 +-
.../qemuxml2argvdata/pseries-usb-default.args | 31 -
.../pseries-usb-default.ppc64-latest.args | 34 +
tests/qemuxml2argvdata/pseries-usb-kbd.args | 32 -
.../pseries-usb-kbd.ppc64-latest.args | 35 +
tests/qemuxml2argvdata/pseries-usb-multi.args | 32 -
.../pseries-usb-multi.ppc64-latest.args | 35 +
...eries-vio-user-assigned.ppc64-latest.args} | 19 +-
...ned.args => pseries-vio.ppc64-latest.args} | 19 +-
tests/qemuxml2argvtest.c | 213 +-
54 files changed, 36978 insertions(+), 572 deletions(-)
create mode 100644 tests/domaincapsdata/qemu_7.1.0.ppc64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml
rename tests/qemuxml2argvdata/{pseries-panic-no-address.args => pseries-basic.ppc64-latest.args} (58%)
delete mode 120000 tests/qemuxml2argvdata/pseries-console-native.args
create mode 120000 tests/qemuxml2argvdata/pseries-console-native.ppc64-latest.args
rename tests/qemuxml2argvdata/{pseries-console-virtio.args => pseries-console-virtio.ppc64-latest.args} (57%)
rename tests/qemuxml2argvdata/{pseries-cpu-compat.args => pseries-cpu-compat.ppc64-latest.args} (58%)
rename tests/qemuxml2argvdata/{pseries-cpu-exact.args => pseries-cpu-exact.ppc64-latest.args} (59%)
rename tests/qemuxml2argvdata/{pseries-cpu-le.args => pseries-cpu-le.ppc64-latest.args} (58%)
rename tests/qemuxml2argvdata/{pseries-default-phb-numa-node.err => pseries-default-phb-numa-node.ppc64-latest.err} (100%)
mode change 120000 => 100644 tests/qemuxml2argvdata/pseries-features-ccf.xml
mode change 120000 => 100644 tests/qemuxml2argvdata/pseries-features-cfpc.xml
mode change 120000 => 100644 tests/qemuxml2argvdata/pseries-features-hpt-pagesize.xml
mode change 120000 => 100644 tests/qemuxml2argvdata/pseries-features-htm.xml
mode change 120000 => 100644 tests/qemuxml2argvdata/pseries-features-ibs.xml
mode change 120000 => 100644 tests/qemuxml2argvdata/pseries-features-nested-hv.xml
mode change 120000 => 100644 tests/qemuxml2argvdata/pseries-features-sbbc.xml
rename tests/qemuxml2argvdata/{pseries-features.args => pseries-features.ppc64-latest.args} (68%)
create mode 100644 tests/qemuxml2argvdata/pseries-hostdevs-1.ppc64-latest.args
create mode 100644 tests/qemuxml2argvdata/pseries-hostdevs-2.ppc64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pseries-hostdevs-3.args
create mode 100644 tests/qemuxml2argvdata/pseries-hostdevs-3.ppc64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pseries-many-buses-1.args
rename tests/qemuxml2argvdata/{pseries-hostdevs-2.args => pseries-many-buses-1.ppc64-latest.args} (57%)
delete mode 100644 tests/qemuxml2argvdata/pseries-many-buses-2.args
rename tests/qemuxml2argvdata/{pseries-hostdevs-1.args => pseries-many-buses-2.ppc64-latest.args} (58%)
delete mode 100644 tests/qemuxml2argvdata/pseries-many-devices.args
create mode 100644 tests/qemuxml2argvdata/pseries-many-devices.ppc64-latest.args
rename tests/qemuxml2argvdata/{pseries-nvram.args => pseries-nvram.ppc64-latest.args} (63%)
rename tests/qemuxml2argvdata/{pseries-panic-address.err => pseries-panic-address.ppc64-latest.err} (100%)
create mode 100644 tests/qemuxml2argvdata/pseries-panic-missing.ppc64-latest.args
create mode 100644 tests/qemuxml2argvdata/pseries-panic-no-address.ppc64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pseries-phb-default-missing.args
rename tests/qemuxml2argvdata/{pseries-basic.args => pseries-phb-default-missing.ppc64-latest.args} (58%)
rename tests/qemuxml2argvdata/{pseries-phb-numa-node.args => pseries-phb-numa-node.ppc64-latest.args} (53%)
delete mode 100644 tests/qemuxml2argvdata/pseries-phb-simple.args
rename tests/qemuxml2argvdata/{pseries-panic-missing.args => pseries-phb-simple.ppc64-latest.args} (58%)
delete mode 120000 tests/qemuxml2argvdata/pseries-serial+console-native.args
create mode 120000 tests/qemuxml2argvdata/pseries-serial+console-native.ppc64-latest.args
delete mode 120000 tests/qemuxml2argvdata/pseries-serial-compat.args
create mode 120000 tests/qemuxml2argvdata/pseries-serial-compat.ppc64-latest.args
rename tests/qemuxml2argvdata/{pseries-serial-native.args => pseries-serial-native.ppc64-latest.args} (61%)
rename tests/qemuxml2argvdata/{pseries-serial-pci.args => pseries-serial-pci.ppc64-latest.args} (60%)
rename tests/qemuxml2argvdata/{pseries-serial-usb.args => pseries-serial-usb.ppc64-latest.args} (57%)
delete mode 100644 tests/qemuxml2argvdata/pseries-usb-default.args
create mode 100644 tests/qemuxml2argvdata/pseries-usb-default.ppc64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pseries-usb-kbd.args
create mode 100644 tests/qemuxml2argvdata/pseries-usb-kbd.ppc64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pseries-usb-multi.args
create mode 100644 tests/qemuxml2argvdata/pseries-usb-multi.ppc64-latest.args
rename tests/qemuxml2argvdata/{pseries-vio.args => pseries-vio-user-assigned.ppc64-latest.args} (52%)
rename tests/qemuxml2argvdata/{pseries-vio-user-assigned.args => pseries-vio.ppc64-latest.args} (52%)
--
2.37.3
2 years, 6 months
[PATCH] schema: Re-structure schema for <filesystem> to avoid broken validation
by Peter Krempa
The validation of a '<filesystem type='mount'>' device fails if the
elements inside are not ordered in the order in the schema despite using
<interleave>. This is a bug in libxml2's validator as removing the
'<optional>' property from the definition of the 'type' attribute with
'mount' variable fixes the problem.
I've reported it as another instance of a seemingly related issue:
https://gitlab.gnome.org/GNOME/libxml2/-/issues/131
Meanwhile libvirt can re-arrange the schema by extracting the common
bits into a new definition and referencing them from each of the choice
groups explicitly.
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/392
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/schemas/domaincommon.rng | 365 +++++++++++++++---------------
1 file changed, 186 insertions(+), 179 deletions(-)
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index 5ff15e8787..d346442510 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -2860,205 +2860,212 @@
</interleave>
</element>
</define>
+
+ <define name="filesystemCommon">
+ <interleave>
+ <element name="target">
+ <attribute name="dir"/>
+ <empty/>
+ </element>
+ <optional>
+ <attribute name="accessmode">
+ <choice>
+ <value>passthrough</value>
+ <value>mapped</value>
+ <value>squash</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="multidevs">
+ <choice>
+ <value>default</value>
+ <value>remap</value>
+ <value>forbid</value>
+ <value>warn</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="fmode">
+ <ref name="createMode"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="dmode">
+ <ref name="createMode"/>
+ </attribute>
+ </optional>
+ <optional>
+ <element name="readonly">
+ <empty/>
+ </element>
+ </optional>
+ <optional>
+ <ref name="deviceBoot"/>
+ </optional>
+ <optional>
+ <ref name="alias"/>
+ </optional>
+ <optional>
+ <ref name="acpi"/>
+ </optional>
+ <optional>
+ <ref name="address"/>
+ </optional>
+ <optional>
+ <element name="space_hard_limit">
+ <ref name="scaledInteger"/>
+ </element>
+ </optional>
+ <optional>
+ <element name="space_soft_limit">
+ <ref name="scaledInteger"/>
+ </element>
+ </optional>
+ </interleave>
+ </define>
+
<define name="filesystem">
<element name="filesystem">
- <interleave>
- <choice>
- <group>
- <attribute name="type">
- <value>file</value>
- </attribute>
- <interleave>
- <optional>
- <ref name="fsDriver"/>
- </optional>
- <element name="source">
- <attribute name="file">
- <ref name="absFilePath"/>
- </attribute>
- <empty/>
- </element>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>block</value>
- </attribute>
- <interleave>
- <optional>
- <ref name="fsDriver"/>
- </optional>
- <element name="source">
- <attribute name="dev">
- <ref name="absFilePath"/>
- </attribute>
- <empty/>
- </element>
- </interleave>
- </group>
- <group>
- <!-- type="mount" is default -->
+ <optional>
+ <attribute name="model">
+ <choice>
+ <value>virtio</value>
+ <value>virtio-transitional</value>
+ <value>virtio-non-transitional</value>
+ </choice>
+ </attribute>
+ </optional>
+ <choice>
+ <group>
+ <attribute name="type">
+ <value>file</value>
+ </attribute>
+ <interleave>
<optional>
- <attribute name="type">
- <value>mount</value>
- </attribute>
+ <ref name="fsDriver"/>
</optional>
- <interleave>
- <optional>
- <ref name="fsDriver"/>
- </optional>
- <optional>
- <ref name="fsBinary"/>
- </optional>
- <element name="source">
- <choice>
- <group>
- <attribute name="dir">
- <ref name="absDirPath"/>
- </attribute>
- </group>
- <group>
- <attribute name="socket">
- <ref name="absFilePath"/>
- </attribute>
- </group>
- </choice>
- <empty/>
- </element>
- </interleave>
- </group>
- <group>
- <optional>
- <attribute name="type">
- <value>bind</value>
+ <element name="source">
+ <attribute name="file">
+ <ref name="absFilePath"/>
</attribute>
+ <empty/>
+ </element>
+ <ref name="filesystemCommon"/>
+ </interleave>
+ </group>
+ <group>
+ <attribute name="type">
+ <value>block</value>
+ </attribute>
+ <interleave>
+ <optional>
+ <ref name="fsDriver"/>
</optional>
- <interleave>
- <optional>
- <ref name="fsDriver"/>
- </optional>
- <element name="source">
- <attribute name="dir">
- <ref name="absDirPath"/>
- </attribute>
- <empty/>
- </element>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>template</value>
- </attribute>
- <interleave>
- <optional>
- <ref name="fsDriver"/>
- </optional>
- <element name="source">
- <attribute name="name">
- <ref name="genericName"/>
- </attribute>
- <empty/>
- </element>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>ram</value>
- </attribute>
- <interleave>
- <optional>
- <ref name="fsDriver"/>
- </optional>
- <element name="source">
- <attribute name="usage">
- <ref name="unsignedLong"/>
- </attribute>
- <optional>
- <attribute name="units">
- <ref name="unit"/>
- </attribute>
- </optional>
- <empty/>
- </element>
- </interleave>
- </group>
- </choice>
- <interleave>
- <element name="target">
- <attribute name="dir"/>
- <empty/>
- </element>
+ <element name="source">
+ <attribute name="dev">
+ <ref name="absFilePath"/>
+ </attribute>
+ <empty/>
+ </element>
+ <ref name="filesystemCommon"/>
+ </interleave>
+ </group>
+ <group>
+ <!-- type="mount" is default -->
<optional>
- <attribute name="accessmode">
- <choice>
- <value>passthrough</value>
- <value>mapped</value>
- <value>squash</value>
- </choice>
+ <attribute name="type">
+ <value>mount</value>
</attribute>
</optional>
- <optional>
- <attribute name="multidevs">
+ <interleave>
+ <optional>
+ <ref name="fsDriver"/>
+ </optional>
+ <optional>
+ <ref name="fsBinary"/>
+ </optional>
+ <element name="source">
<choice>
- <value>default</value>
- <value>remap</value>
- <value>forbid</value>
- <value>warn</value>
+ <group>
+ <attribute name="dir">
+ <ref name="absDirPath"/>
+ </attribute>
+ </group>
+ <group>
+ <attribute name="socket">
+ <ref name="absFilePath"/>
+ </attribute>
+ </group>
</choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fmode">
- <ref name="createMode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dmode">
- <ref name="createMode"/>
- </attribute>
- </optional>
- <optional>
- <element name="readonly">
<empty/>
</element>
- </optional>
- <optional>
- <ref name="deviceBoot"/>
- </optional>
- <optional>
- <ref name="alias"/>
- </optional>
- <optional>
- <ref name="acpi"/>
- </optional>
+ <ref name="filesystemCommon"/>
+ </interleave>
+ </group>
+ <group>
<optional>
- <ref name="address"/>
+ <attribute name="type">
+ <value>bind</value>
+ </attribute>
</optional>
- </interleave>
- <interleave>
- <optional>
- <element name="space_hard_limit">
- <ref name="scaledInteger"/>
+ <interleave>
+ <optional>
+ <ref name="fsDriver"/>
+ </optional>
+ <element name="source">
+ <attribute name="dir">
+ <ref name="absDirPath"/>
+ </attribute>
+ <empty/>
</element>
- </optional>
- <optional>
- <element name="space_soft_limit">
- <ref name="scaledInteger"/>
+ <ref name="filesystemCommon"/>
+ </interleave>
+ </group>
+ <group>
+ <attribute name="type">
+ <value>template</value>
+ </attribute>
+ <interleave>
+ <optional>
+ <ref name="fsDriver"/>
+ </optional>
+ <element name="source">
+ <attribute name="name">
+ <ref name="genericName"/>
+ </attribute>
+ <empty/>
</element>
- </optional>
- </interleave>
- <optional>
- <attribute name="model">
- <choice>
- <value>virtio</value>
- <value>virtio-transitional</value>
- <value>virtio-non-transitional</value>
- </choice>
+ <ref name="filesystemCommon"/>
+ </interleave>
+ </group>
+ <group>
+ <attribute name="type">
+ <value>ram</value>
</attribute>
- </optional>
- </interleave>
+ <interleave>
+ <optional>
+ <ref name="fsDriver"/>
+ </optional>
+ <element name="source">
+ <attribute name="usage">
+ <ref name="unsignedLong"/>
+ </attribute>
+ <optional>
+ <attribute name="units">
+ <ref name="unit"/>
+ </attribute>
+ </optional>
+ <empty/>
+ </element>
+ <ref name="filesystemCommon"/>
+ </interleave>
+ </group>
+ </choice>
</element>
</define>
+
<define name="fsDriver">
<element name="driver">
<!-- Annoying inconsistency. "disk" uses "name"
--
2.37.3
2 years, 6 months
[PATCH] nodedev: ignore EINVAL from libudev in udevEventHandleThread
by christian.ehrhardt@canonical.com
From: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
Certiain udev entries might be of a size that makes libudev emit EINVAL
which right now leads to udevEventHandleThread exiting. Due to no more
handling events other elements of libvirt will start pushing for events
to be consumed which never happens causing a busy loop burning a cpu
without any gain.
After evaluation of the root cause of the example case discussed in
in #245 and a test run ignoring EINVAL it was considered safe to add
EINVAL to the ignored errnos to not exit udevEventHandleThread giving
it more resilience.
Fixes: #245
Signed-off-by: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
---
src/node_device/node_device_udev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 07c10f0d88..21fbcc2dca 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1863,10 +1863,12 @@ udevEventHandleThread(void *opaque G_GNUC_UNUSED)
}
/* POSIX allows both EAGAIN and EWOULDBLOCK to be used
- * interchangeably when the read would block or timeout was fired
+ * interchangeably when the read would block or timeout was fired.
+ * EINVAL might happen on too large udev entries, ignore those for
+ * the robustness of udevEventHandleThread.
*/
VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR
- if (errno != EAGAIN && errno != EWOULDBLOCK) {
+ if (errno != EAGAIN && errno != EWOULDBLOCK && errno != EINVAL) {
VIR_WARNINGS_RESET
virReportSystemError(errno, "%s",
_("failed to receive device from udev "
--
2.38.0
2 years, 6 months
[PATCH v3] nodedev: ignore EINVAL from libudev in udevEventHandleThread
by christian.ehrhardt@canonical.com
From: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
Certain udev entries might be of a size that makes libudev emit EINVAL
which right now leads to udevEventHandleThread exiting. Due to no more
handling events other elements of libvirt will start pushing for events
to be consumed which never happens causing a busy loop burning a cpu
without any gain.
After evaluation of the root cause of the example case discussed in
in #245 and a test run ignoring EINVAL it was considered safe to add
EINVAL to the ignored errnos to not exit udevEventHandleThread giving
it more resilience.
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/245
Signed-off-by: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
Reviewed-by: Daniel P. Berrangé <berrange(a)redhat.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
---
src/node_device/node_device_udev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 07c10f0d88..21fbcc2dca 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1863,10 +1863,12 @@ udevEventHandleThread(void *opaque G_GNUC_UNUSED)
}
/* POSIX allows both EAGAIN and EWOULDBLOCK to be used
- * interchangeably when the read would block or timeout was fired
+ * interchangeably when the read would block or timeout was fired.
+ * EINVAL might happen on too large udev entries, ignore those for
+ * the robustness of udevEventHandleThread.
*/
VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR
- if (errno != EAGAIN && errno != EWOULDBLOCK) {
+ if (errno != EAGAIN && errno != EWOULDBLOCK && errno != EINVAL) {
VIR_WARNINGS_RESET
virReportSystemError(errno, "%s",
_("failed to receive device from udev "
--
2.38.0
2 years, 6 months
[PATCH v2] nodedev: ignore EINVAL from libudev in udevEventHandleThread
by christian.ehrhardt@canonical.com
From: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
Certiain udev entries might be of a size that makes libudev emit EINVAL
which right now leads to udevEventHandleThread exiting. Due to no more
handling events other elements of libvirt will start pushing for events
to be consumed which never happens causing a busy loop burning a cpu
without any gain.
After evaluation of the root cause of the example case discussed in
in #245 and a test run ignoring EINVAL it was considered safe to add
EINVAL to the ignored errnos to not exit udevEventHandleThread giving
it more resilience.
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/245
Signed-off-by: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
Reviewed-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/node_device/node_device_udev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 07c10f0d88..21fbcc2dca 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1863,10 +1863,12 @@ udevEventHandleThread(void *opaque G_GNUC_UNUSED)
}
/* POSIX allows both EAGAIN and EWOULDBLOCK to be used
- * interchangeably when the read would block or timeout was fired
+ * interchangeably when the read would block or timeout was fired.
+ * EINVAL might happen on too large udev entries, ignore those for
+ * the robustness of udevEventHandleThread.
*/
VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR
- if (errno != EAGAIN && errno != EWOULDBLOCK) {
+ if (errno != EAGAIN && errno != EWOULDBLOCK && errno != EINVAL) {
VIR_WARNINGS_RESET
virReportSystemError(errno, "%s",
_("failed to receive device from udev "
--
2.38.0
2 years, 6 months
[PATCH] ci: Install python RPMs from libvirt/libvirt-python CI artifacts
by Peter Krempa
After addition of the new libvirt-client-qemu sub-package which is using
python bindings (thus creating a circular dependency between the libvirt
and libvirt-python projects) the integration jobs fail with:
Error:
Problem: conflicting requests
- nothing provides python3-libvirt >= 8.9.0-1.el9 needed by libvirt-client-qemu-8.9.0-1.el9.x86_64
The libvirt-python project now provides the RPMs in artifacts:
https://gitlab.com/libvirt/libvirt-python/-/merge_requests/96
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
ci/integration-template.yml | 2 +-
ci/integration.yml | 40 +++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/ci/integration-template.yml b/ci/integration-template.yml
index 3347bb03ed..acb51a0b27 100644
--- a/ci/integration-template.yml
+++ b/ci/integration-template.yml
@@ -25,7 +25,7 @@
.install-deps: &install-deps
- - sudo dnf install -y libvirt-rpms/* libvirt-perl-rpms/*
+ - sudo dnf install -y libvirt-rpms/* libvirt-perl-rpms/* libvirt-python-rpms/*
- sudo pip3 install --prefix=/usr avocado-framework
diff --git a/ci/integration.yml b/ci/integration.yml
index 19d227faad..b79d2e0f40 100644
--- a/ci/integration.yml
+++ b/ci/integration.yml
@@ -20,6 +20,10 @@ centos-stream-8-tests-prebuilt-env:
job: x86_64-centos-stream-8-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-centos-stream-8-prebuilt-env
+ ref: master
+ artifacts: true
centos-stream-8-tests-local-env:
extends:
@@ -31,6 +35,10 @@ centos-stream-8-tests-local-env:
job: x86_64-centos-stream-8-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-centos-stream-8-prebuilt-env
+ ref: master
+ artifacts: true
.centos-stream-9-tests:
@@ -52,6 +60,10 @@ centos-stream-9-tests-prebuilt-env:
job: x86_64-centos-stream-9-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-centos-stream-9-prebuilt-env
+ ref: master
+ artifacts: true
centos-stream-9-tests-local-env:
extends:
@@ -63,6 +75,10 @@ centos-stream-9-tests-local-env:
job: x86_64-centos-stream-9-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-centos-stream-9-prebuilt-env
+ ref: master
+ artifacts: true
.fedora-35-tests:
@@ -84,6 +100,10 @@ fedora-35-tests-prebuilt-env:
job: x86_64-fedora-35-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-fedora-35-prebuilt-env
+ ref: master
+ artifacts: true
fedora-35-tests-local-env:
extends:
@@ -95,6 +115,10 @@ fedora-35-tests-local-env:
job: x86_64-fedora-35-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-fedora-35-prebuilt-env
+ ref: master
+ artifacts: true
.fedora-36-tests:
@@ -116,6 +140,10 @@ fedora-36-tests-prebuilt-env:
job: x86_64-fedora-36-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-fedora-36-prebuilt-env
+ ref: master
+ artifacts: true
fedora-36-tests-local-env:
extends:
@@ -127,6 +155,10 @@ fedora-36-tests-local-env:
job: x86_64-fedora-36-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-fedora-36-prebuilt-env
+ ref: master
+ artifacts: true
.fedora-36-upstream-qemu-tests:
@@ -148,6 +180,10 @@ fedora-36-upstream-qemu-tests-prebuilt-env:
job: x86_64-fedora-36-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-fedora-36-prebuilt-env
+ ref: master
+ artifacts: true
fedora-36-upstream-qemu-tests-local-env:
extends:
@@ -159,3 +195,7 @@ fedora-36-upstream-qemu-tests-local-env:
job: x86_64-fedora-36-prebuilt-env
ref: master
artifacts: true
+ - project: libvirt/libvirt-python
+ job: x86_64-fedora-36-prebuilt-env
+ ref: master
+ artifacts: true
--
2.37.3
2 years, 6 months