[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
5 months, 1 week
[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
5 months, 1 week
[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
5 months, 1 week
[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
5 months, 1 week
[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
5 months, 1 week
Re: [PATCH RFC v4 11/17] qemu: block: Support block disk along with
throttle filters
by Edward Arulanadam
Dear All,
My sincere apologies on reaching out regarding this change as I know, someone would be reviewing the change and provide review comments as per the community guidelines. Since this change is very critical for us to move forward, may I request for a review and let us know if this is good now.
Thanks and Regards,
Edward Arulanandam
5 months, 1 week
[libvirt PATCH] NEWS: YAJL -> json-c switch
by Ján Tomko
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
NEWS.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index beea8221e1..0cbc0227db 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -19,6 +19,12 @@ v10.8.0 (unreleased)
* **Improvements**
+ * Switch from YAJL to json-c for JSON parsing and formatting
+
+ The parser and formatter in the libvirt library, as well
+ as the parsers in the nss plugin were rewritten to use json-c
+ instead of YAJL, which is effectively dead upstream.
+
* **Bug fixes**
* virsh: Fix script-friedly output of ``virsh list --uuid``
--
2.46.1
5 months, 1 week
[PATCH] qemu: Look for qemu-bridge-helper in more directories
by Andrea Bolognani
Commit 0caacf47d7b423db9126660fb0382ed56cd077c1 recently
made it so the new path used for qemu-bridge-helper in Debian
would be allowed, but the logic used to actually figure out
the complete path for the helper was not updated accordingly.
https://bugs.debian.org/1082530
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/hypervisor/domain_interface.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/hypervisor/domain_interface.c b/src/hypervisor/domain_interface.c
index 5cdba279fa..5bc698d272 100644
--- a/src/hypervisor/domain_interface.c
+++ b/src/hypervisor/domain_interface.c
@@ -541,6 +541,7 @@ virDomainCreateInBridgePortWithHelper(const char *bridgeHelperName,
unsigned int flags)
{
const char *const bridgeHelperDirs[] = {
+ "/usr/libexec/qemu",
"/usr/libexec",
"/usr/lib/qemu",
"/usr/lib",
--
2.46.1
5 months, 1 week
[PATCH] news: Mention 'showmount' dependency change and overflow/memleak fixes
by Peter Krempa
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
Note: applies on top of Laine's NEWS patch.
NEWS.rst | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 617af915b3..6869136325 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -32,6 +32,13 @@ v10.8.0 (unreleased)
the bridge interface (normally it would not be set, as is done
with other forward modes).
+ * storage: Lessen dependancy on the ``showmount`` program
+
+ Libvirt now automatically detects presence of ``showmount`` during runtime
+ as we do with other helper programs and also the
+ ``daemon-driver-storage-core`` RPM package now doesn't strongly depend on it
+ if the users wish for a more minimal deployment.
+
* **Bug fixes**
* virsh: Fix script-friedly output of ``virsh list --uuid``
@@ -58,6 +65,17 @@ v10.8.0 (unreleased)
host bridge to an OVS bridge. This (and the opposite direction)
now works.
+ * qemu: backup: Fix possible crashes when running monitoring commands during backup job
+
+ The qemu monitor code was fixed to not crash in specific cases when
+ monitoing APIs are called during a backup job.
+
+ * Fix various memleaks and overflows
+
+ Multiple memory leaks and overflows in corner cases were fixed based on
+ upstream issues reported.
+
+
v10.7.0 (2024-09-02)
====================
--
2.46.0
5 months, 1 week
[RFC PATCH 0/5] Implement amd-iommu device to libvirt
by Han Han
Here is a draft patch series for amd-iommu device. It will implement
amd-iommu device and its attributes: intremap, device-iotlb, xtsup.
However, its secret device AMDVI-PCI will occupy a PCIe slot and cause
VM failed to start:
Domain XML:
<domain type='kvm'>
...
<video>
<model type='virtio' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
<iommu model='amd'/>
...
</domain>
➜ ~ virsh create /tmp/fedora.xml
error: Failed to create domain from /tmp/fedora.xml
error: internal error: QEMU unexpectedly closed the monitor (vm='fedora'): 2024-09-27T07:55:46.132886Z qemu-system-x86_64: -device {"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pcie.0","addr":"0x1"}: PCI: slot 1 function 0 not available for virtio-vga, in use by AMDVI-PCI,id=(null)
I'll update the series when QEMU fixes the blocker.
Han Han (5):
qemu_capabilities: Introduce QEMU_CAPS_AMD_IOMMU
qemu_capabilities: Introduce QEMU_CAPS_AMD_IOMMU_INTREMAP
qemu_capabilities: Introduce QEMU_CAPS_AMD_IOMMU_DEVICE_IOTLB
qemu_capabilities: Introduce QEMU_CAPS_AMD_IOMMU_XTSUP
qemu: Add suppport for amd-iommu device and xtsup attrib
docs/formatdomain.rst | 20 +++-
src/conf/domain_conf.c | 16 +++
src/conf/domain_conf.h | 2 +
src/conf/domain_validate.c | 39 +++++++-
src/conf/schemas/domaincommon.rng | 6 ++
src/qemu/qemu_capabilities.c | 16 +++
src/qemu/qemu_capabilities.h | 6 ++
src/qemu/qemu_command.c | 15 +++
src/qemu/qemu_domain_address.c | 2 +
src/qemu/qemu_validate.c | 1 +
.../caps_5.2.0_x86_64.replies | 90 +++++++++++------
.../caps_5.2.0_x86_64.xml | 3 +
.../caps_6.0.0_x86_64.replies | 90 +++++++++++------
.../caps_6.0.0_x86_64.xml | 3 +
.../caps_6.1.0_x86_64.replies | 90 +++++++++++------
.../caps_6.1.0_x86_64.xml | 3 +
.../caps_6.2.0_x86_64.xml | 3 +
.../caps_7.0.0_x86_64.replies | 94 ++++++++++++------
.../caps_7.0.0_x86_64.xml | 3 +
.../caps_7.1.0_x86_64.replies | 94 ++++++++++++------
.../caps_7.1.0_x86_64.xml | 3 +
.../caps_7.2.0_x86_64+hvf.replies | 94 ++++++++++++------
.../caps_7.2.0_x86_64+hvf.xml | 3 +
.../caps_7.2.0_x86_64.replies | 94 ++++++++++++------
.../caps_7.2.0_x86_64.xml | 3 +
.../caps_8.0.0_x86_64.replies | 94 ++++++++++++------
.../caps_8.0.0_x86_64.xml | 3 +
.../caps_8.1.0_x86_64.replies | 90 +++++++++++------
.../caps_8.1.0_x86_64.xml | 3 +
.../caps_8.2.0_x86_64.replies | 86 ++++++++++------
.../caps_8.2.0_x86_64.xml | 3 +
.../caps_9.0.0_x86_64.replies | 99 +++++++++++++------
.../caps_9.0.0_x86_64.xml | 4 +
.../caps_9.1.0_x86_64.replies | 79 ++++++++++-----
.../caps_9.1.0_x86_64.xml | 4 +
tests/qemuxmlconfdata/amd-iommu-aw-bits.err | 1 +
tests/qemuxmlconfdata/amd-iommu-aw-bits.xml | 32 ++++++
.../amd-iommu-caching-mode.err | 1 +
.../amd-iommu-caching-mode.xml | 32 ++++++
.../amd-iommu-device-iotlb.x86_64-latest.args | 34 +++++++
.../amd-iommu-device-iotlb.xml | 37 +++++++
.../amd-iommu-dma-translation.err | 1 +
.../amd-iommu-dma-translation.xml | 32 ++++++
tests/qemuxmlconfdata/amd-iommu-eim.err | 1 +
tests/qemuxmlconfdata/amd-iommu-eim.xml | 32 ++++++
.../amd-iommu-xtsup.x86_64-latest.args | 34 +++++++
tests/qemuxmlconfdata/amd-iommu-xtsup.xml | 32 ++++++
.../amd-iommu.x86_64-latest.args | 34 +++++++
tests/qemuxmlconfdata/amd-iommu.xml | 32 ++++++
tests/qemuxmlconfdata/intel-iommu-xtsup.err | 1 +
tests/qemuxmlconfdata/intel-iommu-xtsup.xml | 38 +++++++
tests/qemuxmlconftest.c | 8 ++
52 files changed, 1275 insertions(+), 365 deletions(-)
create mode 100644 tests/qemuxmlconfdata/amd-iommu-aw-bits.err
create mode 100644 tests/qemuxmlconfdata/amd-iommu-aw-bits.xml
create mode 100644 tests/qemuxmlconfdata/amd-iommu-caching-mode.err
create mode 100644 tests/qemuxmlconfdata/amd-iommu-caching-mode.xml
create mode 100644 tests/qemuxmlconfdata/amd-iommu-device-iotlb.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/amd-iommu-device-iotlb.xml
create mode 100644 tests/qemuxmlconfdata/amd-iommu-dma-translation.err
create mode 100644 tests/qemuxmlconfdata/amd-iommu-dma-translation.xml
create mode 100644 tests/qemuxmlconfdata/amd-iommu-eim.err
create mode 100644 tests/qemuxmlconfdata/amd-iommu-eim.xml
create mode 100644 tests/qemuxmlconfdata/amd-iommu-xtsup.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/amd-iommu-xtsup.xml
create mode 100644 tests/qemuxmlconfdata/amd-iommu.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/amd-iommu.xml
create mode 100644 tests/qemuxmlconfdata/intel-iommu-xtsup.err
create mode 100644 tests/qemuxmlconfdata/intel-iommu-xtsup.xml
--
2.46.2
5 months, 1 week