[PATCH] rpm: fix setting of VIR_TEST_DEBUG
by Daniel P. Berrangé
The %meson_test macro expands to have a newline at the start, so
rather than expanding to
VIR_TEST_DEBUG=1 meson test ....
we get
VIR_TEST_DEBUG=1
meson test ....
which has no effect, since VIR_TEST_DEBUG isn't exported.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt.spec.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 5ca7b95e6c..0f3c882f05 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1592,7 +1592,8 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
%if %{with_native}
# Building on slow archs, like emulated s390x in Fedora copr, requires
# raising the test timeout
-VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10
+export VIR_TEST_DEBUG=1
+%meson_test --no-suite syntax-check --timeout-multiplier 10
%endif
%define libvirt_rpmstatedir %{_localstatedir}/lib/rpm-state/libvirt
--
2.45.1
5 months, 3 weeks
[PATCH] interface: fix udev reference leak with invalid flags
by Daniel P. Berrangé
The udevInterfaceGetXMLDesc method takes a reference on the udev
driver as its first action. If the virCheckFlags() condition
fails, however, this reference is never released.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/interface/interface_backend_udev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index fdf11a8318..e1a50389c9 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -1027,12 +1027,14 @@ static char *
udevInterfaceGetXMLDesc(virInterfacePtr ifinfo,
unsigned int flags)
{
- struct udev *udev = udev_ref(driver->udev);
+ struct udev *udev = NULL;
g_autoptr(virInterfaceDef) ifacedef = NULL;
char *xmlstr = NULL;
virCheckFlags(VIR_INTERFACE_XML_INACTIVE, NULL);
+ udev = udev_ref(driver->udev);
+
/* Recursively build up the interface XML based on the requested
* interface name
*/
--
2.45.1
5 months, 3 weeks
[PATCH 0/3] qemu: Use TPM 2.0 on RISC-V
by Andrea Bolognani
Andrea Bolognani (3):
tests: Add TPM coverage to default-models tests
tests: Delete some redundant test cases
qemu: Only allow TPM 2.0 for RISC-V guests
src/qemu/qemu_domain.c | 1 +
src/qemu/qemu_validate.c | 10 +--
...aarch64-tpm-wrong-model.aarch64-latest.err | 2 +-
.../aarch64-tpm.aarch64-latest.args | 34 ---------
.../aarch64-tpm.aarch64-latest.xml | 29 --------
tests/qemuxmlconfdata/aarch64-tpm.xml | 15 ----
...ault-models.aarch64-latest.abi-update.args | 3 +
...fault-models.aarch64-latest.abi-update.xml | 3 +
...64-virt-default-models.aarch64-latest.args | 3 +
...h64-virt-default-models.aarch64-latest.xml | 3 +
.../aarch64-virt-default-models.xml | 3 +
.../loongarch64-virt-default-models.xml | 1 +
...efault-models.ppc64-latest.abi-update.args | 3 +
...default-models.ppc64-latest.abi-update.xml | 4 ++
...4-pseries-default-models.ppc64-latest.args | 3 +
...64-pseries-default-models.ppc64-latest.xml | 4 ++
.../ppc64-pseries-default-models.xml | 3 +
...ault-models.riscv64-latest.abi-update.args | 3 +
...fault-models.riscv64-latest.abi-update.xml | 3 +
...64-virt-default-models.riscv64-latest.args | 3 +
...v64-virt-default-models.riscv64-latest.xml | 3 +
.../riscv64-virt-default-models.xml | 3 +
.../s390x-ccw-default-models.xml | 1 +
.../tpm-emulator-spapr.ppc64-latest.args | 45 ------------
.../tpm-emulator-spapr.ppc64-latest.xml | 1 -
tests/qemuxmlconfdata/tpm-emulator-spapr.xml | 70 -------------------
...fault-models.x86_64-latest.abi-update.args | 3 +
...efault-models.x86_64-latest.abi-update.xml | 3 +
...86_64-pc-default-models.x86_64-latest.args | 3 +
...x86_64-pc-default-models.x86_64-latest.xml | 3 +
.../x86_64-pc-default-models.xml | 3 +
...fault-models.x86_64-latest.abi-update.args | 3 +
...efault-models.x86_64-latest.abi-update.xml | 3 +
...6_64-q35-default-models.x86_64-latest.args | 3 +
...86_64-q35-default-models.x86_64-latest.xml | 3 +
.../x86_64-q35-default-models.xml | 3 +
tests/qemuxmlconftest.c | 2 -
37 files changed, 87 insertions(+), 201 deletions(-)
delete mode 100644 tests/qemuxmlconfdata/aarch64-tpm.aarch64-latest.args
delete mode 100644 tests/qemuxmlconfdata/aarch64-tpm.aarch64-latest.xml
delete mode 100644 tests/qemuxmlconfdata/aarch64-tpm.xml
delete mode 100644 tests/qemuxmlconfdata/tpm-emulator-spapr.ppc64-latest.args
delete mode 120000 tests/qemuxmlconfdata/tpm-emulator-spapr.ppc64-latest.xml
delete mode 100644 tests/qemuxmlconfdata/tpm-emulator-spapr.xml
--
2.45.1
5 months, 3 weeks
[PATCH] qga: Remove deprecated 'blacklist' argument / config key
by Philippe Mathieu-Daudé
The 'blacklist' argument / config key are deprecated since commi
582a098e6c ("qga: Replace 'blacklist' command line and config file
options by 'block-rpcs'"), time to remove them.
Signed-off-by: Philippe Mathieu-Daudé <philmd(a)linaro.org>
---
docs/about/deprecated.rst | 18 ------------------
docs/about/removed-features.rst | 18 ++++++++++++++++++
qga/main.c | 6 ------
3 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 40585ca7d5..a32e0e2564 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -478,24 +478,6 @@ versions, aliases will point to newer CPU model versions
depending on the machine type, so management software must
resolve CPU model aliases before starting a virtual machine.
-QEMU guest agent
-----------------
-
-``--blacklist`` command line option (since 7.2)
-'''''''''''''''''''''''''''''''''''''''''''''''
-
-``--blacklist`` has been replaced by ``--block-rpcs`` (which is a better
-wording for what this option does). The short form ``-b`` still stays
-the same and thus is the preferred way for scripts that should run with
-both, older and future versions of QEMU.
-
-``blacklist`` config file option (since 7.2)
-''''''''''''''''''''''''''''''''''''''''''''
-
-The ``blacklist`` config file option has been renamed to ``block-rpcs``
-(to be in sync with the renaming of the corresponding command line
-option).
-
Migration
---------
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index fba0cfb0b0..deca066b21 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -1129,4 +1129,22 @@ stable for some time and is now widely used.
The command line and feature set is very close to the removed
C implementation.
+QEMU guest agent
+----------------
+
+``--blacklist`` command line option (removed in 9.1)
+''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+``--blacklist`` has been replaced by ``--block-rpcs`` (which is a better
+wording for what this option does). The short form ``-b`` still stays
+the same and thus is the preferred way for scripts that should run with
+both, older and future versions of QEMU.
+
+``blacklist`` config file option (removed in 9.1)
+'''''''''''''''''''''''''''''''''''''''''''''''''
+
+The ``blacklist`` config file option has been renamed to ``block-rpcs``
+(to be in sync with the renaming of the corresponding command line
+option).
+
.. _Intel discontinuance notification: https://www.intel.com/content/www/us/en/content-details/781327/intel-is-d...
diff --git a/qga/main.c b/qga/main.c
index bdf5344584..f4d5f15bb3 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -1071,11 +1071,6 @@ static void config_load(GAConfig *config)
g_key_file_get_boolean(keyfile, "general", "retry-path", &gerr);
}
- if (g_key_file_has_key(keyfile, "general", "blacklist", NULL)) {
- g_warning("config using deprecated 'blacklist' key, should be replaced"
- " with the 'block-rpcs' key.");
- blockrpcs_key = "blacklist";
- }
if (g_key_file_has_key(keyfile, "general", blockrpcs_key, NULL)) {
config->bliststr =
g_key_file_get_string(keyfile, "general", blockrpcs_key, &gerr);
@@ -1190,7 +1185,6 @@ static void config_parse(GAConfig *config, int argc, char **argv)
{ "path", 1, NULL, 'p' },
{ "daemonize", 0, NULL, 'd' },
{ "block-rpcs", 1, NULL, 'b' },
- { "blacklist", 1, NULL, 'b' }, /* deprecated alias for 'block-rpcs' */
{ "allow-rpcs", 1, NULL, 'a' },
#ifdef _WIN32
{ "service", 1, NULL, 's' },
--
2.41.0
5 months, 3 weeks
[PATCH 0/2] qapi: Remove deprecated events
by Philippe Mathieu-Daudé
Remove MEM_UNPLUG_ERROR and 'vcpu' field in TRACE events,
all deprecated since long enough.
Philippe Mathieu-Daudé (2):
hw/acpi: Remove the deprecated QAPI MEM_UNPLUG_ERROR event
trace: Remove deprecated 'vcpu' field from QMP trace events
docs/about/deprecated.rst | 16 ----------------
docs/about/removed-features.rst | 15 +++++++++++++++
qapi/machine.json | 28 ----------------------------
qapi/trace.json | 27 +++------------------------
hw/acpi/memory_hotplug.c | 8 --------
hw/ppc/spapr.c | 11 +----------
trace/qmp.c | 2 --
trace/trace-hmp-cmds.c | 4 ++--
8 files changed, 21 insertions(+), 90 deletions(-)
--
2.41.0
5 months, 3 weeks
[PATCH] rpm: Don't default to nftables on existing distros
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
libvirt.spec.in | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 4381dbe30c..5ca7b95e6c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -205,6 +205,18 @@
%define with_modular_daemons 1
%endif
+# Prefer nftables for future OS releases but keep using iptables
+# for existing ones
+%if 0%{?rhel} >= 10 || 0%{?fedora} >= 41
+ %define prefer_nftables 1
+ %define firewall_backend_priority nftables,iptables
+%else
+ %define prefer_nftables 0
+ %define firewall_backend_priority iptables,nftables
+%endif
+
+
+
# Force QEMU to run as non-root
%define qemu_user qemu
%define qemu_group qemu
@@ -592,7 +604,7 @@ Summary: Network driver plugin for the libvirtd daemon
Requires: libvirt-daemon-common = %{version}-%{release}
Requires: libvirt-libs = %{version}-%{release}
Requires: dnsmasq >= 2.41
- %if 0%{?rhel} >= 10 || 0%{?fedora} >= 41
+ %if %{prefer_nftables}
Requires: nftables
%else
Requires: iptables
@@ -1387,7 +1399,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec)
%{?enable_werror} \
-Dexpensive_tests=enabled \
-Dinit_script=systemd \
- -Dfirewall_backend_priority=nftables,iptables \
+ -Dfirewall_backend_priority=%{firewall_backend_priority} \
-Ddocs=enabled \
-Dtests=enabled \
-Drpath=disabled \
--
2.45.1
5 months, 3 weeks
[PATCH 0/3] meson: Improve default firewall backend configuration
by Andrea Bolognani
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/1308917840
See 1/3 for details.
Andrea Bolognani (3):
meson: Improve default firewall backend configuration
meson: Include firewall backend selection in summary
rpm: Configure firewall backends explicitly
libvirt.spec.in | 1 +
meson.build | 21 ++++++++++++++-------
meson_options.txt | 3 +--
src/network/bridge_driver_conf.c | 6 +++++-
src/network/meson.build | 6 ++++--
src/network/network.conf.in | 13 +++++++------
6 files changed, 32 insertions(+), 18 deletions(-)
--
2.45.1
5 months, 3 weeks
Release of libvirt-10.4.0
by Jiri Denemark
The 10.4.0 release of both libvirt and libvirt-python is tagged and
signed tarballs are available at
https://download.libvirt.org/
https://download.libvirt.org/python/
Thanks everybody who helped with this release by sending patches,
reviewing, testing, or providing feedback. Your work is greatly
appreciated.
* New features
* qemu: Support for ras feature for virt machine type
It is now possible to set on/off ``ras`` feature in the domain XML for virt
(Arm) machine type as ``<ras state='on'/>``.
* SSH proxy for VM
Libvirt now installs a binary helper that allows connecting to QEMU domains
via SSH using the following scheme: ``ssh user@qemu/virtualMachine``.
* qemu: Support for ``virtio`` sound model
Sound devices can now be configured to use the virtio model with
``<sound model='virtio'/>``. This model is available from QEMU 8.2.0
onwards.
* network: use nftables to setup virtual network firewall rules
The network driver can now use nftables rules for the virtual
network firewalls, rather than iptables. With the standard build
options, nftables is preferred over iptables (with fallback to
iptables if nftables isn't installed), but this can be modified at
build time, or at runtime via the firewall_backend setting in
network.conf. (NB: the nwfilter driver still uses
ebtables/iptables).
* 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
A bug introduced in `v10.3.0 (2024-05-02)`_ caused that the attempt to print
help for any command by using the ``--help`` option in ``virsh`` and
``virt-admin`` would print::
$ virsh list --help
error: command 'list' doesn't support option --help
instead of the help output. A workaround for the affected version is to use
the help command::
$ virsh help list
* qemu: Fix ``virsh save`` and migration when storage in question is root_squashed NFS
Attempting to save a VM to a root_squash NFS mount or migrating with disks
hosted on such mount could, in some scenarios, result in error stating::
'Unknown error 255'
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.
* 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
assigned after validation and thus errorneously reject valid configs.
Enjoy.
Jirka
5 months, 3 weeks