[libvirt PATCH] qemu_hotplug: Report VIR_ERR_DEVICE_MISSING when device is not found
by Lee Yarwood
126db34a81bc9f9f9710408f88cceaa1e34bbbd7 had previously switched various
flows over to this from VIR_ERR_OPERATION_FAILED.
This change simply does the same for qemuDomainDetachPrepDisk,
qemuDomainDetachPrepInput and qemuDomainDetachPrepVsock to allow
management apps to centralise their error handling on just
VIR_ERR_DEVICE_MISSING for missing devices during a detach.
---
src/qemu/qemu_hotplug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 0640cdd9f7..68bd92cf13 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -5322,7 +5322,7 @@ qemuDomainDetachPrepDisk(virDomainObj *vm,
int idx;
if ((idx = qemuFindDisk(vm->def, match->dst)) < 0) {
- virReportError(VIR_ERR_OPERATION_FAILED,
+ virReportError(VIR_ERR_DEVICE_MISSING,
_("disk %s not found"), match->dst);
return -1;
}
@@ -5819,7 +5819,7 @@ qemuDomainDetachPrepInput(virDomainObj *vm,
int idx;
if ((idx = virDomainInputDefFind(vm->def, match)) < 0) {
- virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+ virReportError(VIR_ERR_DEVICE_MISSING, "%s",
_("matching input device not found"));
return -1;
}
@@ -5855,7 +5855,7 @@ qemuDomainDetachPrepVsock(virDomainObj *vm,
*detach = vsock = vm->def->vsock;
if (!vsock ||
!virDomainVsockDefEquals(match, vsock)) {
- virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+ virReportError(VIR_ERR_DEVICE_MISSING, "%s",
_("matching vsock device not found"));
return -1;
}
--
2.31.1
3 years, 6 months
[libvirt] [PATCH v2 0/5] virsh bash completion improvement
by Lin Ma
v1 -> v2:
* 01-08 were merged, So remove them.
* Reworked virshStorageVolKeyCompleter to avoid leaking objects.
Thanks to Michal Privoznik for helping reviewing these patches.
Lin Ma (5):
virsh-pool: Remove static from virshStoragePoolList{Free,Collect}
virsh-volume: Introduce virshStorageVolKeyCompleter
virsh-volume: Add macros VIRSH_COMMON_OPT_VOL_*
virsh-volume: Apply virshStorageVolKeyCompleter to vol-{name,pool}
commands
virsh-volume: Apply virshStorageVolNameCompleter to vol-{key,path}
commands
tools/virsh-completer-volume.c | 47 ++++++++++++++++++++++++++
tools/virsh-completer-volume.h | 5 +++
tools/virsh-pool.c | 10 ++----
tools/virsh-pool.h | 11 +++++++
tools/virsh-volume.c | 60 ++++++++++++++++------------------
5 files changed, 94 insertions(+), 39 deletions(-)
--
2.26.2
3 years, 6 months
[PATCH 0/3] qemu: Handle the egl-headless capability properly
by Peter Krempa
Similarly to my previous series dealing with SDL graphics,
'egl-headless' should be getting exactly the same treatment.
Peter Krempa (3):
qemu: capabilities: Un-retire QEMU_CAPS_EGL_HEADLESS
tests: qemuxml2*: Add QEMU_CAPS_EGL_HEADLESS to fake-caps tests using
egl-headless graphics
qemu: capabilities: Fill SDL graphics support only when it's really
supported
src/qemu/qemu_capabilities.c | 8 ++++++--
src/qemu/qemu_capabilities.h | 2 +-
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 +
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 +
tests/qemuxml2argvtest.c | 9 ++++++---
tests/qemuxml2xmltest.c | 8 +++++---
42 files changed, 56 insertions(+), 9 deletions(-)
--
2.31.1
3 years, 6 months
[PATCH] gitlab-ci: Don't build docs in 'sanitizer' jobs
by Peter Krempa
Docs are not sanitized, thus there's no point in building them.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
.gitlab-ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b5930a0a46..3fa616261e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -86,7 +86,7 @@ stages:
before_script:
- *script_variables
script:
- - meson build --werror -Db_lundef=false -Db_sanitize="$SANITIZER"
+ - meson build --werror -Ddocs=disabled -Db_lundef=false -Db_sanitize="$SANITIZER"
- ninja -C build;
- ninja -C build test;
--
2.31.1
3 years, 6 months
[PATCH 00/22] Fix hotplug of disks with iothreads and s390 cruft cleanup
by Peter Krempa
This series consists of 3 parts:
Part 1, patches 1-3:
These are fixes to the virCommand->string conversion, namely two bugs:
- VIR_TEST_REGENERATE_OUTPUT would produce new files with missing end
newline
- memleak in bhyves xml->native conversion
Part 2, patches 4 - 21:
Removal of 's390-virtio' machine and the corresponding addressing
type. This was removed in qemu 2.6. The exploration started because
the last patch was for a strange reason checking the address type and
I needed to know if indeed 'virtio-s390' addresses don't support
iothreads. Turns out the whole thing can be deleted.
Part 3, patch 22:
Hotplug of disks with iothreads is broken because the code was moved
prior to address asignment and didn't account for missing address.
Let's remove the whole check as it turned out to be pointless.
Peter Krempa (22):
util: command: Introduce virCommandToStringBuf
qemuxml2arvtest: Ensure newline at the end of generated .args files
bhyveConnectDomainXMLToNative: Fix memory leak in incorrect
virCommandToString usage
tests: qemuxml2argv: Modernize 'watchdog-diag288' test
tests: qemuxml2argv: Modernize 'console-sclp' test
tests: qemuxml2argv: Remove redundant tests for the obsolete
'virtio-390' machine
tests: qemuxml2argv: Modernize 's390-allow-bogus-usb-none' test
tests: qemuxml2xml: Modernize 's390-defaultconsole' case
tests: qemuxml2argv: Modernize 's390-allow-bogus-usb-controller' test
qemu: domain: Remove hack for 's390-virtio' machine
tests: Remove 's390-virtio' machine caps faking
qemu: capabilities: Remove probing of 'virtio-*-s390' devices
qemu: capabilities: Don't probe device properties for 'virtio-*-s390'
devices
qemuxml2argvtest: Use other bus capability for
'non-x86_64-timer-error' case
qemu: Always reject 'virtio-s390' addresses
qemu: Remove last uses of QEMU_CAPS_VIRTIO_S390
qemuxml2*test: Remove QEMU_CAPS_VIRTIO_S390 flag
qemu: capabilities: Retire QEMU_CAPS_VIRTIO_S390
qemu: Drop handling of devices with
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_S390
qemuValidateDomainDeviceDefAddress: Add validation of CCW address
qemuDomainCheckCCWS390AddressSupport: Remove duplicated checker
qemu: validate: Don't check bus type in
qemuValidateDomainDeviceDefDiskIOThreads
src/bhyve/bhyve_driver.c | 4 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 10 --
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 10 +-
src/qemu/qemu_domain.c | 44 -----
src/qemu/qemu_domain.h | 6 -
src/qemu/qemu_domain_address.c | 17 +-
src/qemu/qemu_domain_address.h | 3 +-
src/qemu/qemu_hotplug.c | 17 +-
src/qemu/qemu_validate.c | 48 ++---
src/util/vircommand.c | 50 ++++--
src/util/vircommand.h | 4 +
.../caps_2.11.0.s390x.replies | 108 +++++------
.../caps_2.11.0.x86_64.replies | 152 +++++++---------
.../caps_2.12.0.aarch64.replies | 132 ++++++--------
.../caps_2.12.0.ppc64.replies | 124 ++++++-------
.../caps_2.12.0.s390x.replies | 116 ++++++------
.../caps_2.12.0.x86_64.replies | 168 ++++++++----------
.../caps_3.0.0.ppc64.replies | 124 ++++++-------
.../caps_3.0.0.riscv32.replies | 100 +++++------
.../caps_3.0.0.riscv64.replies | 100 +++++------
.../caps_3.0.0.s390x.replies | 120 ++++++-------
.../caps_3.0.0.x86_64.replies | 168 ++++++++----------
.../caps_3.1.0.ppc64.replies | 124 ++++++-------
.../caps_3.1.0.x86_64.replies | 168 ++++++++----------
.../caps_4.0.0.aarch64.replies | 136 +++++++-------
.../caps_4.0.0.ppc64.replies | 132 ++++++--------
.../caps_4.0.0.riscv32.replies | 128 ++++++-------
.../caps_4.0.0.riscv64.replies | 128 ++++++-------
.../caps_4.0.0.s390x.replies | 120 ++++++-------
.../caps_4.0.0.x86_64.replies | 168 ++++++++----------
.../caps_4.1.0.x86_64.replies | 160 ++++++++---------
.../caps_4.2.0.aarch64.replies | 144 +++++++--------
.../caps_4.2.0.ppc64.replies | 132 ++++++--------
.../caps_4.2.0.s390x.replies | 124 ++++++-------
.../caps_4.2.0.x86_64.replies | 164 ++++++++---------
.../caps_5.0.0.aarch64.replies | 144 +++++++--------
.../caps_5.0.0.ppc64.replies | 140 +++++++--------
.../caps_5.0.0.riscv64.replies | 132 ++++++--------
.../caps_5.0.0.x86_64.replies | 164 ++++++++---------
.../caps_5.1.0.x86_64.replies | 164 ++++++++---------
.../caps_5.2.0.aarch64.replies | 148 +++++++--------
.../caps_5.2.0.ppc64.replies | 140 +++++++--------
.../caps_5.2.0.riscv64.replies | 132 ++++++--------
.../caps_5.2.0.s390x.replies | 124 ++++++-------
.../caps_5.2.0.x86_64.replies | 164 ++++++++---------
.../caps_6.0.0.s390x.replies | 124 ++++++-------
.../caps_6.0.0.x86_64.replies | 164 ++++++++---------
.../caps_6.1.0.x86_64.replies | 164 ++++++++---------
tests/qemuxml2argvdata/console-sclp.args | 28 ---
.../console-sclp.s390x-latest.args | 36 ++++
tests/qemuxml2argvdata/console-sclp.xml | 2 +-
.../qemuxml2argvdata/console-virtio-s390.args | 29 ---
.../qemuxml2argvdata/console-virtio-s390.xml | 24 ---
tests/qemuxml2argvdata/disk-virtio-s390.args | 26 ---
tests/qemuxml2argvdata/disk-virtio-s390.xml | 22 ---
tests/qemuxml2argvdata/net-virtio-s390.args | 26 ---
tests/qemuxml2argvdata/net-virtio-s390.xml | 22 ---
.../s390-allow-bogus-usb-controller.args | 31 ----
...low-bogus-usb-controller.s390x-latest.args | 39 ++++
.../s390-allow-bogus-usb-controller.xml | 2 +-
.../s390-allow-bogus-usb-none.args | 31 ----
...390-allow-bogus-usb-none.s390x-latest.args | 39 ++++
.../s390-allow-bogus-usb-none.xml | 2 +-
.../qemuxml2argvdata/s390-defaultconsole.xml | 2 +-
tests/qemuxml2argvdata/watchdog-diag288.args | 28 ---
.../watchdog-diag288.s390x-latest.args | 36 ++++
tests/qemuxml2argvdata/watchdog-diag288.xml | 2 +-
tests/qemuxml2argvtest.c | 125 +++++--------
...l => s390-defaultconsole.s390x-latest.xml} | 4 +-
tests/qemuxml2xmltest.c | 27 +--
tests/testutilsqemu.c | 2 +-
tests/vircapstest.c | 4 -
74 files changed, 2562 insertions(+), 3387 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/console-sclp.args
create mode 100644 tests/qemuxml2argvdata/console-sclp.s390x-latest.args
delete mode 100644 tests/qemuxml2argvdata/console-virtio-s390.args
delete mode 100644 tests/qemuxml2argvdata/console-virtio-s390.xml
delete mode 100644 tests/qemuxml2argvdata/disk-virtio-s390.args
delete mode 100644 tests/qemuxml2argvdata/disk-virtio-s390.xml
delete mode 100644 tests/qemuxml2argvdata/net-virtio-s390.args
delete mode 100644 tests/qemuxml2argvdata/net-virtio-s390.xml
delete mode 100644 tests/qemuxml2argvdata/s390-allow-bogus-usb-controller.args
create mode 100644 tests/qemuxml2argvdata/s390-allow-bogus-usb-controller.s390x-latest.args
delete mode 100644 tests/qemuxml2argvdata/s390-allow-bogus-usb-none.args
create mode 100644 tests/qemuxml2argvdata/s390-allow-bogus-usb-none.s390x-latest.args
delete mode 100644 tests/qemuxml2argvdata/watchdog-diag288.args
create mode 100644 tests/qemuxml2argvdata/watchdog-diag288.s390x-latest.args
rename tests/qemuxml2xmloutdata/{s390-defaultconsole.xml => s390-defaultconsole.s390x-latest.xml} (82%)
--
2.31.1
3 years, 6 months
[libvirt PATCH 0/3] mdev tweaks
by Jonathon Jongsma
A few minor fixes to mdev support in the nodedev driver
Jonathon Jongsma (3):
nodedev: Remove useless device name from error message
nodedev: Handle NULL command variable
nodedev: handle mdevctl errors consistently
src/node_device/node_device_driver.c | 45 ++++++++++++++--------------
1 file changed, 23 insertions(+), 22 deletions(-)
--
2.31.1
3 years, 6 months
[PATCH] virFindFileInPath: Don't pass NULL to g_canonicalize_filename()
by Michal Privoznik
If given file is not found in $PATH then g_find_program_in_path()
returns NULL. However, g_canonicalize_filename() does not accept
NULL as input.
Fixes: 65c2901906b5e2d707f9184ff3719a5375bab427
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virfile.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index c302202573..4f98b011be 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -1667,6 +1667,8 @@ virFindFileInPath(const char *file)
return NULL;
path = g_find_program_in_path(file);
+ if (!path)
+ return NULL;
/* Workaround for a bug in g_find_program_in_path() not returning absolute
* path as documented. This has been fixed in
--
2.31.1
3 years, 6 months
[PACH 0/2] virStorageBackendRBDGetVolNames: Fix memory leak and clean up
by Peter Krempa
Peter Krempa (2):
virStorageBackendRBDGetVolNames: Fix memory leak in 'rbd_list2'
version
virStorageBackendRBDGetVolNames: Refactor cleanup in 'rbd_list'
version
src/storage/storage_backend_rbd.c | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
--
2.31.1
3 years, 6 months
[PATCH 0/4] qemu: Handle the SDL capability properly
by Peter Krempa
Thomas' recent qemu patch strives to add proper detectability of SDL
support:
https://listman.redhat.com/archives/libvir-list/2021-June/msg00398.html
This series is the libvirt counterpart.
Note that all capability files we have for now claim support so the
actual effect of this patch will be seen just later.
Peter Krempa (4):
qemu: capabilities: Introduce QEMU_CAPS_QUERY_DISPLAY_OPTIONS
qemu: capabilities: Un-retire QEMU_CAPS_SDL
tests: qemuxml2*: Add QEMU_CAPS_SDL to fake-caps tests using SDL
graphics
qemu: capabilities: Fill SDL graphics support only when it's really
supported
src/qemu/qemu_capabilities.c | 11 ++++++++++-
src/qemu/qemu_capabilities.h | 3 ++-
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 2 ++
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 2 ++
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 2 ++
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 2 ++
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 2 ++
tests/qemuxml2argvtest.c | 9 +++++----
tests/qemuxml2xmltest.c | 7 ++++---
42 files changed, 85 insertions(+), 9 deletions(-)
--
2.31.1
3 years, 6 months