[PATCH 0/4] move validation of virtio options
by Bjoern Walk
Move validation of virtio options (iommu, ats, packed) from QEMU command
line generation to domain validation. As a drive-by, increase the
granularity of tests for virtio options.
Bjoern Walk (4):
tests: use latest caps for virtio-options test
tests: more fine-granular tests for virtio-options
qemu: move virtio capability validation
qemu: command: make qemuBuildVirtioOptionsStr void
src/qemu/qemu_command.c | 59 +++-------
src/qemu/qemu_validate.c | 70 +++++++++++-
.../virtio-options-controller-ats.args | 32 ++++++
.../virtio-options-controller-ats.xml | 38 +++++++
.../virtio-options-controller-iommu.args | 34 ++++++
.../virtio-options-controller-iommu.xml | 38 +++++++
.../virtio-options-controller-packed.args | 32 ++++++
.../virtio-options-controller-packed.xml | 38 +++++++
.../virtio-options-disk-ats.args | 36 +++++++
.../virtio-options-disk-ats.xml | 34 ++++++
.../virtio-options-disk-iommu.args | 36 +++++++
.../virtio-options-disk-iommu.xml | 34 ++++++
.../virtio-options-disk-packed.args | 36 +++++++
.../virtio-options-disk-packed.xml | 34 ++++++
.../virtio-options-fs-ats.args | 34 ++++++
.../virtio-options-fs-ats.xml | 34 ++++++
.../virtio-options-fs-iommu.args | 34 ++++++
.../virtio-options-fs-iommu.xml | 34 ++++++
.../virtio-options-fs-packed.args | 34 ++++++
.../virtio-options-fs-packed.xml | 34 ++++++
.../virtio-options-input-ats.args | 30 ++++++
.../virtio-options-input-ats.xml | 30 ++++++
.../virtio-options-input-iommu.args | 30 ++++++
.../virtio-options-input-iommu.xml | 30 ++++++
.../virtio-options-input-packed.args | 30 ++++++
.../virtio-options-input-packed.xml | 30 ++++++
.../virtio-options-memballoon-ats.args | 28 +++++
.../virtio-options-memballoon-ats.xml | 23 ++++
.../virtio-options-memballoon-iommu.args | 28 +++++
.../virtio-options-memballoon-iommu.xml | 23 ++++
.../virtio-options-memballoon-packed.args | 28 +++++
.../virtio-options-memballoon-packed.xml | 23 ++++
.../virtio-options-net-ats.args | 34 ++++++
.../virtio-options-net-ats.xml | 34 ++++++
.../virtio-options-net-iommu.args | 34 ++++++
.../virtio-options-net-iommu.xml | 34 ++++++
.../virtio-options-net-packed.args | 34 ++++++
.../virtio-options-net-packed.xml | 34 ++++++
.../virtio-options-rng-ats.args | 32 ++++++
.../virtio-options-rng-ats.xml | 32 ++++++
.../virtio-options-rng-iommu.args | 34 ++++++
.../virtio-options-rng-iommu.xml | 32 ++++++
.../virtio-options-rng-packed.args | 32 ++++++
.../virtio-options-rng-packed.xml | 32 ++++++
.../virtio-options-video-ats.args | 34 ++++++
.../virtio-options-video-ats.xml | 36 +++++++
.../virtio-options-video-iommu.args | 34 ++++++
.../virtio-options-video-iommu.xml | 36 +++++++
.../virtio-options-video-packed.args | 34 ++++++
.../virtio-options-video-packed.xml | 36 +++++++
.../virtio-options.x86_64-latest.args | 69 ++++++++++++
tests/qemuxml2argvdata/virtio-options.xml | 5 +-
tests/qemuxml2argvtest.c | 101 ++++++++++++++++--
.../virtio-options.x86_64-latest.xml | 1 +
tests/qemuxml2xmltest.c | 16 +--
55 files changed, 1818 insertions(+), 70 deletions(-)
create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-ats.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-ats.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-iommu.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-iommu.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-packed.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-packed.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-ats.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-ats.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-iommu.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-iommu.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-packed.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-packed.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-ats.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-ats.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-iommu.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-iommu.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-packed.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-packed.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-input-ats.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-input-ats.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-input-iommu.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-input-iommu.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-input-packed.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-input-packed.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-ats.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-ats.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-iommu.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-iommu.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-packed.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-packed.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-net-ats.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-net-ats.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-net-iommu.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-net-iommu.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-net-packed.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-net-packed.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-ats.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-ats.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-iommu.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-iommu.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-packed.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-packed.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-video-ats.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-video-ats.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-video-iommu.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-video-iommu.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options-video-packed.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-video-packed.xml
create mode 100644 tests/qemuxml2argvdata/virtio-options.x86_64-latest.args
create mode 120000 tests/qemuxml2xmloutdata/virtio-options.x86_64-latest.xml
--
2.24.1
4 years, 7 months
[libvirt-dbus PATCH 0/9] Convert documentation to reStructuredText, other cleanups
by Andrea Bolognani
I think it's high time that we have a new libvirt-dbus release, since
the last one was more than a year ago: since then, there has been at
least one bug fix necessary to keep it building on modern platforms,
an additional API has been implemented, and of course we've switched
the build system from autotools to Meson.
I validated the status of what's in master by importing a snapshot
into the Debian package and everything seems to be in order, so I'm
fairly confident we could basically just tag a release right away;
there are, however, a few straightforward improvements that I would
like to get into the new release, so here we are :)
Andrea Bolognani (9):
git: Minimize ignore patterns
spec: Install fewer documentation files
README: Convert to reStructuredText
HACKING: Convert to reStructuredText
NEWS: Convert to reStructuredText
AUTHORS: Convert to reStructuredText
man: Convert to reStructuredText
meson: Install documentation
spec: Pick documentation from installation directory
.gitignore | 47 ---------
AUTHORS.in | 16 ----
AUTHORS.rst.in | 17 ++++
HACKING.md | 205 ---------------------------------------
HACKING.rst | 207 ++++++++++++++++++++++++++++++++++++++++
NEWS | 88 -----------------
NEWS.rst | 94 ++++++++++++++++++
README.md => README.rst | 37 +++----
docs/libvirt-dbus.pod | 66 -------------
docs/libvirt-dbus.rst | 71 ++++++++++++++
docs/meson.build | 6 +-
libvirt-dbus.spec.in | 7 +-
meson.build | 24 ++++-
tools/gen-authors.sh | 2 +-
14 files changed, 437 insertions(+), 450 deletions(-)
delete mode 100644 AUTHORS.in
create mode 100644 AUTHORS.rst.in
delete mode 100644 HACKING.md
create mode 100644 HACKING.rst
delete mode 100644 NEWS
create mode 100644 NEWS.rst
rename README.md => README.rst (68%)
delete mode 100644 docs/libvirt-dbus.pod
create mode 100644 docs/libvirt-dbus.rst
--
2.25.3
4 years, 7 months
[libvirt-dbus PATCH] docs/meson: fix rst2man detection
by Pavel Hrdina
In libvirt project we use python3 version exclusively so we should do
the same in libvirt-dbus. This means that we have to check other
possible binary names.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
docs/meson.build | 2 +-
libvirt-dbus.spec.in | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/docs/meson.build b/docs/meson.build
index fbeaf12..c2e8ae7 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -1,4 +1,4 @@
-prog_rst2man = find_program('rst2man')
+prog_rst2man = find_program('rst2man', 'rst2man.py', 'rst2man-3')
configure_file(
command: [prog_rst2man.path(), '@INPUT@', '@OUTPUT@'],
diff --git a/libvirt-dbus.spec.in b/libvirt-dbus.spec.in
index 84172fa..4e6ff85 100644
--- a/libvirt-dbus.spec.in
+++ b/libvirt-dbus.spec.in
@@ -19,7 +19,11 @@ BuildRequires: meson >= %{meson_version}
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: libvirt-devel >= %{libvirt_version}
BuildRequires: libvirt-glib-devel >= %{libvirt_glib_version}
-BuildRequires: /usr/bin/rst2man
+%if 0%{?rhel} == 7
+BuildRequires: python36-docutils
+%else
+BuildRequires: python3-docutils
+%endif
Requires: dbus
Requires: glib2 >= %{glib2_version}
--
2.25.4
4 years, 7 months
[libvirt PATCH] qemu: re-add padding to the saved state images
by Daniel P. Berrangé
In the past we added 1024 bytes of padding to saved state images so that
users can run "virsh managedsave-edit $GUEST" and make XML changes which
increase the size of the XML document. This padding was accidentally
lost a while back
commit 6b9b21db7079888a05d192b079e68290bdf14a76
Author: Peter Krempa <pkrempa(a)redhat.com>
Date: Wed Feb 17 13:10:11 2016 +0100
qemu: Remove unnecessary calculations in qemuDomainSaveMemory
The original 1024 bytes was unreasonably stingy when we consider that
the QEMU state is typically going to be many 100's of MB in size. Thus
this adds 64 KB of padding after the XML which should cope with any
plausible modifications a user will want to make.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/qemu/qemu_driver.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 01330e55e7..d5aeeac66d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2922,20 +2922,23 @@ virQEMUSaveDataWrite(virQEMUSaveDataPtr data,
len = xml_len + cookie_len;
- if (header->data_len > 0) {
+ if (header->data_len == 0) {
+ /* This 64kb padding allows the user to edit the XML in
+ * a saved state image and have the new XML be larger
+ * that what was originally saved
+ */
+ header->data_len = len + (64 * 1024);
+ } else {
if (len > header->data_len) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("new xml too large to fit in file"));
return -1;
}
-
- zerosLen = header->data_len - len;
- if (VIR_ALLOC_N(zeros, zerosLen) < 0)
- return -1;
- } else {
- header->data_len = len;
}
+ zerosLen = header->data_len - len;
+ zeros = g_new0(char, zerosLen);
+
if (data->cookie)
header->cookieOffset = xml_len;
--
2.25.3
4 years, 7 months
[libvirt-dbus PATCH 0/2] Revert recent commits
by Andrea Bolognani
Pushed under the "we agreed to get rid of this" rule.
Andrea Bolognani (2):
spec: Pick documentation from source directory
meson: Don't install documentation
libvirt-dbus.spec.in | 4 +---
meson.build | 18 ------------------
2 files changed, 1 insertion(+), 21 deletions(-)
--
2.25.4
4 years, 7 months
[PATCH RESEND v1 0/7] add Spectre related PowerPC features
by Daniel Henrique Barboza
Recent changes in master (adding aio_io_uring cap, splitting
feature parsing code to a new function, updates in news.xml)
broke rebase for all patches in the series. Re-sending it, rebased
with master at 606fb3979ab4.
****
Hi,
This series implements 3 Spectre related PowerPC features that
were added back in QEMU 2.12:
- CFPC: Cache Flush on Privilege Change
- SBBC: Speculation Barrier Bounds Checking
- IBS: Indirect Branch Speculation
These options aren't much of a problem for users using latest
hardware and guests with recent Linux kernels. Users with outdated
hardware/firmware or trying to run AIX guests/guests with older
kernels, however, will need to fine tune these options because
QEMU defaults won't work.
Instead of making users rely on <qemu:commandline> elements to
hardcode the options in the XML, let's support them in Libvirt.
Daniel Henrique Barboza (7):
qemu: Add capability for CFPC pSeries feature
qemu: Implement the CFPC pSeries feature
qemu: Add capability for SBBC pSeries feature
qemu: Implement the SBBC pSeries feature
qemu: Add capability for IBS pSeries feature
qemu: Implement the IBS pSeries feature
news: Update for the recent added pSeries features
docs/formatdomain.html.in | 36 +++++
docs/news.xml | 10 ++
docs/schemas/domaincommon.rng | 47 ++++++
src/conf/domain_conf.c | 134 ++++++++++++++++++
src/conf/domain_conf.h | 38 +++++
src/libvirt_private.syms | 3 +
src/qemu/qemu_capabilities.c | 8 ++
src/qemu/qemu_capabilities.h | 5 +
src/qemu/qemu_command.c | 15 ++
src/qemu/qemu_validate.c | 33 +++++
.../caps_2.12.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 3 +
tests/qemuxml2argvdata/pseries-features.args | 3 +-
tests/qemuxml2argvdata/pseries-features.xml | 3 +
tests/qemuxml2argvtest.c | 53 ++++++-
tests/qemuxml2xmloutdata/pseries-features.xml | 3 +
tests/qemuxml2xmltest.c | 5 +-
21 files changed, 411 insertions(+), 3 deletions(-)
--
2.25.4
4 years, 7 months
[PATCH v1 0/7] add Spectre related PowerPC features
by Daniel Henrique Barboza
Hi,
This series implements 3 Spectre related PowerPC features that
were added back in QEMU 2.12:
- CFPC: Cache Flush on Privilege Change
- SBBC: Speculation Barrier Bounds Checking
- IBS: Indirect Branch Speculation
These options aren't much of a problem for users using latest
hardware and guests with recent Linux kernels. Users with outdated
hardware/firmware or trying to run AIX guests/guests with older
kernels, however, will need to fine tune these options because
QEMU defaults won't work.
Instead of making users rely on <qemu:commandline> elements to
hardcode the options in the XML, let's support them in Libvirt.
Daniel Henrique Barboza (7):
qemu: Add capability for CFPC pSeries feature
qemu: Implement the CFPC pSeries feature
qemu: Add capability for SBBC pSeries feature
qemu: Implement the SBBC pSeries feature
qemu: Add capability for IBS pSeries feature
qemu: Implement the IBS pSeries feature
news: Update for the recent added pSeries features
docs/formatdomain.html.in | 36 +++++
docs/news.xml | 10 ++
docs/schemas/domaincommon.rng | 47 ++++++
src/conf/domain_conf.c | 134 ++++++++++++++++++
src/conf/domain_conf.h | 38 +++++
src/libvirt_private.syms | 3 +
src/qemu/qemu_capabilities.c | 8 ++
src/qemu/qemu_capabilities.h | 5 +
src/qemu/qemu_command.c | 15 ++
src/qemu/qemu_validate.c | 33 +++++
.../caps_2.12.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 3 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 3 +
tests/qemuxml2argvdata/pseries-features.args | 3 +-
tests/qemuxml2argvdata/pseries-features.xml | 3 +
tests/qemuxml2argvtest.c | 53 ++++++-
tests/qemuxml2xmloutdata/pseries-features.xml | 3 +
tests/qemuxml2xmltest.c | 5 +-
21 files changed, 411 insertions(+), 3 deletions(-)
--
2.25.2
4 years, 7 months
[PATCH] qemu: fix code format problem
by yubihong
There are some code format problems in src/libvirt-domain.c. This patch fixes
these problems.
>From 55cd85345b2dc50f44c1e382563482d40142382b Mon Sep 17 00:00:00
2001
From: yubihong <yubihong(a)huawei.com>
Date: Fri, 24 Apr 2020 17:44:43 +0800
Subject: [PATCH] qemu: fix code format problem
Signed-off-by:Yu Bihong <yubihong(a)huawei.com>
---
src/libvirt-domain.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index a12809c..d659f1b
100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -8194,11 +8194,11 @@ virDomainAttachDevice(virDomainPtr domain,
const char *xml)
virCheckReadOnlyGoto(conn->flags, error);
if (conn->driver->domainAttachDevice) {
- int ret;
- ret = conn->driver->domainAttachDevice(domain, xml);
- if (ret < 0)
- goto error;
- return ret;
+ int ret;
+ ret = conn->driver->domainAttachDevice(domain, xml);
+ if (ret < 0)
+ goto error;
+ return ret;
}
virReportUnsupportedError();
@@ -8299,9 +8299,9 @@ virDomainDetachDevice(virDomainPtr domain,
const char *xml)
if (conn->driver->domainDetachDevice) {
int ret;
ret = conn->driver->domainDetachDevice(domain, xml);
- if (ret < 0)
- goto error;
- return ret;
+ if (ret < 0)
+ goto error;
+ return ret;
}
virReportUnsupportedError();
--
1.8.3.1
4 years, 7 months
[PATCH 0/4] Remove unfinished support for external data store of qcow2 files
by Peter Krempa
The implementation was never finished properly. Since there isn't any
push to finish it either, let's remove the code so that it doesn't keep
rotting.
Peter Krempa (4):
security: Remove labelling of 'externalDataStore'
util: Remove 'externalDataStore' field from virStorageSource
util: Remove 'externalDataStoreRaw' field from virStorageSource
util: qcow2GetExtensions: Remove support for 'data file' extension
src/security/security_dac.c | 15 -------
src/security/security_selinux.c | 17 +-------
src/security/virt-aa-helper.c | 4 --
src/util/virstoragefile.c | 74 ++-------------------------------
src/util/virstoragefile.h | 5 ---
5 files changed, 5 insertions(+), 110 deletions(-)
--
2.26.0
4 years, 7 months
[PATCH libvirt-python] examples: Fix connection error handling 2
by Philipp Hahn
Fix two more cases in examples as
libvirt.open*() does not return None but raises an exception
Fixes: 283e2bc693746164b22226e14d6fe3ccd38a07bf
Signed-off-by: Philipp Hahn <hahn(a)univention.de>
---
examples/dhcpleases.py | 5 +++--
examples/domipaddrs.py | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/examples/dhcpleases.py b/examples/dhcpleases.py
index f394541..6f80fd5 100755
--- a/examples/dhcpleases.py
+++ b/examples/dhcpleases.py
@@ -22,8 +22,9 @@ else:
usage()
sys.exit(2)
-conn = libvirt.open(uri)
-if conn == None:
+try:
+ conn = libvirt.open(uri)
+except libvirt.libvirtError:
print("Unable to open connection to libvirt")
sys.exit(1)
diff --git a/examples/domipaddrs.py b/examples/domipaddrs.py
index bda308c..e893995 100755
--- a/examples/domipaddrs.py
+++ b/examples/domipaddrs.py
@@ -21,8 +21,9 @@ else:
usage()
sys.exit(2)
-conn = libvirt.open(uri)
-if conn == None:
+try:
+ conn = libvirt.open(uri)
+except libvirt.libvirtError:
print "Unable to open connection to libvirt"
sys.exit(1)
--
2.20.1
4 years, 7 months