[PATCH pushed] NEWS: Fix misindented bullet point
by Peter Krempa
Fixes: 296b6badc10c43480ec51eb2c73a1c8b5c8fb15e
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
Trivial.
NEWS.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/NEWS.rst b/NEWS.rst
index 4dd7530f0c..b3ad60d7c1 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -93,7 +93,7 @@ v10.4.0 (unreleased)
or PCI addresses. With recent support for the usb-net model, USB addresses
for usb-net network devices are assigned automatically.
- * qemu: Fix hotplug of ``virtiofs`` filesystem device with ``<boot order=`` set
+ * qemu: Fix hotplug of ``virtiofs`` filesystem device with ``<boot order=`` set
The bug was introduced in `v10.3.0 (2024-05-02)`_ when attempting to reject
unsupported configurations. During hotplug the addresses are
--
2.45.1
10 months, 1 week
[PATCH] ci: Always run 'pages' job
by Peter Krempa
When the 'pages' job is configured to run 'on_success' it's skipped if
any other pipeline fails. This is bad in cases such as if an external
service runs out of CI minutes as the web stops being updated.
Since the 'artifacts' of the 'website_job' are generated only if that
phase succeeds this will update the web when the web part is buildable.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
Note that it's upnpleasant to test the pages deployment stuff separately
as various hacks are needed to do that successfully. Let's test this one
in production.
.gitlab-ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7f80896e6e..d9d8b1e3cd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -96,7 +96,7 @@ pages:
- website_job
rules:
- if: '$CI_PROJECT_NAMESPACE == $RUN_UPSTREAM_NAMESPACE && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- when: on_success
+ when: always
- when: never
artifacts:
expose_as: 'pages'
--
2.45.1
10 months, 1 week
Add iommu device when VM configured with > 255 vcpus
by Jim Fehlig
Hi All,
I vaguely recall a discussion about $subject, but can't find it now. Perhaps
buried in another thread. The topic has been raised internally again, and I'd
like to gauge the community's interest in automatically adding the necessary
devices/config when user has specified vcpus > 255.
The comparison for prior art is a bit of a stretch, but we e.g. add <audio
type='spice'/> when spice graphics is configured. I know libvirt has generally
tried to avoid policy decisions, but it's not clear to me where we stand with
cases such as this, where every x86 VM with > 255 vcpus needs a similarly
configured iommu.
Regards,
Jim
10 months, 1 week
[PATCH 0/4] qemu: Fix broken check rejecting virtiofs hotplug with 'bootindex' set
by Peter Krempa
See 3/4
Peter Krempa (4):
syms: Properly export 'virDomainDeviceDefValidate'
qemu: hotplug: Validate definition of 'FS' device after address
allocation
qemu: validate: Fix check for unsupported FS-device bootindex use on
un-assigned addresses
NEWS: Mention fix for broken 'fs' device bootindex support check
NEWS.rst | 6 ++++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_hotplug.c | 4 ++++
src/qemu/qemu_validate.c | 5 ++++-
4 files changed, 15 insertions(+), 1 deletion(-)
--
2.45.1
10 months, 1 week
Entering freeze for libvirt-10.4.0
by Jiri Denemark
I have just tagged v10.4.0-rc1 in the repository and pushed signed
tarballs to https://download.libvirt.org/
Please give the release candidate some testing and in case you find a
serious issue which should have a fix in the upcoming release, feel
free to reply to this thread to make sure the issue is more visible.
If you have not done so yet, please update NEWS.rst to document any
significant change you made since the last release.
Thanks,
Jirka
10 months, 1 week
[PATCH] log_cleaner: Detect rotated filenames properly
by Michal Privoznik
When removing rotated log files, their name is matched against a
regex (@log_regex) and if they contain '.N' suffix the 'N' is
then parsed into an integer. Well, due to a bug in
virLogCleanerParseFilename() this is not how the code works. If
the suffix isn't found then g_match_info_fetch() returns an empty
string instead of NULL which then makes str2int parsing fail.
Just check for this case before parsing the string.
Based on the original patch sent by David.
Reported-by: David Negreira <david.negreira(a)canonical.com>
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
The original patch was posted here:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/EN...
In the thread you can see me suggesting this alternative approach and
David confirming it works. Therefore, I'd like to get this in before the
release.
src/logging/log_cleaner.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/logging/log_cleaner.c b/src/logging/log_cleaner.c
index 4ee91843aa..4efcbc18e4 100644
--- a/src/logging/log_cleaner.c
+++ b/src/logging/log_cleaner.c
@@ -82,10 +82,8 @@ virLogCleanerParseFilename(const char *path,
*rotated_index = 0;
rotated_index_str = g_match_info_fetch(matchInfo, 3);
- if (!rotated_index_str)
- return chain_prefix;
-
- if (virStrToLong_i(rotated_index_str, NULL, 10, rotated_index) < 0) {
+ if (rotated_index_str && STRNEQ(rotated_index_str, "") &&
+ virStrToLong_i(rotated_index_str, NULL, 10, rotated_index) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to parse rotated index from '%1$s'"),
rotated_index_str);
--
2.44.1
10 months, 1 week
[PATCH] NEWS: Document my contributions for upcoming release
by Michal Privoznik
These are either features/bugfixes I've worked on or
participated in.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
NEWS.rst | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 14505116b1..57e8f0d0c3 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -45,6 +45,16 @@ v10.4.0 (unreleased)
* **Improvements**
+ * qemu: add zstd to supported compression formats
+
+ Extend the list of supported formats of QEMU save image by adding zstd
+ compression.
+
+ * qemu: Implement support for hotplugging evdev input devices
+
+ As of this release, hotplug and hotunplug of evdev ``<input/>`` devices is
+ supported.
+
* **Bug fixes**
* virsh/virt-admin: Fix ``--help`` option for all commands
@@ -70,6 +80,19 @@ v10.4.0 (unreleased)
The bug was introduced in `v10.1.0 (2024-03-01)`_.
+ * qemu: Don't set affinity for isolcpus unless explicitly requested
+
+ When starting a domain, by default libvirt sets affinity of QEMU process to
+ all online CPUs. This also included isolated CPUs (``isolcpus=``) which is
+ wrong. As of this release, isolated CPUs are left untouched, unless
+ explicitly configured in domain XML.
+
+ * qemu_hotplug: Properly assign USB address to hotplugged usb-net device
+
+ Previously, the network device hotplug logic would try to ensure only CCW
+ or PCI addresses. With recent support for the usb-net model, USB addresses
+ for usb-net network devices are assigned automatically.
+
v10.3.0 (2024-05-02)
====================
--
2.44.1
10 months, 1 week
[PATCH] qemu_hotplug: Clear QoS if required in qemuDomainChangeNet()
by Michal Privoznik
In one of my recent commits, I've introduced
virDomainInterfaceClearQoS() which is a helper that either calls
virNetDevBandwidthClear() ('tc' implementation) or
virNetDevOpenvswitchInterfaceClearQos() (for ovs ifaces). But I
made a micro optimization which leads to a bug: the function
checks whether passed iface has any QoS set and returns early if
it has none. In majority of cases this is right thing to do, but
when removing QoS on virDomainUpdateDeviceFlags() this is
problematic. The new definition (passed as argument to
virDomainInterfaceClearQoS()) contains no QoS (because user
requested its removal) and thus instead of removing the old QoS
setting nothing is done.
Fortunately, the fix is simple - pass olddev which contains the
old QoS setting.
Fixes: 812a146dfe784315edece43d09f8d9e432f8230e
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 4739beead8..c98b0b5d52 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4071,7 +4071,7 @@ qemuDomainChangeNet(virQEMUDriver *driver,
goto cleanup;
}
} else {
- if (virDomainInterfaceClearQoS(vm->def, newdev) < 0)
+ if (virDomainInterfaceClearQoS(vm->def, olddev) < 0)
goto cleanup;
}
--
2.44.1
10 months, 1 week
[PATCH v3 0/5] qemu: Introduce shared_filesystems configuration option
by Andrea Bolognani
The need to have something like this in the first place is driven by
KubeVirt (see [1] and [2]). A draft version of this series has been
integrated into KubeVirt and it has been confirmed that it was
effective in removing the need to use LD_PRELOAD hacks in the storage
provider.
Changes from [v2]:
* added canonicalization for user-provided paths;
* fixed compilation issues when AppArmor support is enabled.
Changes from [v1]:
* documented more explicitly that the newly introduced option is
intended for very specific scenarios and not general usage; as
part of this, the NEWS update has been dropped too;
* made a few tweaks and addressed a few oversight based on review
feedback;
* several preparatory cleanup patches have been pushed.
Changes from [v0]:
* reworked approach.
[v2] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/XP...
[v1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/XE...
[v0] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/MM...
[1] https://issues.redhat.com/browse/CNV-34322
[2] https://issues.redhat.com/browse/CNV-39370
Andrea Bolognani (5):
security: Fix alignment
qemu: Introduce shared_filesystems configuration option
qemu: Propagate shared_filesystems
utils: Use overrides in virFileIsSharedFS()
qemu: Always set labels for TPM state
src/lxc/lxc_controller.c | 3 +-
src/lxc/lxc_driver.c | 2 +-
src/lxc/lxc_process.c | 4 +-
src/qemu/libvirtd_qemu.aug | 3 ++
src/qemu/qemu.conf.in | 23 ++++++++
src/qemu/qemu_conf.c | 31 +++++++++++
src/qemu/qemu_conf.h | 2 +
src/qemu/qemu_domain.c | 7 ++-
src/qemu/qemu_extdevice.c | 2 +-
src/qemu/qemu_migration.c | 23 ++++----
src/qemu/qemu_security.c | 85 +++++++++++++++++++++++-------
src/qemu/qemu_tpm.c | 38 +++++++------
src/qemu/qemu_tpm.h | 10 ++--
src/qemu/test_libvirtd_qemu.aug.in | 5 ++
src/security/security_apparmor.c | 8 ++-
src/security/security_dac.c | 47 +++++++++++++----
src/security/security_driver.h | 8 ++-
src/security/security_manager.c | 33 +++++++++---
src/security/security_manager.h | 9 +++-
src/security/security_nop.c | 5 ++
src/security/security_selinux.c | 56 +++++++++++++++-----
src/security/security_stack.c | 32 ++++++++---
src/util/virfile.c | 53 +++++++++++++++++--
src/util/virfile.h | 3 +-
tests/securityselinuxlabeltest.c | 2 +-
tests/virfiletest.c | 2 +-
26 files changed, 389 insertions(+), 107 deletions(-)
--
2.44.0
10 months, 2 weeks
[libvirt PATCH] qemu_snapshot: fix memory leak when reverting external snapshot
by Pavel Hrdina
The code cleaning up virStorageSource doesn't free data allocated by
virStorageSourceInit() so we need to call virStorageSourceDeinit()
explicitly.
Fixes: 8e664737813378d2a1bdeacc2ca8e942327e2cab
Resolves: https://issues.redhat.com/browse/RHEL-33044
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/qemu/qemu_snapshot.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 09ec959f10..f5260c4a22 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -2260,6 +2260,8 @@ qemuSnapshotRevertExternalFinish(virDomainObj *vm,
snapdisk->src->path);
}
+ virStorageSourceDeinit(snapdisk->src);
+
virDomainSnapshotDiskDefClear(snapdisk);
}
@@ -2277,6 +2279,8 @@ qemuSnapshotRevertExternalFinish(virDomainObj *vm,
VIR_WARN("Failed to remove snapshot image '%s'",
snapdisk->src->path);
}
+
+ virStorageSourceDeinit(snapdisk->src);
}
}
--
2.45.1
10 months, 2 weeks