[PATCHv2 0/2] ch: minor fixes - segfault and last meaningful error preservation
by Kirill Shchetiniuk
During fixing some other issue found out a few minor bugs
related to CH driver.
First bug is related to monitor object ref count
in virCHStartEventHandler and virCHEventHandlerLoop, as
object was unrefed by parent while is still used by child
thread. Moved object unref to the correct place to the
correct thread.
Second bug is related to v object ref count in
virCHStartEventHandler, as vm object was unrefed,
while is still used later, move object unref to
after its last usage.
Third bug is related to error handling and
propagation. Last meaninful error was reset
by virCHProcessStop, which have led to
unknown error message in virsh. Add error
preservation at the begining of the function
and restoring it at the end to keep
consistent error output
Kirill Shchetiniuk (2):
ch: virCHProcessStop preserve last meaningful error
ch: ref count fix in virCHEventHandlerLoop and virCHStartEventHandler
src/ch/ch_events.c | 4 ++--
src/ch/ch_process.c | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
--
2.48.1
1 month, 3 weeks
[PATCH] docs: Fix some types
by Thomas Huth
From: Thomas Huth <thuth(a)redhat.com>
Found with the codespell utility.
Signed-off-by: Thomas Huth <thuth(a)redhat.com>
---
docs/formatcaps.rst | 2 +-
docs/formatdomain.rst | 4 ++--
docs/glib-adoption.rst | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/formatcaps.rst b/docs/formatcaps.rst
index da6b215780..7e525487e7 100644
--- a/docs/formatcaps.rst
+++ b/docs/formatcaps.rst
@@ -39,7 +39,7 @@ The ``<host/>`` element consists of the following child elements:
The host CPU architecture and features.
Note that, while this element contains a ``topology`` sub-element,
- the information contained therein is farily high-level and likely
+ the information contained therein is fairly high-level and likely
not very useful when it comes to optimizing guest vCPU placement.
Look into the ``topology`` *element*, described below, for more
detailed information.
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index c1876ad467..4bc6a318f5 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -3468,7 +3468,7 @@ paravirtualized driver is specified via the ``disk`` element.
automatically distributed among the configured iothreads.
Optionally the ``iothread`` element can have multiple ``queue``
- subelements with mandatory ``id`` atribute specifying that the iothread
+ subelements with mandatory ``id`` attribute specifying that the iothread
should be used to handle given virt queue. If queue mapping is present
the ``queues`` attribute of ``driver`` must be configured and all
configured virt queues must be included in the mapping. The
@@ -8423,7 +8423,7 @@ Example: usage of external TPM emulator :since:`Since 9.0.0`
This element does not work with the ``passthrough`` backend.
- When specified, it is the user's responsability to prevent files from being
+ When specified, it is the user's responsibility to prevent files from being
used by multiple VMs or emulators (swtpm will also use advisory locking). If
not specified, the storage configuration is left to libvirt discretion.
diff --git a/docs/glib-adoption.rst b/docs/glib-adoption.rst
index f969ac80a1..c2cec80eea 100644
--- a/docs/glib-adoption.rst
+++ b/docs/glib-adoption.rst
@@ -32,7 +32,7 @@ Array operations
https://developer.gnome.org/glib/stable/glib-Arrays.html
- Instead of using plain C arrays, it is preferrable to use one of
+ Instead of using plain C arrays, it is preferable to use one of
the GLib types, ``GArray``, ``GPtrArray`` or ``GByteArray``.
These all use a struct to track the array memory and size
together and efficiently resize.
--
2.48.1
1 month, 3 weeks
[PATCH] docs: remove references to removed APIs
by Daniel P. Berrangé
The glib adoption docs was suggesting avoidance of certain APIs that
were obsoleted by glib, during the transition period. Now that the
referenced APIs no longer exist in libvirt code, they can also be
removed from the docs.
NB, the virStringListRemoveDuplicates method remains since there is
no glib equivalent.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
docs/glib-adoption.rst | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/docs/glib-adoption.rst b/docs/glib-adoption.rst
index f969ac80a1..046cd821f7 100644
--- a/docs/glib-adoption.rst
+++ b/docs/glib-adoption.rst
@@ -14,19 +14,6 @@ the GLib APIs straight away where possible.
The following is a list of libvirt APIs that should no longer be
used in new code, and their suggested GLib replacements:
-Memory allocation
- ``VIR_ALLOC``, ``VIR_REALLOC``, ``VIR_RESIZE_N``,
- ``VIR_EXPAND_N``, ``VIR_SHRINK_N``, ``VIR_FREE``
-
- https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html
-
- Prefer the GLib APIs ``g_new0``/``g_renew``/ ``g_free`` in most
- cases. There should rarely be a need to use
- ``g_malloc``/``g_realloc``. **NEVER MIX** use of the classic
- libvirt memory allocation APIs and GLib APIs within a single
- method. Keep the style consistent, converting existing code to
- GLib style in a separate, prior commit.
-
Array operations
``VIR_APPEND_ELEMENT``, ``VIR_INSERT_ELEMENT``, ``VIR_DELETE_ELEMENT``
@@ -37,15 +24,6 @@ Array operations
These all use a struct to track the array memory and size
together and efficiently resize.
-String arrays
- ``virStringList*``, ``virStringListCount*``
-
- https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html
-
- Prefer the NULL-terminated variant instead of storing the count
- separately. Prefer ``g_str*v`` functions instead of their ``vir*``
- counterparts. For use with ``g_auto`` GLib provides the ``GStrv`` type.
-
Objects
``virObject``
--
2.48.1
1 month, 3 weeks
[PATCH] scripts: add execute permission to several files
by Daniel P. Berrangé
From: Daniel P. Berrangé <berrange(a)redhat.com>
Most, but not all, files in scripts have execute permission. While we
don't need this in order to launch them via meson/ninja build rules,
it is nice to direct execution if they have execution permission. This
makes the practice consistent across all scripts.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
scripts/check-drivername.py | 0
scripts/check-remote-protocol.py | 0
scripts/header-ifdef.py | 0
scripts/meson-install-dirs.py | 0
scripts/meson-install-symlink.py | 0
scripts/mock-noinline.py | 0
scripts/prohibit-duplicate-header.py | 0
7 files changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 scripts/check-drivername.py
mode change 100644 => 100755 scripts/check-remote-protocol.py
mode change 100644 => 100755 scripts/header-ifdef.py
mode change 100644 => 100755 scripts/meson-install-dirs.py
mode change 100644 => 100755 scripts/meson-install-symlink.py
mode change 100644 => 100755 scripts/mock-noinline.py
mode change 100644 => 100755 scripts/prohibit-duplicate-header.py
diff --git a/scripts/check-drivername.py b/scripts/check-drivername.py
old mode 100644
new mode 100755
diff --git a/scripts/check-remote-protocol.py b/scripts/check-remote-protocol.py
old mode 100644
new mode 100755
diff --git a/scripts/header-ifdef.py b/scripts/header-ifdef.py
old mode 100644
new mode 100755
diff --git a/scripts/meson-install-dirs.py b/scripts/meson-install-dirs.py
old mode 100644
new mode 100755
diff --git a/scripts/meson-install-symlink.py b/scripts/meson-install-symlink.py
old mode 100644
new mode 100755
diff --git a/scripts/mock-noinline.py b/scripts/mock-noinline.py
old mode 100644
new mode 100755
diff --git a/scripts/prohibit-duplicate-header.py b/scripts/prohibit-duplicate-header.py
old mode 100644
new mode 100755
--
2.48.1
1 month, 3 weeks
Fwd: system cache dropped
by matus valentin
Hi,
I have a setup with multiple virtual machines (VMs) running on one host,
each with a saved state. All VMs share the same parent, which is located on
a shared drive. Whenever I restore any VM using virsh restore, the parent
is dropped from the system cache, causing all data to be downloaded from
the shared drive again. This results in unnecessary network traffic, even
though the parent changes very rarely. However, if I create a child from
the parent and call virsh create to create a new VM, the parent is never
dropped from the system cache.
Is this expected behavior? Should the parent be retained in the system
cache during a virsh restore operation? Are there any configurations or
settings that can prevent the parent from being dropped from the cache?
thanks
1 month, 3 weeks
[PATCH] NEWS: Mention new 'image_format' parameter for virDomainSaveParams
by Jim Fehlig
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
NEWS.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 9c940b1a81..d08a18dc02 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -17,6 +17,14 @@ v11.2.0 (unreleased)
* **New features**
+ * qemu: Add new 'image_format' parameter to virDomainSaveParams
+
+ ``virDomainSaveParams`` now supports an ``image_format`` parameter for
+ specifying the save image format on a per-domain basis. The parameter
+ accepts the same values as the driver-wide ``save_image_format`` setting
+ in ``qemu.conf``. An image format specified via ``virDomainSaveParams``
+ takes precedence over the driver-wide setting.
+
* **Improvements**
* **Bug fixes**
--
2.43.0
1 month, 3 weeks
[libvirt PATCH 00/10] Unused cleanups
by Ján Tomko
Patches 4-9/10 all depend on patch 3/10
10/10 can be pushed independently
Ján Tomko (10):
qemu: seccomp sandbox: remove incorect G_GNUC_UNUSED marker
qemu: validate: fs: remove unneeded parameter
qemu: remove qemuCaps from qemuBuildObjectCommandlineFromJSON
qemu: remove qemuCaps from qemuBuildObjectSecretCommandLine
qemu: remove qemuCaps from qemuBuildTLSx509CommandLine
qemu: remove qemuCaps from qemuBuildObjectCommandline
qemu: remove qemuCaps from qemuBuildIOThreadCommandLine
qemu: remove unused vm from qemuBuildSEVSNPCommandLine
qemu: remove unused vm from qemuBuildPVCommandLine
Remove unreachable breaks right after return
src/qemu/qemu_cgroup.c | 2 -
src/qemu/qemu_command.c | 110 +++++++++++++------------------
src/qemu/qemu_driver.c | 1 -
src/qemu/qemu_hotplug.c | 1 -
src/qemu/qemu_monitor_json.c | 1 -
src/qemu/qemu_validate.c | 3 +-
src/security/security_apparmor.c | 1 -
src/vmx/vmx.c | 2 -
tools/virsh-domain.c | 1 -
tools/virsh-host.c | 2 -
tools/vsh.c | 7 --
11 files changed, 48 insertions(+), 83 deletions(-)
--
2.48.1
1 month, 3 weeks
[PATCH 0/2] src: make it easier to updat the protocol structs files
by Daniel P. Berrangé
This introduces a new target:
ninja -C build regen-admin_protocol
and equiv for other protocol files
Daniel P. Berrangé (2):
src: normalize whitespace in protocol structs files
src: add new target for regenerating protocol structs files
scripts/check-remote-protocol.py | 27 ++++++++++++++++++++++++++-
src/admin_protocol-structs | 2 +-
src/meson.build | 14 ++++++++++++++
src/qemu_protocol-structs | 2 +-
src/remote_protocol-structs | 6 +++---
5 files changed, 45 insertions(+), 6 deletions(-)
--
2.48.1
1 month, 3 weeks
[PATCH 0/6] Couple of memleak fixes
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (6):
network: Free inhibitor in networkStateCleanup()
ch: Free retval of curl_slist_append()
ch: Don't leak virCHDomainObjPrivate struct members
ch: Free @iothreads array in virCHProcessSetupIOThreads()
ch: Unref @cfg in virCHProcessStop()
ch: Rework virCHProcessConnectMonitor()
src/ch/ch_domain.c | 3 +++
src/ch/ch_monitor.c | 3 +++
src/ch/ch_process.c | 22 +++++++++++++---------
src/network/bridge_driver.c | 2 ++
4 files changed, 21 insertions(+), 9 deletions(-)
--
2.48.1
1 month, 3 weeks
[PATCH 00/17] qemu: Clean up various unneeded capabilities
by Peter Krempa
The recent bump of minimum qemu version resulted into some capabilities
always being present. I've noticed one while doing a review and from
there I removed a few others, mostly storage related ones as well.
Peter Krempa (17):
qemuBuildCompatDeprecatedCommandLine: Assume that
QEMU_CAPS_COMPAT_DEPRECATED is supported
qemu: capabilities: Retire QEMU_CAPS_COMPAT_DEPRECATED
qemuBuildObjectCommandlineFromJSON: Assume all qemus support
QEMU_CAPS_OBJECT_JSON
qemu: monitor: Drop support for extra wrapper for 'object_add'
util: Drop 'virQEMUBuildCommandLineJSONArrayBitmap'
qemu: capabilities: Retire QEMU_CAPS_OBJECT_JSON
qemu: monitor: Always assume support for
QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT
qemu: capabilities: Retire QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT
qemu: Always assume supprot for QEMU_CAPS_BLOCKDEV_REOPEN
qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_REOPEN
qemu: Always assume support for
QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY
qemu: capabilities: Retire
QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY
qemu: Always assume support for QEMU_CAPS_INCREMENTAL_BACKUP
qemu: capabilites: Retire QEMU_CAPS_INCREMENTAL_BACKUP
qemu: domain: Remove qemuDomainSupportsCheckpointsBlockjobs
qemu: migration: Always assume support for
QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING
qemu: capabilites: Retire
QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING
src/libvirt_private.syms | 1 -
src/qemu/qemu_backup.c | 18 ---------
src/qemu/qemu_block.c | 4 --
src/qemu/qemu_blockjob.c | 20 ++--------
src/qemu/qemu_capabilities.c | 33 +++++------------
src/qemu/qemu_capabilities.h | 14 +++----
src/qemu/qemu_checkpoint.c | 18 +--------
src/qemu/qemu_command.c | 31 +++-------------
src/qemu/qemu_domain.c | 23 ------------
src/qemu/qemu_domain.h | 4 --
src/qemu/qemu_driver.c | 37 +++++--------------
src/qemu/qemu_migration.c | 10 +----
src/qemu/qemu_monitor.c | 28 +-------------
src/qemu/qemu_monitor_json.c | 2 +-
src/qemu/qemu_monitor_priv.h | 4 --
src/qemu/qemu_snapshot.c | 4 --
src/util/virqemu.c | 36 ------------------
src/util/virqemu.h | 3 --
.../caps_10.0.0_s390x.xml | 7 ----
.../caps_10.0.0_x86_64+amdsev.xml | 7 ----
.../caps_10.0.0_x86_64.xml | 7 ----
.../qemucapabilitiesdata/caps_6.2.0_ppc64.xml | 7 ----
.../caps_6.2.0_x86_64.xml | 7 ----
.../qemucapabilitiesdata/caps_7.0.0_ppc64.xml | 7 ----
.../caps_7.0.0_x86_64.xml | 7 ----
.../qemucapabilitiesdata/caps_7.1.0_ppc64.xml | 7 ----
.../caps_7.1.0_x86_64.xml | 7 ----
tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml | 7 ----
.../caps_7.2.0_x86_64+hvf.xml | 7 ----
.../caps_7.2.0_x86_64.xml | 7 ----
.../caps_8.0.0_x86_64.xml | 7 ----
.../qemucapabilitiesdata/caps_8.1.0_s390x.xml | 7 ----
.../caps_8.1.0_x86_64.xml | 7 ----
.../caps_8.2.0_aarch64.xml | 7 ----
.../caps_8.2.0_armv7l.xml | 7 ----
.../caps_8.2.0_loongarch64.xml | 7 ----
.../qemucapabilitiesdata/caps_8.2.0_s390x.xml | 7 ----
.../caps_8.2.0_x86_64.xml | 7 ----
.../qemucapabilitiesdata/caps_9.0.0_sparc.xml | 7 ----
.../caps_9.0.0_x86_64.xml | 7 ----
.../caps_9.1.0_riscv64.xml | 7 ----
.../qemucapabilitiesdata/caps_9.1.0_s390x.xml | 7 ----
.../caps_9.1.0_x86_64.xml | 7 ----
.../caps_9.2.0_aarch64+hvf.xml | 7 ----
.../qemucapabilitiesdata/caps_9.2.0_s390x.xml | 7 ----
.../caps_9.2.0_x86_64+amdsev.xml | 7 ----
.../caps_9.2.0_x86_64.xml | 7 ----
tests/qemucommandutiltest.c | 30 ---------------
48 files changed, 40 insertions(+), 483 deletions(-)
--
2.48.1
1 month, 3 weeks