[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, 1 month
[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, 1 month
[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, 1 month
[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, 1 month
[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, 1 month
[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, 1 month
[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, 1 month
[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, 1 month
[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, 1 month
[PATCH 0/7] qemu: support updating device's bootindex
by Jiang Jiacheng
Support updating device's(support cdrom, disk and network) bootindex
online in virDomainUpdateDeviceFlags. The new bootindex will take effect
after guest rebooting. Enable bootindex can be set to -1, it means cancel
the device's bootindex.
To use this feature, we need to get the device's xml first and modify
the boot order in the xml, then use 'virsh update-device <domain> <xml>
--flag' to update the bootindex. Note that the flag should be --config
or --persistent if the vm is running.
Jiang Jiacheng (7):
qemu: Introduce qemuDomainChangeBootIndex API
qemu: Introduce qemuCheckBootIndex and qemuChangeDiskBootIndex API
qemu: Support update disk's bootindex
qemu: Support update net's bootindex
qemu: Support set bootindex to -1
qemu: Support add bootindex = -1 to boothash
qemu: Reserve bootindex = -1 in virDomainDeviceDefCopy
src/conf/device_conf.h | 4 +--
src/conf/domain_conf.c | 38 +++++++++++++++-----
src/conf/domain_conf.h | 4 +++
src/conf/domain_postparse.c | 8 ++++-
src/qemu/qemu_command.c | 38 ++++++++++----------
src/qemu/qemu_conf.c | 69 ++++++++++++++++++++++++++++++++++++
src/qemu/qemu_conf.h | 12 +++++++
src/qemu/qemu_domain.c | 3 +-
src/qemu/qemu_driver.c | 32 +++++++++++++++++
src/qemu/qemu_hotplug.c | 17 ++++++---
src/qemu/qemu_monitor.c | 12 +++++++
src/qemu/qemu_monitor.h | 6 ++++
src/qemu/qemu_monitor_json.c | 22 ++++++++++++
src/qemu/qemu_monitor_json.h | 6 ++++
src/qemu/qemu_process.c | 8 ++---
src/qemu/qemu_validate.c | 6 ++--
16 files changed, 242 insertions(+), 43 deletions(-)
--
2.33.0
2 years, 1 month