[libvirt PATCH v3 00/10] external snapshot revert fixes
by Pavel Hrdina
This fixes reverting external snapshots to not error out in cases where
it should work and makes it correctly load the memory state when
reverting to snapshot of running VM.
This discards v2 completely and makes changes to v1:
- moves qemuSaveImageStartProcess to qemu_process as
qemuProcessStartWithMemoryState
- change it to use cookie from memory state file instead of
using cookie from snapshot xml
- comments improvements
- introduces new helpers to start and stop decompression process
- reintroduces <externalSnapshot/> capability
Pavel Hrdina (10):
qemu_saveimage: extract starting process to qemuSaveImageStartProcess
qemu_saveimage: introduce helpers to decompress memory state file
qemu_saveimage: move qemuSaveImageStartProcess to qemu_process
qemuProcessStartWithMemoryState: allow setting reason for audit log
qemuProcessStartWithMemoryState: add snapshot argument
qemuProcessStartWithMemoryState: make it possible to use without data
qemu_snapshot: fix reverting external snapshot when not all disks are
included
qemu_snapshot: correctly load the saved memory state file
capabilities: report full external snapshot support
NEWS: document support for reverting external snapshots
NEWS.rst | 8 +
docs/formatcaps.rst | 7 +
src/conf/capabilities.c | 1 +
src/conf/capabilities.h | 1 +
src/conf/schemas/capability.rng | 5 +
src/qemu/qemu_capabilities.c | 1 +
src/qemu/qemu_process.c | 95 +++++++++
src/qemu/qemu_process.h | 13 ++
src/qemu/qemu_saveimage.c | 189 +++++++++++-------
src/qemu/qemu_saveimage.h | 15 ++
src/qemu/qemu_snapshot.c | 91 ++++++---
.../qemucaps2xmloutdata/caps.aarch64+hvf.xml | 1 +
tests/qemucaps2xmloutdata/caps.aarch64.xml | 1 +
tests/qemucaps2xmloutdata/caps.ppc.xml | 1 +
tests/qemucaps2xmloutdata/caps.ppc64.xml | 1 +
tests/qemucaps2xmloutdata/caps.riscv64.xml | 1 +
tests/qemucaps2xmloutdata/caps.s390x.xml | 1 +
tests/qemucaps2xmloutdata/caps.sparc.xml | 1 +
tests/qemucaps2xmloutdata/caps.x86_64+hvf.xml | 1 +
tests/qemucaps2xmloutdata/caps.x86_64.xml | 1 +
20 files changed, 328 insertions(+), 107 deletions(-)
--
2.41.0
1 year, 2 months
[RFC PATCH libvirt v1 0/3] Ensure full early console access with libvirt
by Marc Hartmayer
Currently, early console output may be lost, e.g. if starting a guest with
`virsh start --console` guest, which can make debugging of early failures very
difficult
(like zipl messages or disabled wait conditions happening early). This is
because QEMU may emit serial console output before the libvirt console client
starts to consume data from the pts. This can be prevented by starting the guest
in paused state, connect to the console and then resume the guest.
Note: There is still a problem in QEMU itself, see QEMU patch series `[PATCH]
chardev/char-pty: Avoid losing bytes when the other side just (re-)connected`
[1]
[1] https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg02725.html
Marc Hartmayer (3):
virsh: add `console --resume` support
Improve `virsh start --console` behavior
Improve `virsh create --console` behavior
tools/virsh-console.c | 8 ++++++++
tools/virsh-console.h | 1 +
tools/virsh-domain.c | 32 ++++++++++++++++++++++++++------
3 files changed, 35 insertions(+), 6 deletions(-)
base-commit: 3fd64fb0e236fc80ffa2cc977c0d471f11fc39bf
--
2.34.1
1 year, 2 months
[PATCH 00/31] September maintainer omnibus (tests, gdbstub, plugins)
by Alex Bennée
Hi,
This wraps up my current testing, gdbstub and plugin trees in an
attempt to do my part to reduce the qemu-devel fire hose.
For testing we have a number of cleanups to configure to better handle
selecting the container engine (removing the ability to dynamically
switch). I had to do this as one of my build boxes has recently
acquired a broken podman install. There are also some updates to
avocado sbsa-ref as well as tweaks to the gitlab setup to minimise the
amount of wheel spinning we do. The deprecation of CRIS is a little
provocative but if we do want to keep it we need to stop relying on a
rapidly dated fedora image to do it. Finally we include the swtpm
package to widen the testing we do through avocado.
The gdbstub updates are from Akihiko and include a bunch of clean-ups
that will hopefully pave the way for another series which allows the
plugins to access register values using the gdb backend to source the
data.
Finally the plugins has a few fixes which includes a tweak to make SH4
atomic modelling more plugin friendly. This allows for Matt's fix to
deal with non-regular instruction encoding spanning pages. I also fix
a number of coverity warnings.
The final time control patches are still RFC and not ready for merging
but I include them for completeness.
The following still need review:
contrib/plugins: add iops plugin example for cost modelling
plugins: add time control API
sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time
qtest: use cpu interface in qtest_clock_warp (1 acks, 1 sobs, 0 tbs)
contrib/plugins: fix coverity warning in hotblocks
contrib/plugins: fix coverity warning in lockstep
contrib/plugins: fix coverity warning in cache
configure: ensure dependency for cross-compile setup
configure: remove gcc version suffixes
configure: allow user to override docker engine
tests/docker: make docker engine choice entirely configure driven
docs: mark CRIS support as deprecated
tests/lcitool: add swtpm to the package list
Akihiko Odaki (12):
gdbstub: Fix target_xml initialization
gdbstub: Fix target.xml response
plugins: Check if vCPU is realized
contrib/plugins: Use GRWLock in execlog
gdbstub: Introduce GDBFeature structure
target/arm: Move the reference to arm-core.xml
hw/core/cpu: Return static value with gdb_arch_name()
gdbstub: Use g_markup_printf_escaped()
target/arm: Remove references to gdb_has_xml
target/ppc: Remove references to gdb_has_xml
gdbstub: Remove gdb_has_xml variable
gdbstub: Replace gdb_regs with an array
Alex Bennée (15):
tests/lcitool: add swtpm to the package list
gitlab: shuffle some targets and reduce avocado noise
docs: mark CRIS support as deprecated
tests/docker: make docker engine choice entirely configure driven
configure: allow user to override docker engine
configure: remove gcc version suffixes
configure: ensure dependency for cross-compile setup
contrib/plugins: fix coverity warning in cache
contrib/plugins: fix coverity warning in lockstep
contrib/plugins: fix coverity warning in hotblocks
sysemu: add set_virtual_time to accel ops
qtest: use cpu interface in qtest_clock_warp
sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time
plugins: add time control API
contrib/plugins: add iops plugin example for cost modelling
Marcin Juszkiewicz (1):
tests/avocado: update firmware to enable sbsa-ref/neoverse-v1
Matt Borgerson (1):
plugins: Set final instruction count in plugin_gen_tb_end
Richard Henderson (2):
accel/tcg: Add plugin_enabled to DisasContextBase
target/sh4: Disable decode_gusa when plugins enabled
MAINTAINERS | 2 +-
docs/about/deprecated.rst | 11 +
configure | 15 +-
meson.build | 2 +-
gdbstub/internals.h | 2 -
include/exec/gdbstub.h | 17 +-
include/exec/plugin-gen.h | 4 +-
include/exec/translator.h | 2 +
include/hw/core/cpu.h | 4 +-
include/qemu/qemu-plugin.h | 19 ++
include/qemu/timer.h | 15 +
include/sysemu/accel-ops.h | 18 +-
include/sysemu/cpu-timers.h | 27 +-
include/sysemu/qtest.h | 1 +
target/ppc/internal.h | 2 +-
accel/qtest/qtest.c | 1 +
accel/tcg/plugin-gen.c | 6 +-
accel/tcg/translator.c | 3 +-
contrib/plugins/cache.c | 18 +-
contrib/plugins/execlog.c | 16 +-
contrib/plugins/hotblocks.c | 2 +-
contrib/plugins/iops.c | 261 ++++++++++++++++++
contrib/plugins/lockstep.c | 13 +-
gdbstub/gdbstub.c | 95 +++----
gdbstub/softmmu.c | 2 +-
plugins/api.c | 28 ++
plugins/core.c | 2 +-
softmmu/cpus.c | 11 +
softmmu/qtest.c | 26 +-
...t-virtual-clock.c => cpus-virtual-clock.c} | 5 +
stubs/gdbstub.c | 6 +-
target/arm/cpu.c | 9 +-
target/arm/cpu64.c | 4 +-
target/arm/gdbstub.c | 32 +--
target/i386/cpu.c | 6 +-
target/loongarch/cpu.c | 8 +-
target/ppc/gdbstub.c | 24 +-
target/riscv/cpu.c | 6 +-
target/s390x/cpu.c | 4 +-
target/sh4/translate.c | 41 ++-
target/tricore/cpu.c | 4 +-
util/qemu-timer.c | 26 ++
.gitlab-ci.d/buildtest.yml | 15 +-
.gitlab-ci.d/cirrus/macos-12.vars | 2 +-
contrib/plugins/Makefile | 1 +
plugins/qemu-plugins.symbols | 2 +
scripts/feature_to_c.py | 48 ++++
scripts/feature_to_c.sh | 69 -----
stubs/meson.build | 2 +-
tests/avocado/machine_aarch64_sbsaref.py | 25 +-
tests/docker/Makefile.include | 7 +-
tests/docker/dockerfiles/alpine.docker | 1 +
tests/docker/dockerfiles/centos8.docker | 1 +
.../dockerfiles/debian-amd64-cross.docker | 1 +
tests/docker/dockerfiles/debian-amd64.docker | 1 +
.../dockerfiles/debian-arm64-cross.docker | 1 +
.../dockerfiles/debian-armhf-cross.docker | 1 +
.../dockerfiles/debian-ppc64el-cross.docker | 1 +
.../dockerfiles/debian-s390x-cross.docker | 1 +
.../dockerfiles/fedora-win32-cross.docker | 1 +
.../dockerfiles/fedora-win64-cross.docker | 1 +
tests/docker/dockerfiles/fedora.docker | 1 +
tests/docker/dockerfiles/opensuse-leap.docker | 1 +
tests/docker/dockerfiles/ubuntu2204.docker | 1 +
tests/lcitool/libvirt-ci | 2 +-
tests/lcitool/projects/qemu.yml | 1 +
66 files changed, 689 insertions(+), 298 deletions(-)
create mode 100644 contrib/plugins/iops.c
rename stubs/{cpus-get-virtual-clock.c => cpus-virtual-clock.c} (68%)
create mode 100755 scripts/feature_to_c.py
delete mode 100644 scripts/feature_to_c.sh
--
2.39.2
1 year, 2 months
[PATCH v3] interface: fix udev_device_get_sysattr_value return value check
by Dmitry Frolov
Reviewing the code I found that return value of function
udev_device_get_sysattr_value() is dereferenced without a check.
udev_device_get_sysattr_value() may return NULL by number of reasons.
v2: VIR_DEBUG added, replaced STREQ(NULLSTR()) with STREQ_NULLABLE()
v3: More checks added, to skip earlier. More verbose VIR_DEBUG.
Signed-off-by: Dmitry Frolov <frolov(a)swemel.ru>
---
src/interface/interface_backend_udev.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index a0485ddd21..fb6799ed94 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -23,6 +23,7 @@
#include <dirent.h>
#include <libudev.h>
+#include "virlog.h"
#include "virerror.h"
#include "virfile.h"
#include "datatypes.h"
@@ -40,6 +41,8 @@
#define VIR_FROM_THIS VIR_FROM_INTERFACE
+VIR_LOG_INIT("interface.interface_backend_udev");
+
struct udev_iface_driver {
struct udev *udev;
/* pid file FD, ensures two copies of the driver can't use the same root */
@@ -354,11 +357,20 @@ udevConnectListAllInterfaces(virConnectPtr conn,
const char *macaddr;
g_autoptr(virInterfaceDef) def = NULL;
- path = udev_list_entry_get_name(dev_entry);
- dev = udev_device_new_from_syspath(udev, path);
- name = udev_device_get_sysname(dev);
+ if (!(path = udev_list_entry_get_name(dev_entry))) {
+ VIR_DEBUG("Skipping interface, path == NULL");
+ continue;
+ }
+ if (!(dev = udev_device_new_from_syspath(udev, path))) {
+ VIR_DEBUG("Skipping interface '%s', dev == NULL", path);
+ continue;
+ }
+ if (!(name = udev_device_get_sysname(dev))) {
+ VIR_DEBUG("Skipping interface '%s', name == NULL", path);
+ continue;
+ }
macaddr = udev_device_get_sysattr_value(dev, "address");
- status = STREQ(udev_device_get_sysattr_value(dev, "operstate"), "up");
+ status = STREQ_NULLABLE(udev_device_get_sysattr_value(dev, "operstate"), "up");
def = udevGetMinimalDefForDevice(dev);
if (!virConnectListAllInterfacesCheckACL(conn, def)) {
@@ -964,9 +976,9 @@ udevGetIfaceDef(struct udev *udev, const char *name)
/* MTU */
mtu_str = udev_device_get_sysattr_value(dev, "mtu");
- if (virStrToLong_ui(mtu_str, NULL, 10, &mtu) < 0) {
+ if (!mtu_str || virStrToLong_ui(mtu_str, NULL, 10, &mtu) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse MTU value '%1$s'"), mtu_str);
+ _("Could not parse MTU value '%1$s'"), NULLSTR(mtu_str));
goto error;
}
ifacedef->mtu = mtu;
@@ -1089,7 +1101,7 @@ udevInterfaceIsActive(virInterfacePtr ifinfo)
goto cleanup;
/* Check if it's active or not */
- status = STREQ(udev_device_get_sysattr_value(dev, "operstate"), "up");
+ status = STREQ_NULLABLE(udev_device_get_sysattr_value(dev, "operstate"), "up");
udev_device_unref(dev);
--
2.34.1
1 year, 2 months
[libvirt PATCH 1/2] util: Fix error return for virProcessKillPainfullyDelay()
by Jonathon Jongsma
Commit 93af79fb removed a cleanup label in favor of returning error
values directly in certain cases. But the final return value was changed
from -1 to 0. If we get to the end of the function, that means that
we've waited for the process to exit but it still exists. So we should
return -1. The error message was still being set correctly, but we were
returning a success status (0).
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/util/virprocess.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index 31b833e5c8..6ce5ef99a9 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -436,7 +436,7 @@ virProcessKillPainfullyDelay(pid_t pid, bool force, unsigned int extradelay, boo
_("Failed to terminate process %1$lld with SIG%2$s"),
(long long)pid, signame);
- return 0;
+ return -1;
}
--
2.41.0
1 year, 2 months
[libvirt PATCH 0/3] qemu: validate more filesystem elements (virtiofs saga)
by Ján Tomko
Ján Tomko (3):
qemu: fix indentation in qemuValidateDomainDeviceDefFS
qemu: extend filesystem XML validation
docs: formatdomain: clarify support of some filesystem options
docs/formatdomain.rst | 5 ++++-
src/qemu/qemu_validate.c | 35 ++++++++++++++++++++++++-----------
2 files changed, 28 insertions(+), 12 deletions(-)
--
2.41.0
1 year, 2 months
[PATCH] libxl: Fix connection to modular network daemon
by Jim Fehlig
In a modular daemon configuration, virtxend does not support the
virNetwork* APIs. It should open a connection to virtnetworkd when
using those APIs, but currently always opens a connection to
"xen:///system". Switch to using virGetConnectNetwork to obtain a
valid connection instead of using the hardcoded URI.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 4582126d19..62e1be6672 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1372,7 +1372,7 @@ libxlMakeNic(virDomainDef *def,
break;
case VIR_DOMAIN_NET_TYPE_NETWORK:
{
- if (!(conn = virConnectOpen("xen:///system")))
+ if (!(conn = virGetConnectNetwork()))
goto cleanup;
if (!(network =
--
2.42.0
1 year, 2 months
[libvirt PATCH v8 00/37] Use nbdkit for http/ftp/ssh network drives in libvirt
by Jonathon Jongsma
This is the eighth version of this patch series. See
https://bugzilla.redhat.com/show_bug.cgi?id=2016527 for more information.
Note that testing this requires selinux policy changes which are not fully
done, but there is a new policy in development that has allowed me to run with
selinux in enforcing mode for the common cases. See
https://bugzilla.redhat.com/show_bug.cgi?id=2182505 for more information. The
following scenarios should work now with selinux enabled using the selinux
policy from that bug:
- http/https disks
- ssh disks with password authentication
- ssh disks with passwordless keyfile
The one major thing that doesn't work and is difficult to get working with
selinux enabled is the ssh-agent. This is because there doesn't seem to be any
selinux policy for ssh-agent, so by default the ssh-agent socket is labeled
unconfined_t. We cannot allow access from the libvirt/qemu to unconfined_t
because that would open up access to just about anything on the host. So
additional work will likely be necessary for ssh-agent/libvirt interaction in
the future. Fortunately ssh-agent is something that never was really supported
with the old qemu block driver either, so I think we could potentially merge
this patchset either without the ssh-agent patches or with a note that
ssh-agent won't work with selinux enabled.
Changes in v8:
- Hopefully addressed all of Peter's issues, in addition to:
- updated documentation to say 9.8.0, since 9.7.0 is currently in freeze
- used WITH_NBDKIT instead of WITH_DECL_SYS_PIDFD_OPEN to make the code a bit
more concise and understandable
- enabled ci by adding libnbd to the dependencies, which uncovered a couple
additional minor issues with those platforms that don't support the
pidfd_open syscall
- don't run nbdkit tests when WITH_NBDKIT is not defined
- avoid warnings with unused function arguments
- note that the ubuntu containers are currently failing due to a
LeakSanitizer error, but I haven't reproduced it locally and can't figure
out how to get better information from the leak sanitizer. Pointers
appreciated: https://gitlab.com/jjongsma/libvirt/-/jobs/4991631193
- One change of note is a new patch "qemu: improve error handling when
restarting nbdkit". In order to provide better error reporting to the
user and avoid VIR_WARN as suggested by Peter, some functions now return an
error and this error is propagated up to qemuProcessReconnect(). This could
potentially result in running domains being killed upon a libvirt restart,
but only if they were in a state where they were was not a running nbdkit
backend or libvirt couldn't monitor the process nbdkit.
Jonathon Jongsma (37):
schema: allow 'ssh' as a protocol for network disks
qemu: Add functions for determining nbdkit availability
qemu: expand nbdkit capabilities
util: Allow virFileCache data to be any GObject
qemu: implement basic virFileCache for nbdkit caps
qemu: implement persistent file cache for nbdkit caps
qemu: use file cache for nbdkit caps
qemu: Add qemuNbdkitProcess
qemu: query nbdkit module dir from binary
qemu: add functions to start and stop nbdkit
Generalize qemuDomainLogContextNew()
qemu: Extract qemuDomainLogContext into a new file
qemu: move qemuProcessReadLog() to qemuLogContext
qemu: log error output from nbdkit
tests: add ability to test various nbdkit capabilities
qemu: split qemuDomainSecretStorageSourcePrepare
qemu: include nbdkit state in private xml
util: secure erase virCommand send buffers
qemu: pass sensitive data to nbdkit via pipe
qemu: use nbdkit to serve network disks if available
util: make virCommandSetSendBuffer testable
tests: add tests for nbdkit invocation
qemu: add test for authenticating a https network disk
qemu: Add Taint for nbdkit restart failure
qemu: Monitor nbdkit process for exit
qemu: improve error handling when restarting nbdkit
qemu: try to connect to nbdkit early to detect errors
schema: add password configuration for ssh disk
qemu: implement password auth for ssh disks with nbdkit
schema: add configuration for host verification of ssh disks
qemu: implement knownHosts for ssh disks with nbdkit
schema: add keyfile configuration for ssh disks
qemu: implement keyfile auth for ssh disks with nbdkit
schema: add ssh-agent configuration for ssh disks
qemu: implement ssh-agent auth for ssh disks with nbdkit
rpm: update spec file for for nbdkit support
ci: add libnbd to build
build-aux/syntax-check.mk | 2 +-
ci/buildenv/almalinux-8.sh | 1 +
ci/buildenv/centos-stream-8.sh | 1 +
ci/buildenv/centos-stream-9.sh | 1 +
ci/buildenv/debian-12-cross-aarch64.sh | 1 +
ci/buildenv/debian-12-cross-armv6l.sh | 1 +
ci/buildenv/debian-12-cross-armv7l.sh | 1 +
ci/buildenv/debian-12-cross-i686.sh | 1 +
ci/buildenv/debian-12-cross-mips64el.sh | 1 +
ci/buildenv/debian-12-cross-mipsel.sh | 1 +
ci/buildenv/debian-12-cross-ppc64le.sh | 1 +
ci/buildenv/debian-12-cross-s390x.sh | 1 +
ci/buildenv/debian-12.sh | 1 +
ci/buildenv/debian-sid-cross-aarch64.sh | 1 +
ci/buildenv/debian-sid-cross-armv6l.sh | 1 +
ci/buildenv/debian-sid-cross-armv7l.sh | 1 +
ci/buildenv/debian-sid-cross-i686.sh | 1 +
ci/buildenv/debian-sid-cross-mips64el.sh | 1 +
ci/buildenv/debian-sid-cross-mipsel.sh | 1 +
ci/buildenv/debian-sid-cross-ppc64le.sh | 1 +
ci/buildenv/debian-sid-cross-s390x.sh | 1 +
ci/buildenv/debian-sid.sh | 1 +
ci/buildenv/fedora-37.sh | 1 +
ci/buildenv/fedora-38-cross-mingw32.sh | 1 +
ci/buildenv/fedora-38-cross-mingw64.sh | 1 +
ci/buildenv/fedora-38.sh | 1 +
ci/buildenv/fedora-rawhide-cross-mingw32.sh | 1 +
ci/buildenv/fedora-rawhide-cross-mingw64.sh | 1 +
ci/buildenv/fedora-rawhide.sh | 1 +
ci/buildenv/opensuse-leap-15.sh | 1 +
ci/buildenv/opensuse-tumbleweed.sh | 1 +
ci/buildenv/ubuntu-2204.sh | 1 +
ci/containers/almalinux-8.Dockerfile | 1 +
ci/containers/centos-stream-8.Dockerfile | 1 +
ci/containers/centos-stream-9.Dockerfile | 1 +
.../debian-12-cross-aarch64.Dockerfile | 1 +
.../debian-12-cross-armv6l.Dockerfile | 1 +
.../debian-12-cross-armv7l.Dockerfile | 1 +
ci/containers/debian-12-cross-i686.Dockerfile | 1 +
.../debian-12-cross-mips64el.Dockerfile | 1 +
.../debian-12-cross-mipsel.Dockerfile | 1 +
.../debian-12-cross-ppc64le.Dockerfile | 1 +
.../debian-12-cross-s390x.Dockerfile | 1 +
ci/containers/debian-12.Dockerfile | 1 +
.../debian-sid-cross-aarch64.Dockerfile | 1 +
.../debian-sid-cross-armv6l.Dockerfile | 1 +
.../debian-sid-cross-armv7l.Dockerfile | 1 +
.../debian-sid-cross-i686.Dockerfile | 1 +
.../debian-sid-cross-mips64el.Dockerfile | 1 +
.../debian-sid-cross-mipsel.Dockerfile | 1 +
.../debian-sid-cross-ppc64le.Dockerfile | 1 +
.../debian-sid-cross-s390x.Dockerfile | 1 +
ci/containers/debian-sid.Dockerfile | 1 +
ci/containers/fedora-37.Dockerfile | 1 +
.../fedora-38-cross-mingw32.Dockerfile | 1 +
.../fedora-38-cross-mingw64.Dockerfile | 1 +
ci/containers/fedora-38.Dockerfile | 1 +
.../fedora-rawhide-cross-mingw32.Dockerfile | 1 +
.../fedora-rawhide-cross-mingw64.Dockerfile | 1 +
ci/containers/fedora-rawhide.Dockerfile | 1 +
ci/containers/opensuse-leap-15.Dockerfile | 1 +
ci/containers/opensuse-tumbleweed.Dockerfile | 1 +
ci/containers/ubuntu-2204.Dockerfile | 1 +
ci/lcitool/projects/libvirt.yml | 1 +
docs/formatdomain.rst | 45 +-
libvirt.spec.in | 8 +
meson.build | 18 +
meson_options.txt | 1 +
po/POTFILES | 2 +
src/conf/domain_conf.c | 38 +
src/conf/domain_conf.h | 1 +
src/conf/schemas/domaincommon.rng | 55 +
src/conf/storage_source_conf.c | 6 +
src/conf/storage_source_conf.h | 6 +-
src/libvirt_private.syms | 1 +
src/qemu/meson.build | 3 +
src/qemu/qemu_block.c | 162 ++-
src/qemu/qemu_conf.c | 22 +
src/qemu/qemu_conf.h | 6 +
src/qemu/qemu_domain.c | 436 +++---
src/qemu/qemu_domain.h | 31 +-
src/qemu/qemu_driver.c | 20 +
src/qemu/qemu_extdevice.c | 62 +
src/qemu/qemu_hotplug.c | 7 +
src/qemu/qemu_logcontext.c | 329 +++++
src/qemu/qemu_logcontext.h | 41 +
src/qemu/qemu_nbdkit.c | 1291 +++++++++++++++++
src/qemu/qemu_nbdkit.h | 119 ++
src/qemu/qemu_nbdkitpriv.h | 31 +
src/qemu/qemu_process.c | 126 +-
src/qemu/qemu_process.h | 3 +
src/util/vircommand.c | 19 +-
src/util/vircommand.h | 8 +
src/util/vircommandpriv.h | 4 +
src/util/virfilecache.c | 14 +-
src/util/virfilecache.h | 2 +-
tests/meson.build | 5 +
tests/qemublocktest.c | 2 +-
...w2-invalid.json => network-ssh-qcow2.json} | 0
...cow2-invalid.xml => network-ssh-qcow2.xml} | 0
.../disk-cdrom-network.args.disk0 | 6 +
.../disk-cdrom-network.args.disk1 | 8 +
.../disk-cdrom-network.args.disk1.pipe.778 | 1 +
.../disk-cdrom-network.args.disk2 | 8 +
.../disk-cdrom-network.args.disk2.pipe.780 | 1 +
.../disk-network-http.args.disk0 | 6 +
.../disk-network-http.args.disk1 | 5 +
.../disk-network-http.args.disk2 | 6 +
.../disk-network-http.args.disk2.pipe.778 | 1 +
.../disk-network-http.args.disk3 | 7 +
.../disk-network-http.args.disk3.pipe.780 | 1 +
...work-source-curl-nbdkit-backing.args.disk0 | 7 +
...ce-curl-nbdkit-backing.args.disk0.pipe.778 | 1 +
.../disk-network-source-curl.args.disk0 | 7 +
...sk-network-source-curl.args.disk0.pipe.778 | 1 +
.../disk-network-source-curl.args.disk1 | 9 +
...sk-network-source-curl.args.disk1.pipe.780 | 1 +
...sk-network-source-curl.args.disk1.pipe.782 | 1 +
.../disk-network-source-curl.args.disk2 | 7 +
...sk-network-source-curl.args.disk2.pipe.782 | 1 +
...sk-network-source-curl.args.disk2.pipe.784 | 1 +
.../disk-network-source-curl.args.disk3 | 6 +
.../disk-network-source-curl.args.disk4 | 6 +
.../disk-network-ssh-key.args.disk0 | 9 +
.../disk-network-ssh-key.args.disk1 | 9 +
.../disk-network-ssh-password.args.disk0 | 9 +
...k-network-ssh-password.args.disk0.pipe.778 | 1 +
.../disk-network-ssh.args.disk0 | 7 +
.../disk-network-ssh.args.disk1 | 8 +
.../disk-network-ssh.args.disk1.pipe.778 | 1 +
.../disk-network-ssh.args.disk2 | 9 +
tests/qemunbdkittest.c | 310 ++++
tests/qemustatusxml2xmldata/modern-in.xml | 4 +
...sk-cdrom-network-nbdkit.x86_64-latest.args | 42 +
.../disk-cdrom-network-nbdkit.xml | 1 +
...isk-network-http-nbdkit.x86_64-latest.args | 44 +
.../disk-network-http-nbdkit.xml | 1 +
...rce-curl-nbdkit-backing.x86_64-latest.args | 37 +
...isk-network-source-curl-nbdkit-backing.xml | 45 +
...work-source-curl-nbdkit.x86_64-latest.args | 49 +
.../disk-network-source-curl-nbdkit.xml | 1 +
...isk-network-source-curl.x86_64-latest.args | 53 +
.../disk-network-source-curl.xml | 74 +
.../qemuxml2argvdata/disk-network-ssh-key.xml | 44 +
...disk-network-ssh-nbdkit.x86_64-latest.args | 35 +
.../disk-network-ssh-nbdkit.xml | 1 +
...sk-network-ssh-password.x86_64-latest.args | 35 +
.../disk-network-ssh-password.xml | 35 +
.../disk-network-ssh.x86_64-latest.args | 35 +
tests/qemuxml2argvdata/disk-network-ssh.xml | 32 +
tests/qemuxml2argvtest.c | 23 +
tests/testutilsqemu.c | 26 +
tests/testutilsqemu.h | 4 +
153 files changed, 3599 insertions(+), 472 deletions(-)
create mode 100644 src/qemu/qemu_logcontext.c
create mode 100644 src/qemu/qemu_logcontext.h
create mode 100644 src/qemu/qemu_nbdkit.c
create mode 100644 src/qemu/qemu_nbdkit.h
create mode 100644 src/qemu/qemu_nbdkitpriv.h
rename tests/qemublocktestdata/imagecreate/{network-ssh-qcow2-invalid.json => network-ssh-qcow2.json} (100%)
rename tests/qemublocktestdata/imagecreate/{network-ssh-qcow2-invalid.xml => network-ssh-qcow2.xml} (100%)
create mode 100644 tests/qemunbdkitdata/disk-cdrom-network.args.disk0
create mode 100644 tests/qemunbdkitdata/disk-cdrom-network.args.disk1
create mode 100644 tests/qemunbdkitdata/disk-cdrom-network.args.disk1.pipe.778
create mode 100644 tests/qemunbdkitdata/disk-cdrom-network.args.disk2
create mode 100644 tests/qemunbdkitdata/disk-cdrom-network.args.disk2.pipe.780
create mode 100644 tests/qemunbdkitdata/disk-network-http.args.disk0
create mode 100644 tests/qemunbdkitdata/disk-network-http.args.disk1
create mode 100644 tests/qemunbdkitdata/disk-network-http.args.disk2
create mode 100644 tests/qemunbdkitdata/disk-network-http.args.disk2.pipe.778
create mode 100644 tests/qemunbdkitdata/disk-network-http.args.disk3
create mode 100644 tests/qemunbdkitdata/disk-network-http.args.disk3.pipe.780
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl-nbdkit-backing.args.disk0.pipe.778
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk0
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk0.pipe.778
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk1
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk1.pipe.780
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk1.pipe.782
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk2
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk2.pipe.782
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk2.pipe.784
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk3
create mode 100644 tests/qemunbdkitdata/disk-network-source-curl.args.disk4
create mode 100644 tests/qemunbdkitdata/disk-network-ssh-key.args.disk0
create mode 100644 tests/qemunbdkitdata/disk-network-ssh-key.args.disk1
create mode 100644 tests/qemunbdkitdata/disk-network-ssh-password.args.disk0
create mode 100644 tests/qemunbdkitdata/disk-network-ssh-password.args.disk0.pipe.778
create mode 100644 tests/qemunbdkitdata/disk-network-ssh.args.disk0
create mode 100644 tests/qemunbdkitdata/disk-network-ssh.args.disk1
create mode 100644 tests/qemunbdkitdata/disk-network-ssh.args.disk1.pipe.778
create mode 100644 tests/qemunbdkitdata/disk-network-ssh.args.disk2
create mode 100644 tests/qemunbdkittest.c
create mode 100644 tests/qemuxml2argvdata/disk-cdrom-network-nbdkit.x86_64-latest.args
create mode 120000 tests/qemuxml2argvdata/disk-cdrom-network-nbdkit.xml
create mode 100644 tests/qemuxml2argvdata/disk-network-http-nbdkit.x86_64-latest.args
create mode 120000 tests/qemuxml2argvdata/disk-network-http-nbdkit.xml
create mode 100644 tests/qemuxml2argvdata/disk-network-source-curl-nbdkit-backing.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-network-source-curl-nbdkit-backing.xml
create mode 100644 tests/qemuxml2argvdata/disk-network-source-curl-nbdkit.x86_64-latest.args
create mode 120000 tests/qemuxml2argvdata/disk-network-source-curl-nbdkit.xml
create mode 100644 tests/qemuxml2argvdata/disk-network-source-curl.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-network-source-curl.xml
create mode 100644 tests/qemuxml2argvdata/disk-network-ssh-key.xml
create mode 100644 tests/qemuxml2argvdata/disk-network-ssh-nbdkit.x86_64-latest.args
create mode 120000 tests/qemuxml2argvdata/disk-network-ssh-nbdkit.xml
create mode 100644 tests/qemuxml2argvdata/disk-network-ssh-password.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-network-ssh-password.xml
create mode 100644 tests/qemuxml2argvdata/disk-network-ssh.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-network-ssh.xml
--
2.41.0
1 year, 3 months
[libvirt PATCH] qemu: Improve error message for failed firmware autoselection
by Andrea Bolognani
The current message can be misleading, because it seems to suggest
that no firmware of the requested type is available on the system.
What actually happens most of the time, however, is that despite
having multiple firmwares of the right type to choose from, none
of them is suitable because of lacking some specific feature or
being incompatible with some setting that the user has explicitly
enabled.
Providing an error message that describes exactly the problem is
not feasible, since we would have to list each candidate along
with the reason why we rejected it, which would get out of hand
quickly.
As a small but hopefully helpful improvement over the current
situation, reword the error message to make it clearer that the
culprit is not necessarily the firmware type, but rather the
overall domain configuration.
Suggested-by: Michael Kjörling <7d1340278307(a)ewoof.net>
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_firmware.c | 2 +-
.../firmware-auto-efi-loader-path-nonstandard.x86_64-latest.err | 2 +-
...rmware-auto-efi-nvram-template-nonstandard.x86_64-latest.err | 2 +-
.../firmware-auto-efi-rw-abi-update.x86_64-latest.err | 2 +-
tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c
index 3dcd139a47..d39e61d071 100644
--- a/src/qemu/qemu_firmware.c
+++ b/src/qemu/qemu_firmware.c
@@ -1854,7 +1854,7 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
}
} else {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("Unable to find any firmware to satisfy '%1$s'"),
+ _("Unable to find '%1$s' firmware that is compatible with the current configuration"),
virDomainOsDefFirmwareTypeToString(def->os.firmware));
return -1;
}
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-loader-path-nonstandard.x86_64-latest.err b/tests/qemuxml2argvdata/firmware-auto-efi-loader-path-nonstandard.x86_64-latest.err
index 4cfde1bd2e..3edb2b3451 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-loader-path-nonstandard.x86_64-latest.err
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-loader-path-nonstandard.x86_64-latest.err
@@ -1 +1 @@
-operation failed: Unable to find any firmware to satisfy 'efi'
+operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-nvram-template-nonstandard.x86_64-latest.err b/tests/qemuxml2argvdata/firmware-auto-efi-nvram-template-nonstandard.x86_64-latest.err
index 4cfde1bd2e..3edb2b3451 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-nvram-template-nonstandard.x86_64-latest.err
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-nvram-template-nonstandard.x86_64-latest.err
@@ -1 +1 @@
-operation failed: Unable to find any firmware to satisfy 'efi'
+operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.err b/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.err
index 4cfde1bd2e..3edb2b3451 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.err
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-rw-abi-update.x86_64-latest.err
@@ -1 +1 @@
-operation failed: Unable to find any firmware to satisfy 'efi'
+operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err b/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err
index 4cfde1bd2e..3edb2b3451 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-rw.x86_64-latest.err
@@ -1 +1 @@
-operation failed: Unable to find any firmware to satisfy 'efi'
+operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
--
2.41.0
1 year, 3 months
[PATCH 0/3] A couple of virtio-mem/virtio-pmem address improvements
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (3):
domain_validate: Validate VIRTIO_PMEM address alignment
virDomainMemoryDefValidate: Fix VIRTIO_MEM alignment check
virDomainMemoryDefValidate: Check for overlapping memory devices
src/conf/domain_validate.c | 59 ++++++++++++++++++-
...rtio-mem-overlap-address.x86_64-latest.err | 1 +
...ory-hotplug-virtio-mem-overlap-address.xml | 50 ++++++++++++++++
tests/qemuxml2argvtest.c | 1 +
4 files changed, 110 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-virtio-mem-overlap-address.x86_64-latest.err
create mode 100644 tests/qemuxml2argvdata/memory-hotplug-virtio-mem-overlap-address.xml
--
2.41.0
1 year, 3 months