[libvirt PATCH 0/3] external snapshot delete fixes
by Pavel Hrdina
Pavel Hrdina (3):
qemu_snapshot: properly ignore disks with manual snapshot
qemu_snapshot: fix external snapshot deletion for non-active snapshots
domainsnapshot: add snapshotDeleteInProgress to RNG schema
src/conf/schemas/domainsnapshot.rng | 10 ++++++++++
src/qemu/qemu_snapshot.c | 26 +++++++++++++-------------
2 files changed, 23 insertions(+), 13 deletions(-)
--
2.39.2
1 year, 8 months
[libvirt PATCH] apparmor: Enable passt support
by Andrea Bolognani
passt provides an AppArmor abstraction that covers all the
inner details of its operation, so we can simply import that
and add the libvirt-specific parts on top: namely, passt
needs to be able to create a socket and pid file, while
the libvirt daemon needs to be able to kill passt.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
---
src/security/apparmor/libvirt-qemu | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu
index 9af1333b22..44056b5f14 100644
--- a/src/security/apparmor/libvirt-qemu
+++ b/src/security/apparmor/libvirt-qemu
@@ -185,6 +185,21 @@
/usr/{lib,lib64}/libswtpm_libtpms.so mr,
/usr/lib/(a){multiarch}/libswtpm_libtpms.so mr,
+ # support for passt network back-end
+ /usr/bin/passt Cx -> passt,
+
+ profile passt {
+ /usr/bin/passt r,
+
+ signal (receive) set=("term") peer=/usr/sbin/libvirtd,
+ signal (receive) set=("term") peer=libvirtd,
+ signal (receive) set=("term") peer=virtqemud,
+
+ owner /{,var/}run/libvirt/qemu/passt/* rw,
+
+ include if exists <abstractions/passt>
+ }
+
# for save and resume
/{usr/,}bin/dash rmix,
/{usr/,}bin/dd rmix,
--
2.39.2
1 year, 8 months
[PATCH] rpc: genprotocol: Always apply fixups to rpcgen's output
by Peter Krempa
The platform check which determines when to apply the fixups mentions
all officially supported build targets (per docs/platforms.rst) thus
it's not really necessary.
Additionally while not explicitly written as supported the check does
not work properly when building with the MinGW toolchain on Windows as
it does not apply the needed transformations. They are necessary
there the same way as with MinGW on Linux.
https://gitlab.com/libvirt/libvirt/-/issues/453
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/rpc/genprotocol.pl | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl
index f567260588..adf3991d7a 100755
--- a/src/rpc/genprotocol.pl
+++ b/src/rpc/genprotocol.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
-# Generate code for an XDR protocol, optionally applying
+# Generate code for an XDR protocol, applying
# fixups to the glibc rpcgen code so that it compiles
# with warnings turned on.
#
@@ -47,20 +47,11 @@ open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
open TARGET, ">$target"
or die "cannot create $target: $!";
-my $fixup = $^O eq "linux" || $^O eq "gnukfreebsd" || $^O eq "freebsd" || $^O eq "darwin";
-
if ($mode eq "-c") {
print TARGET "#include <config.h>\n";
}
while (<RPCGEN>) {
- # We only want to fixup the GLibc rpcgen output
- # So just print data unchanged, if non-Linux
- unless ($fixup) {
- print TARGET;
- next;
- }
-
if (m/^{/) {
$in_function = 1;
print TARGET;
--
2.39.2
1 year, 8 months
[PATCH 0/4] virscsihost: Couple of cleanups and fixes
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (4):
virscsihost: use g_autofree more
virSCSIHostFindByPCI: Decrease scope of some variables
virscsihost: Drop needless labels
virSCSIHostFindByPCI: Fix link detection
src/util/virscsihost.c | 48 ++++++++++++++----------------------------
1 file changed, 16 insertions(+), 32 deletions(-)
--
2.39.2
1 year, 8 months
[libvirt PATCH v2] remote: add mutex when freeing private callbacks
by Mike Pontillo
This commit resolves illegal memory accesses observed via:
remoteClientFreePrivateCallbacks()
remoteClientCloseFunc()
virNetServerClientCloseLocked()
virNetServerProcessClients()
daemonServerProcessClients()
virHashForEach()
virNetDaemonRun()
main()
Signed-off-by: Mike Pontillo <mpontillo(a)digitalocean.com>
---
src/remote/remote_daemon_dispatch.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index 250eb51e6b..0d843d63f6 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -1709,6 +1709,8 @@ static void
remoteClientFreePrivateCallbacks(struct daemonClientPrivate *priv)
{
g_autoptr(virIdentity) sysident = virIdentityGetSystem();
+ VIR_LOCK_GUARD lock = virLockGuardLock(&priv->lock);
+
virIdentitySetCurrent(sysident);
DEREG_CB(priv->conn, priv->domainEventCallbacks,
--
2.34.1
1 year, 8 months
[libvirt PATCH 0/6] do not report errors in virPidFileForceCleanupPathFull
by Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=2171973
Ján Tomko (6):
util: remove waitForLock from virPidFileAcquire
util: introduce virPidFileAcquirePathFull
leaseshelper: use virPidFileAcquirePathFull
util: virPidFileAcquirePath: remove waitForLock argument
util: add quiet parameter to virPidFileAcquirePathFull
util: do not report errors in virPidFileForceCleanupPathFull
src/bhyve/bhyve_driver.c | 2 +-
src/interface/interface_backend_netcf.c | 2 +-
src/interface/interface_backend_udev.c | 2 +-
src/libvirt_private.syms | 1 +
src/libxl/libxl_driver.c | 2 +-
src/locking/lock_daemon.c | 4 +-
src/logging/log_daemon.c | 4 +-
src/lxc/lxc_driver.c | 2 +-
src/network/bridge_driver.c | 3 +-
src/network/leaseshelper.c | 2 +-
src/node_device/node_device_udev.c | 2 +-
src/nwfilter/nwfilter_driver.c | 2 +-
src/qemu/qemu_driver.c | 2 +-
src/remote/remote_daemon.c | 2 +-
src/secret/secret_driver.c | 2 +-
src/storage/storage_driver.c | 3 +-
src/util/vircommand.c | 2 +-
src/util/virpidfile.c | 69 +++++++++++++++----------
src/util/virpidfile.h | 6 ++-
src/vz/vz_driver.c | 2 +-
20 files changed, 67 insertions(+), 49 deletions(-)
--
2.39.2
1 year, 8 months
[libvirt PATCH] remote: add mutex when freeing private callbacks
by Mike Pontillo
This commit resolves illegal memory accesses observed via:
remoteClientFreePrivateCallbacks()
remoteClientCloseFunc()
virNetServerClientCloseLocked()
virNetServerProcessClients()
daemonServerProcessClients()
virHashForEach()
virNetDaemonRun()
main()
Signed-off-by: Mike Pontillo <mpontillo(a)digitalocean.com>
---
src/remote/remote_daemon_dispatch.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index 250eb51e6b..8d043d0bce 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -1711,6 +1711,8 @@ remoteClientFreePrivateCallbacks(struct daemonClientPrivate *priv)
g_autoptr(virIdentity) sysident = virIdentityGetSystem();
virIdentitySetCurrent(sysident);
+ virMutexLock(&priv->lock);
+
DEREG_CB(priv->conn, priv->domainEventCallbacks,
priv->ndomainEventCallbacks,
virConnectDomainEventDeregisterAny, "domain");
@@ -1737,6 +1739,8 @@ remoteClientFreePrivateCallbacks(struct daemonClientPrivate *priv)
}
virIdentitySetCurrent(NULL);
+
+ virMutexUnlock(&priv->lock);
}
#undef DEREG_CB
--
2.34.1
1 year, 8 months
[PATCH v2 0/8] migration/migrationpin:support migration pin
by Jiang Jiacheng
Support set the CPU affinity of the live migration threads to improve
the migration performance in specific cases. By default, the migration
thread shares CPU resources with the VM process. With those API, support
pin migration thread to expected CPU list to avoid preempting CPU
resources of VM process.
Use the following methods to implement migration thread pin:
- set the cpulist by virsh command 'virsh migrationpin' or
migration param 'migration.pin'. These settings affect
only the next migration
- continuously query migration thread information[1] during the
migration process until matches the thread number desired or
migration finished unexpectedly
- pin migration thread to expected cpulist, we can set/change
the cpulist by 'virsh migrationpin' during migration at anytime
Note that only support pin main thread of migration(live migration)
and parallel send threads now.
diff to v1:
- add qmp command to query migration thread information
- change the method of get qemu's migration thread info, from qemu
event to qmp commands.
- unified the interface of common migration and parallel migration.
ref:
[1]https://patchew.org/QEMU/20230203073519.2969147-1-jiangjiacheng@huawei....
Jiang Jiacheng (8):
migration/migration-pin: Implemente the interface of obtaining
migration thread information
migration/migration-pin: get migration pid for migration pin
migration/migration-pin: Introduce virDomainPinMigrationThread API
migration/migration-pin: Implement qemuDomainPinMigrationThread
migration/migration-pin: support migration pin by virsh command
migration/migration-pin: add migrationpin for migration parameters
migration/migration-pin: pin migration thread immediately after get
thread info
migration/migration-pin/multifd-pin: add migration pin status handle
include/libvirt/libvirt-domain.h | 15 +++
src/conf/domain_conf.c | 9 ++
src/conf/domain_conf.h | 10 ++
src/conf/virconftypes.h | 2 +
src/driver-hypervisor.h | 6 +
src/libvirt-domain.c | 65 ++++++++++
src/libvirt_private.syms | 1 +
src/libvirt_public.syms | 4 +
src/qemu/qemu_domain.c | 26 ++++
src/qemu/qemu_domain.h | 13 ++
src/qemu/qemu_driver.c | 56 +++++++++
src/qemu/qemu_migration.c | 111 +++++++++++++++++
src/qemu/qemu_migration.h | 33 +++---
src/qemu/qemu_migration_params.c | 40 +++++++
src/qemu/qemu_migration_params.h | 9 ++
src/qemu/qemu_monitor.c | 25 ++++
src/qemu/qemu_monitor.h | 11 ++
src/qemu/qemu_monitor_json.c | 62 ++++++++++
src/qemu/qemu_monitor_json.h | 5 +
src/qemu/qemu_process.c | 198 +++++++++++++++++++++++++++++++
src/qemu/qemu_process.h | 13 ++
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 13 +-
src/remote_protocol-structs | 5 +
src/util/vircgroup.c | 3 +
src/util/vircgroup.h | 1 +
tools/virsh-domain.c | 69 +++++++++++
27 files changed, 789 insertions(+), 17 deletions(-)
--
2.33.0
1 year, 8 months
[PATCH 00/15] qemu: Fix HPET timer validation and remove always-present architecture dependent capabilities
by Peter Krempa
Remove everything out of virQEMUCapsInitQMPBasicArch and in the process
fix a bug.
Peter Krempa (15):
qemu: validate: Fix logic for validating precence of the HPET timer
NEWS: Mention bug in validation of HPET timer
qemu: command: Replace check using QEMU_CAPS_NO_ACPI with architecture
check
qemu: capabilities: Retire QEMU_CAPS_NO_ACPI
qemu: command: Format '-no-hpet' based on architecture check
qemu: capabilities: Retire QEMU_CAPS_NO_HPET
qemuxml2argvtest: Don't set QEMU_CAPS_MACH_VIRT_GIC_VERSION
qemu: command: Replace caps check for QEMU_CAPS_MACH_VIRT_GIC_VERSION
by arch check
qemu: capabilities: Retire QEMU_CAPS_MACH_VIRT_GIC_VERSION
qemuxml2argvtest: Remove always asserted s390 capabilities
qemuAppendKeyWrapMachineParms: Format "keywrap" arguments based on
architecture
qemu: capabilities: Retire QEMU_CAPS_AES_KEY_WRAP and
QEMU_CAPS_DEA_KEY_WRAP
qemuAppendLoadparmMachineParm: Format 'loadparm' based on architecture
qemu: capabilities: Retire QEMU_CAPS_LOADPARM
qemu: capabilities: Remove unused virQEMUCapsInitQMPBasicArch
NEWS.rst | 6 ++
src/qemu/qemu_capabilities.c | 93 ++---------------
src/qemu/qemu_capabilities.h | 12 +--
src/qemu/qemu_capspriv.h | 3 -
src/qemu/qemu_command.c | 72 +++++++-------
src/qemu/qemu_validate.c | 14 +--
.../caps_4.2.0.aarch64.xml | 2 -
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 3 -
.../caps_4.2.0.x86_64.xml | 2 -
.../caps_5.0.0.aarch64.xml | 2 -
.../caps_5.0.0.x86_64.xml | 2 -
.../caps_5.1.0.x86_64.xml | 2 -
.../caps_5.2.0.aarch64.xml | 2 -
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 3 -
.../caps_5.2.0.x86_64.xml | 2 -
.../caps_6.0.0.aarch64.xml | 2 -
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 3 -
.../caps_6.0.0.x86_64.xml | 2 -
.../caps_6.1.0.x86_64.xml | 2 -
.../caps_6.2.0.aarch64.xml | 2 -
.../caps_6.2.0.x86_64.xml | 2 -
.../caps_7.0.0.aarch64.xml | 2 -
.../caps_7.0.0.x86_64.xml | 2 -
.../caps_7.1.0.x86_64.xml | 2 -
.../caps_7.2.0.x86_64.xml | 2 -
.../caps_8.0.0.x86_64.xml | 1 -
tests/qemuhotplugtest.c | 2 -
.../q35-virt-manager-basic.x86_64-4.2.0.args | 1 -
.../q35-virt-manager-basic.x86_64-latest.args | 2 +-
.../q35-virt-manager-basic.xml | 2 +-
tests/qemuxml2argvtest.c | 99 ++++++-------------
.../q35-virt-manager-basic.x86_64-latest.xml | 2 +-
tests/qemuxml2xmltest.c | 3 -
33 files changed, 93 insertions(+), 260 deletions(-)
--
2.39.2
1 year, 8 months
[PATCH v4 0/5] Deprecate system emulation support for 32-bit x86 and arm hosts
by Thomas Huth
We're struggling quite badly with our CI minutes on the shared
gitlab runners, so we urgently need to think of ways to cut down
our supported build and target environments. Hardly anybody uses
QEMU system emulation on 32-bit x86 and arm hosts anymore, so it's
time to deprecate these environments now.
This is a follow-up patch series from the previous discussion here:
https://lore.kernel.org/qemu-devel/20230130114428.1297295-1-thuth@redhat....
where people still mentioned that there is still interest in certain
support for 32-bit host hardware. But as far as I could see, there is
no real need for system emulation on 32-bit x86 host and 32-bit arm
hosts anymore, so it should be fine if we drop these host environments
soon (these are also the two architectures that contribute the most to
the long test times in our CI, so we would benefit a lot by dropping
those).
v4:
- Drop the patch that deprecated qemu-system-arm since it still
might be required to enforce 32-bit guests with TCG
- Only deprecate system emulation on 32-bit x86 hosts since user-mode
emulation might still be useful in certain scenarios
- Add a sentence how to enforce 32-bit mode with qemu-system-x86_64
v3:
- Update some commit descriptions according to the suggestions in v2
- Added the Reviewed-bys from v2
v2:
- Split binary and host deprecation into separate patches
- Added patches to immediately drop the jobs from the CI
Thomas Huth (5):
docs/about/deprecated: Deprecate 32-bit x86 hosts for system emulation
docs/about/deprecated: Deprecate the qemu-system-i386 binary
gitlab-ci.d/crossbuilds: Drop the i386 system emulation job
docs/about/deprecated: Deprecate 32-bit arm hosts for system emulation
gitlab-ci.d/crossbuilds: Drop the 32-bit arm system emulation jobs
docs/about/deprecated.rst | 34 ++++++++++++++++++++++++++++++++++
.gitlab-ci.d/crossbuilds.yml | 24 ------------------------
2 files changed, 34 insertions(+), 24 deletions(-)
--
2.31.1
1 year, 8 months