[PATCH] (for 10.8.0? undecided) qemu: fix regression in update-device for interfaces
by Laine Stump
Commit a37bd2a15b8f2e7aa09519c86fe1ba1e59ce113f eliminated a failure
to update *any* change in an interface that was connected via a
network that consisted of a pool of VFs using macvtap passthrough
mode. Unfortunately it caused a regression that results in failure to
update changes to bandwidth/vlan/trustGuestRxFilters in any interface
connected via a network that uses a bridge to connect tap devices.
This fixes that problem by narrowing the usage of the fix in the
earlier patch to only be done in the case that the the interface is
connected via a macvtap+passthrough network.
Signed-off-by: Laine Stump <laine(a)redhat.com>
Fixes: a37bd2a15b8f2e7aa09519c86fe1ba1e59ce113f
---
The alternatives to this are:
1) revert a37bd2a15b8f2e7aa09519c86fe1ba1e59ce113f (but I haven't
checked yet if that will cause problems with the other patches in
that same series) to eliminate the regression but also unfix the
bug that was fixed, or
2) Do nothing and release with the regression.
Wish I'd found this a couple days earlier :-/
src/qemu/qemu_hotplug.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 09a37caf85..4d4bcde1bc 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3918,12 +3918,19 @@ qemuDomainChangeNet(virQEMUDriver *driver,
* free it if we fail for any reason
*/
if (newdev->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
- if (olddev->type == VIR_DOMAIN_NET_TYPE_NETWORK
- && STREQ(olddev->data.network.name, newdev->data.network.name)) {
+ if (olddev->type == VIR_DOMAIN_NET_TYPE_NETWORK &&
+ oldType == VIR_DOMAIN_NET_TYPE_DIRECT &&
+ virDomainNetGetActualDirectMode(olddev) == VIR_NETDEV_MACVLAN_MODE_PASSTHRU &&
+ STREQ(olddev->data.network.name, newdev->data.network.name)) {
/* old and new are type='network', and the network name
- * hasn't changed. In this case we *don't* want to get a
- * new port ("actual device") from the network because we
- * can use the old one (since it hasn't changed).
+ * hasn't changed *and* this is a network where each
+ * connection is allocated exclusive use of a VF
+ * device. In this case we *don't* want to get a new port
+ * ("actual device") from the network because attempting
+ * to allocate a new device would also allocate a
+ * new/different VF, causing the update to fail. And
+ * anyway we can use olddev's actualNetDef (since it
+ * hasn't changed).
*
* So instead we just duplicate *the pointer to* the
* actualNetDef from olddev to newdev so that comparisons
--
2.46.1
2 months, 3 weeks
[PATCH 0/2] qemu: blockjob: Fix ordering of operations when concluding a block copy
by Peter Krempa
Modify the ordering so that the VM definition stays in a state allowing
us to format a valid XML for the virt-aa-helper.
Peter Krempa (2):
qemu: blockjob: Update 'mirror' of a copy job before removing images
qemu: blockjob: Clean out disk mirror data after concluding the job
src/qemu/qemu_blockjob.c | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
--
2.46.0
2 months, 3 weeks
Entering freeze for libvirt-10.8.0
by Jiri Denemark
I have just tagged v10.8.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
2 months, 3 weeks
[PATCH 00/13] qemu: zero-detection for non-shared-storage migration
by Peter Krempa
See 12/13 for rationale.
The first patch fixes allocation setting when pre-creating qcow2 images
for migration.
Next few patches fix/improve typed parameter list handling.
Next few refactor handling of 'migrate_disks' parameter and the final
two implement the new feature.
Peter Krempa (13):
qemu: migration: Pre-create QCOW2 images for non-shared storage with 0
allocation
virTypedParamsFilter: Adjust return type and docs
virTypedParamsGetStringList: Refactor and adjust docs
virTypedParamsFilter: Introduce option to filter also by type
virTypedParamsGetStringList: Ensure that returned array is NULL if
there are no matching fields
virTypedParamsGetStringList: Ensure that returned string list is
NULL-terminated
qemuMigrationSrcBeginPhaseBlockDirtyBitmaps: Use
qemuMigrationAnyCopyDisk()
qemu: migration: Don't log 'nmigrate_disks'
qemu: migration: Avoid use of 'nmigration_disks'
qemu: migration: Extract validation of disk target list
qemu: migration: Remove 'nmigration_disks' variable from all places
qemu: Introduce and wire in
'VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES'
virsh: Add support for VIR_MIGRATE_PARAM_MIGRATE_DISKS_DETECT_ZEROES
migration parameter
docs/manpages/virsh.rst | 8 +-
include/libvirt/libvirt-domain.h | 13 ++
src/qemu/qemu_driver.c | 55 +++---
src/qemu/qemu_migration.c | 299 +++++++++++++++++--------------
src/qemu/qemu_migration.h | 7 +-
src/util/virtypedparam.c | 72 ++++----
src/util/virtypedparam.h | 3 +-
tests/virtypedparamtest.c | 14 +-
tools/virsh-domain.c | 26 +++
9 files changed, 287 insertions(+), 210 deletions(-)
--
2.46.0
2 months, 3 weeks
[PATCH v2 00/18] tcg plugins pre-PR (deprecations, mem apis, contrib plugins)
by Alex Bennée
I think all these are ready to go having been mostly reviewed in previous
series. The following still need review:
util/timer: avoid deadlock when shutting down
tests/tcg: add a system test to check memory instrumentation
tests/tcg: ensure s390x-softmmu output redirected
tests/tcg/multiarch: add test for plugin memory access (0 acks, 1 sobs, 1 tbs)
v2
- fix some nits
- included fix to ips posted as an RFC before
Alex.
Akihiko Odaki (1):
contrib/plugins: Add a plugin to generate basic block vectors
Alex Bennée (9):
deprecation: don't enable TCG plugins by default on 32 bit hosts
deprecation: don't enable TCG plugins by default with TCI
contrib/plugins: control flow plugin
tests/tcg: clean up output of memory system test
tests/tcg: only read/write 64 bit words on 64 bit systems
tests/tcg: ensure s390x-softmmu output redirected
tests/tcg: add a system test to check memory instrumentation
util/timer: avoid deadlock when shutting down
contrib/plugins: avoid hanging program
Pierrick Bouvier (6):
plugins: save value during memory accesses
plugins: extend API to get latest memory value accessed
tests/tcg: add mechanism to run specific tests with plugins
tests/tcg: allow to check output of plugins
tests/tcg/plugins/mem: add option to print memory accesses
tests/tcg/multiarch: add test for plugin memory access
Rowan Hart (2):
plugins: add plugin API to read guest memory
plugins: add option to dump write argument to syscall plugin
docs/about/deprecated.rst | 19 +
docs/about/emulation.rst | 44 +-
configure | 32 +-
accel/tcg/atomic_template.h | 66 ++-
include/hw/core/cpu.h | 4 +
include/qemu/plugin.h | 4 +
include/qemu/qemu-plugin.h | 64 ++-
contrib/plugins/bbv.c | 158 +++++++
contrib/plugins/cflow.c | 384 ++++++++++++++++++
contrib/plugins/ips.c | 5 +
plugins/api.c | 53 +++
plugins/core.c | 6 +
tcg/tcg-op-ldst.c | 66 ++-
tests/tcg/multiarch/system/memory.c | 123 ++++--
tests/tcg/multiarch/test-plugin-mem-access.c | 177 ++++++++
tests/tcg/plugins/mem.c | 248 ++++++++++-
tests/tcg/plugins/syscall.c | 117 ++++++
util/qemu-timer.c | 14 +-
accel/tcg/atomic_common.c.inc | 13 +-
accel/tcg/ldst_common.c.inc | 38 +-
contrib/plugins/Makefile | 2 +
plugins/qemu-plugins.symbols | 2 +
tests/tcg/Makefile.target | 12 +-
tests/tcg/alpha/Makefile.softmmu-target | 2 +-
tests/tcg/alpha/Makefile.target | 3 +
tests/tcg/multiarch/Makefile.target | 11 +
tests/tcg/multiarch/check-plugin-output.sh | 36 ++
.../multiarch/system/Makefile.softmmu-target | 6 +
.../system/validate-memory-counts.py | 129 ++++++
tests/tcg/ppc64/Makefile.target | 5 +
tests/tcg/s390x/Makefile.softmmu-target | 8 +-
31 files changed, 1768 insertions(+), 83 deletions(-)
create mode 100644 contrib/plugins/bbv.c
create mode 100644 contrib/plugins/cflow.c
create mode 100644 tests/tcg/multiarch/test-plugin-mem-access.c
create mode 100755 tests/tcg/multiarch/check-plugin-output.sh
create mode 100755 tests/tcg/multiarch/system/validate-memory-counts.py
--
2.39.5
2 months, 3 weeks
[RFC PATCH v2 0/8] swtpm: Add support for profiles
by Stefan Berger
Upcoming libtpms v0.10 and swtpm v0.10 will have TPM profile support that
allows to restrict a TPM's provided set of crypto algorithms and commands
and through which backwards compatibility and migration from newer versions
of libtpms to older ones (up to libtpms v0.9) is supported. For the latter
to work it is necessary that the user chooses the right ('null') profile.
This series adds support for passing a profile choice to swtpm_setup by
setting it in the domain XML using the <profile/> XML node. An optional
attribute 'remove_disabled' can be set in this node and accepts two values:
"check": test a few crypto algorithms (tdes, camellia, unpadded encryption,
and others) for whether they are currently disabled due to FIPS
mode on the host and remove these algorithms in the 'custom'
profile if they are disabled;
"fips-host": do not test but remove all the possibly disabled crypto
algorithms (from list above)
Also extend the documentation but point the user to swtpm and libtpms
documentation for further details.
Follow Deniel's suggestions there's now a PR for swtpm_setup to support
searching for profiles though a configurable local directory, distro
directory and if no profile could be found there (with appended
".json" suffix) it will fall back to try to use a built-in profile by
the provided name: https://github.com/stefanberger/swtpm/pull/918
Stefan
Stefan Berger (8):
conf: Move TPM emulator parameters into own struct
qemu: Pass virQEMUDriverConfig rather than some of its fields
util: Add parsing support for swtpm_setup's cmdarg-profile capability
conf: Define enum virDomainTPMProfileRemoveDisabled
schema: Extend schema for TPM emulator profile node
conf: Add support for profile parameter on TPM emulator in domain XML
docs: Add documentation for the TPM backend profile node
qemu: Extend swtpm_setup command line to set a profile by its name
docs/formatdomain.rst | 30 ++++++++
src/conf/domain_conf.c | 43 +++++++++++
src/conf/domain_conf.h | 35 ++++++---
src/conf/domain_validate.c | 7 ++
src/conf/schemas/domaincommon.rng | 25 ++++++
src/conf/virconftypes.h | 2 +
src/qemu/qemu_tpm.c | 124 +++++++++++++++++-------------
src/util/virtpm.c | 1 +
src/util/virtpm.h | 1 +
tests/testutilsqemu.c | 1 +
10 files changed, 203 insertions(+), 66 deletions(-)
--
2.46.1
2 months, 3 weeks
[PATCH] NEWS: add blurbs about a couple of bugs I fixed this month
by Laine Stump
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
NEWS.rst | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index beea8221e1..617af915b3 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -19,6 +19,19 @@ v10.8.0 (unreleased)
* **Improvements**
+ * network: make networks with <forward mode='open'/> more useful
+
+ It is now permissable to have a <forward mode='open'> network that
+ has no IP address assigned to the host's port of the bridge. This
+ is the only way to create a libvirt network where guests are
+ unreachable from the host (and vice versa) and also 0 firewall
+ rules are added on the host.
+
+ It is now also possible for a <forward mode='open'/> network to
+ use the "zone" attribute of <bridge> to set the firewalld zone of
+ the bridge interface (normally it would not be set, as is done
+ with other forward modes).
+
* **Bug fixes**
* virsh: Fix script-friedly output of ``virsh list --uuid``
@@ -32,6 +45,18 @@ v10.8.0 (unreleased)
Note that this also broke the ``libvirt-guests`` script. The bug was
introduced in `v10.7.0 (2024-09-02)`_.
+ * network/qemu: fix some cases where device-update of a network
+ interface was failing:
+
+ * If the interface was connected to a libvirt network that was
+ providing a pool of VFs to be used with macvtap passthrough
+ mode, then *any* update to the interface would fail, even
+ changing the link state. Updating (the updateable parts of) a
+ macvtap passthrough interface will now succeed.
+
+ * It previously was not possible to move an interface from a Linux
+ host bridge to an OVS bridge. This (and the opposite direction)
+ now works.
v10.7.0 (2024-09-02)
====================
--
2.46.1
2 months, 3 weeks
[PATCH v2] docs: Mark "gluster" support in QEMU as deprecated
by Thomas Huth
According to https://marc.info/?l=fedora-devel-list&m=171934833215726
the GlusterFS development effectively ended. Thus mark it as deprecated
in QEMU, so we can remove it in a future release if the project does
not gain momentum again.
Acked-by: Niels de Vos <ndevos(a)redhat.com>
Signed-off-by: Thomas Huth <thuth(a)redhat.com>
---
v2: Mark it as deprecated in the QAPI and print a warning once, too
docs/about/deprecated.rst | 9 +++++++++
qapi/block-core.json | 7 ++++++-
block/gluster.c | 2 ++
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index ed31d4b0b2..b231aa3948 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -395,6 +395,15 @@ Specifying the iSCSI password in plain text on the command line using the
used instead, to refer to a ``--object secret...`` instance that provides
a password via a file, or encrypted.
+``gluster`` backend (since 9.2)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+According to https://marc.info/?l=fedora-devel-list&m=171934833215726
+the GlusterFS development effectively ended. Unless the development
+gains momentum again, the QEMU project might remove the gluster backend
+in a future release.
+
+
Character device options
''''''''''''''''''''''''
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 9f6dd59298..cb7cb1c0ed 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -3187,12 +3187,17 @@
#
# @snapshot-access: Since 7.0
#
+# Features:
+#
+# @deprecated: Member @gluster is deprecated since GlusterFS ceased development
+#
# Since: 2.9
##
{ 'enum': 'BlockdevDriver',
'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs',
'cloop', 'compress', 'copy-before-write', 'copy-on-read', 'dmg',
- 'file', 'snapshot-access', 'ftp', 'ftps', 'gluster',
+ 'file', 'snapshot-access', 'ftp', 'ftps',
+ {'name': 'gluster', 'features': [ 'deprecated' ] },
{'name': 'host_cdrom', 'if': 'HAVE_HOST_BLOCK_DEVICE' },
{'name': 'host_device', 'if': 'HAVE_HOST_BLOCK_DEVICE' },
'http', 'https',
diff --git a/block/gluster.c b/block/gluster.c
index f8b415f381..f03d05251e 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -809,6 +809,8 @@ static int qemu_gluster_open(BlockDriverState *bs, QDict *options,
goto out;
}
+ warn_report_once("'gluster' is deprecated");
+
filename = qemu_opt_get(opts, GLUSTER_OPT_FILENAME);
s->debug = qemu_opt_get_number(opts, GLUSTER_OPT_DEBUG,
--
2.46.0
2 months, 3 weeks
[PATCH] NEWS: Describe more fixed things for this release
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Applies on master before Laine's and Peter's updates, but I'll move the items
below the others once they are pushed (or hopefully Jirka if I don't notice
until release).
NEWS.rst | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index beea8221e1c0..472bedd04436 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -19,6 +19,11 @@ v10.8.0 (unreleased)
* **Improvements**
+ * Relax restrictions for memorytune settings
+
+ It should now be possible to use resctrl on AMD CPUs as well as Intel CPUs
+ when the resctrl filesystem is mounted with ``mba_MBps`` option.
+
* **Bug fixes**
* virsh: Fix script-friedly output of ``virsh list --uuid``
@@ -32,6 +37,20 @@ v10.8.0 (unreleased)
Note that this also broke the ``libvirt-guests`` script. The bug was
introduced in `v10.7.0 (2024-09-02)`_.
+ * network: Better cleanup after disappeared networks
+
+ If a network disappeared while virtnetworkd was not running not all clean up
+ was done properly once the daemon was started, especially when only the
+ network interface disappeared. This could have in some cases resulted in
+ the network being shown as inactive, but not being able to start.
+
+ * qemu: Remember memory backing directory for domains
+
+ If ``memory_backing_dir`` is changed during the lifetime of a domain with
+ file backed memory, files in the old directory would not be cleaned up once
+ the domain is shut down. Now the directory that was used during startup is
+ remembered for each running domain.
+
v10.7.0 (2024-09-02)
====================
--
2.46.2
2 months, 3 weeks