[PATCH v2 0/8] qemu: Remember memory backing paths for started domains
by Martin Kletzander
Every time we work with file-backed memory we construct the paths from the
driver config. Not only does is that slow, it is also wrong. If the
configuration changes while a domain with file-backed memory is running, once
the daemon is restarted and the domain is being stopped, we construct the wrong
path to clean up. And it also makes it more difficult to change that in the
future, for example the patch series which led me to write this patch series:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/I...
The patches are maybe split way too much, so feel free to suggest squashing some
together, I'm not opposed to that.
v2:
- Do not introduce unused functions
v1:
- https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/H5...
Martin Kletzander (8):
qemu: Move domain-related functions to qemu_domain
qemu: Change parameters of qemuGetMemoryBackingDomainPath()
qemu: Add memoryBackingDir to qemuDomainObjPrivate
qemu: Set memoryBackingDir in private data upon start
qemu: Use per-domain private memoryBackingDir for new memory backends
qemu: Make qemuGetMemoryBackingDomainPath static
qemu: Rename memory path functions
qemu: Generate domain memory backing path directly
src/qemu/qemu_command.c | 5 +-
src/qemu/qemu_conf.c | 58 ---------------
src/qemu/qemu_conf.h | 8 --
src/qemu/qemu_domain.c | 73 ++++++++++++++++++-
src/qemu/qemu_domain.h | 7 ++
src/qemu/qemu_hotplug.c | 4 +-
src/qemu/qemu_process.c | 13 ++--
src/qemu/qemu_process.h | 3 +-
.../qemustatusxml2xmldata/backup-pull-in.xml | 1 +
.../blockjob-blockdev-in.xml | 1 +
.../blockjob-mirror-in.xml | 1 +
.../memory-backing-dir-in.xml | 61 ++++++++++++++++
.../memory-backing-dir-out.xml | 1 +
.../migration-in-params-in.xml | 1 +
.../migration-out-nbd-bitmaps-in.xml | 1 +
.../migration-out-nbd-out.xml | 1 +
.../migration-out-nbd-tls-out.xml | 1 +
.../migration-out-params-in.xml | 1 +
tests/qemustatusxml2xmldata/modern-in.xml | 1 +
tests/qemustatusxml2xmldata/upgrade-out.xml | 1 +
.../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 +
tests/qemuxmlactivetest.c | 2 +
22 files changed, 163 insertions(+), 83 deletions(-)
create mode 100644 tests/qemustatusxml2xmldata/memory-backing-dir-in.xml
create mode 120000 tests/qemustatusxml2xmldata/memory-backing-dir-out.xml
--
2.46.1
6 months, 3 weeks
[PATCH 0/4] small improvements to virSocketAddr, and a trivial debug log change
by Laine Stump
I noticed the virSocjetAddr() stuff when I was writing code that was
going to use virSocketAddrMask(). I think I ended up not using that
function after all, but the fixes are still worthwhile.
Laine Stump (4):
network: fix argument order/log level in message about
firewall_backend
util: fix virSocketAddrMask() when source and result are the same
object
util: make virSocketAddrIPv4 a union
util: use uint32 instead of char[4] for several virSocketAddrIPv4
operations
src/network/bridge_driver_conf.c | 4 +-
src/util/virsocketaddr.c | 84 +++++++++++++++-----------------
2 files changed, 42 insertions(+), 46 deletions(-)
--
2.46.0
6 months, 3 weeks
[libvirt PATCHv2 00/15] Switch to json-c from yajl
by Ján Tomko
Ján Tomko (15):
util: json: introduce virJSONStringPrettifyBlanks
tests: switch to compact empty JSON object formatting
build: introduce WITH_JSON
ci: install json-c too
meson: add option for building with json-c
meson: switch checks to depend on json-c as well as yajl
build: do not depend on yajl
build: link with json_c
util: json: write a json-c implementation
nss: convert findLeases to use json-c
nss: convert findMACs to use json-c
meson: do not link anything with yajl anymore
meson: options: drop yajl
meson: drop yajl detection
ci: drop yajl completely
ci/buildenv/almalinux-9.sh | 4 +-
ci/buildenv/alpine-319.sh | 4 +-
ci/buildenv/alpine-edge.sh | 4 +-
ci/buildenv/centos-stream-9.sh | 4 +-
ci/buildenv/debian-11-cross-aarch64.sh | 2 +-
ci/buildenv/debian-11-cross-armv6l.sh | 2 +-
ci/buildenv/debian-11-cross-armv7l.sh | 2 +-
ci/buildenv/debian-11-cross-i686.sh | 2 +-
ci/buildenv/debian-11-cross-mips64el.sh | 2 +-
ci/buildenv/debian-11-cross-mipsel.sh | 2 +-
ci/buildenv/debian-11-cross-ppc64le.sh | 2 +-
ci/buildenv/debian-11-cross-s390x.sh | 2 +-
ci/buildenv/debian-11.sh | 2 +-
ci/buildenv/debian-12-cross-aarch64.sh | 2 +-
ci/buildenv/debian-12-cross-armv6l.sh | 2 +-
ci/buildenv/debian-12-cross-armv7l.sh | 2 +-
ci/buildenv/debian-12-cross-i686.sh | 2 +-
ci/buildenv/debian-12-cross-mips64el.sh | 2 +-
ci/buildenv/debian-12-cross-mipsel.sh | 2 +-
ci/buildenv/debian-12-cross-ppc64le.sh | 2 +-
ci/buildenv/debian-12-cross-s390x.sh | 2 +-
ci/buildenv/debian-12.sh | 2 +-
ci/buildenv/debian-sid-cross-aarch64.sh | 2 +-
ci/buildenv/debian-sid-cross-armv6l.sh | 2 +-
ci/buildenv/debian-sid-cross-armv7l.sh | 2 +-
ci/buildenv/debian-sid-cross-i686.sh | 2 +-
ci/buildenv/debian-sid-cross-mips64el.sh | 2 +-
ci/buildenv/debian-sid-cross-ppc64le.sh | 2 +-
ci/buildenv/debian-sid-cross-s390x.sh | 2 +-
ci/buildenv/debian-sid.sh | 2 +-
ci/buildenv/fedora-39.sh | 4 +-
ci/buildenv/fedora-40.sh | 4 +-
ci/buildenv/fedora-rawhide.sh | 4 +-
ci/buildenv/opensuse-leap-15.sh | 2 +-
ci/buildenv/opensuse-tumbleweed.sh | 2 +-
ci/buildenv/ubuntu-2204.sh | 2 +-
ci/buildenv/ubuntu-2404.sh | 2 +-
ci/cirrus/freebsd-13.vars | 2 +-
ci/cirrus/freebsd-14.vars | 2 +-
ci/cirrus/macos-13.vars | 2 +-
ci/cirrus/macos-14.vars | 2 +-
ci/containers/almalinux-9.Dockerfile | 4 +-
ci/containers/alpine-319.Dockerfile | 4 +-
ci/containers/alpine-edge.Dockerfile | 4 +-
ci/containers/centos-stream-9.Dockerfile | 4 +-
.../debian-11-cross-aarch64.Dockerfile | 2 +-
.../debian-11-cross-armv6l.Dockerfile | 2 +-
.../debian-11-cross-armv7l.Dockerfile | 2 +-
ci/containers/debian-11-cross-i686.Dockerfile | 2 +-
.../debian-11-cross-mips64el.Dockerfile | 2 +-
.../debian-11-cross-mipsel.Dockerfile | 2 +-
.../debian-11-cross-ppc64le.Dockerfile | 2 +-
.../debian-11-cross-s390x.Dockerfile | 2 +-
ci/containers/debian-11.Dockerfile | 2 +-
.../debian-12-cross-aarch64.Dockerfile | 2 +-
.../debian-12-cross-armv6l.Dockerfile | 2 +-
.../debian-12-cross-armv7l.Dockerfile | 2 +-
ci/containers/debian-12-cross-i686.Dockerfile | 2 +-
.../debian-12-cross-mips64el.Dockerfile | 2 +-
.../debian-12-cross-mipsel.Dockerfile | 2 +-
.../debian-12-cross-ppc64le.Dockerfile | 2 +-
.../debian-12-cross-s390x.Dockerfile | 2 +-
ci/containers/debian-12.Dockerfile | 2 +-
.../debian-sid-cross-aarch64.Dockerfile | 2 +-
.../debian-sid-cross-armv6l.Dockerfile | 2 +-
.../debian-sid-cross-armv7l.Dockerfile | 2 +-
.../debian-sid-cross-i686.Dockerfile | 2 +-
.../debian-sid-cross-mips64el.Dockerfile | 2 +-
.../debian-sid-cross-ppc64le.Dockerfile | 2 +-
.../debian-sid-cross-s390x.Dockerfile | 2 +-
ci/containers/debian-sid.Dockerfile | 2 +-
ci/containers/fedora-39.Dockerfile | 4 +-
ci/containers/fedora-40.Dockerfile | 4 +-
ci/containers/fedora-rawhide.Dockerfile | 4 +-
ci/containers/opensuse-leap-15.Dockerfile | 2 +-
ci/containers/opensuse-tumbleweed.Dockerfile | 2 +-
ci/containers/ubuntu-2204.Dockerfile | 2 +-
ci/containers/ubuntu-2404.Dockerfile | 2 +-
ci/lcitool/projects/libvirt.yml | 2 +-
libvirt.spec.in | 6 +-
meson.build | 62 +--
meson_options.txt | 8 +-
src/libvirt_private.syms | 1 +
src/meson.build | 2 +-
src/util/meson.build | 2 +-
src/util/virjson.c | 485 +++++-------------
src/util/virjson.h | 2 +
tests/meson.build | 8 +-
tests/qemublocktest.c | 5 +-
.../backupmerge/empty-out.json | 4 +-
tests/qemumigparamsdata/empty.json | 4 +-
tests/qemumigparamstest.c | 5 +-
tests/virmacmaptest.c | 5 +-
tests/virmacmaptestdata/empty.json | 4 +-
tests/virnetdaemontest.c | 2 +-
tests/virstoragetest.c | 4 +-
tools/nss/libvirt_nss_leases.c | 370 +++++--------
tools/nss/libvirt_nss_macs.c | 278 +++-------
tools/nss/meson.build | 4 +-
99 files changed, 475 insertions(+), 972 deletions(-)
--
2.46.0
6 months, 4 weeks
[PATCH] ci: Switch from macOS 13 to macOS 15
by Michal Privoznik
libvirt-ci added macOS 15 so let's introduce it and while at it
drop macOS 13.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
ci/cirrus/{macos-13.vars => macos-15.vars} | 0
ci/gitlab/builds.yml | 32 +++++++++++-----------
ci/manifest.yml | 14 +++++-----
3 files changed, 23 insertions(+), 23 deletions(-)
rename ci/cirrus/{macos-13.vars => macos-15.vars} (100%)
diff --git a/ci/cirrus/macos-13.vars b/ci/cirrus/macos-15.vars
similarity index 100%
rename from ci/cirrus/macos-13.vars
rename to ci/cirrus/macos-15.vars
diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml
index 214119b902..6f78ba2e89 100644
--- a/ci/gitlab/builds.yml
+++ b/ci/gitlab/builds.yml
@@ -624,22 +624,6 @@ x86_64-freebsd-14:
UPGRADE_COMMAND: pkg upgrade -y
-aarch64-macos-13:
- extends: .cirrus_build_job
- needs: []
- allow_failure: false
- variables:
- CIRRUS_VM_IMAGE_NAME: ghcr.io/cirruslabs/macos-ventura-base:latest
- CIRRUS_VM_IMAGE_SELECTOR: image
- CIRRUS_VM_INSTANCE_TYPE: macos_instance
- INSTALL_COMMAND: brew install
- NAME: macos-13
- PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin
- PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
- UPDATE_COMMAND: brew update
- UPGRADE_COMMAND: brew upgrade
-
-
aarch64-macos-14:
extends: .cirrus_build_job
needs: []
@@ -654,3 +638,19 @@ aarch64-macos-14:
PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
UPDATE_COMMAND: brew update
UPGRADE_COMMAND: brew upgrade
+
+
+aarch64-macos-15:
+ extends: .cirrus_build_job
+ needs: []
+ allow_failure: false
+ variables:
+ CIRRUS_VM_IMAGE_NAME: ghcr.io/cirruslabs/macos-sonoma-base:latest
+ CIRRUS_VM_IMAGE_SELECTOR: image
+ CIRRUS_VM_INSTANCE_TYPE: macos_instance
+ INSTALL_COMMAND: brew install
+ NAME: macos-15
+ PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin
+ PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
+ UPDATE_COMMAND: brew update
+ UPGRADE_COMMAND: brew upgrade
diff --git a/ci/manifest.yml b/ci/manifest.yml
index 647510ed2f..3c2366380c 100644
--- a/ci/manifest.yml
+++ b/ci/manifest.yml
@@ -203,13 +203,6 @@ targets:
variables:
RPM: skip
- macos-13:
- jobs:
- - arch: aarch64
- variables:
- PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin
- PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
-
macos-14:
jobs:
- arch: aarch64
@@ -217,6 +210,13 @@ targets:
PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin
PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
+ macos-15:
+ jobs:
+ - arch: aarch64
+ variables:
+ PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin
+ PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
+
ubuntu-2204:
jobs:
- arch: x86_64
--
2.44.2
6 months, 4 weeks
[PATCH 0/4] improve device-update for network interface devices
by Laine Stump
These patches are in response to a bug report filed a few years ago
where I said "I can look at it next week" and then promptly forgot
about it :-/
https://bugzilla.redhat.com/1949432
I was reminded of it when a bunch of old bugs were migrated from
bugzilla.redhat.com to issues.redhat.com and Yalan Zhang added the
comment that the bug was still reproducible on libvirt 10.4.0.
https://issues.redhat.com/browse/RHEL-7036
This got it back onto my todo list (where it should have been the
entire time!) and I've finally gotten to it. Two similar-but-differen
failures had been reported (one when using a network of "direct"
(macvtap) devices, and one when using an openvswitch bridge, and it
turned out that two different (but related) fixes were needed - the
direct problem is fixed *mostly* in patch 1, with the other patches
fixing the ovs problem (and the remainder of the direct problem).
Laine Stump (4):
qemu: prevent unnecessarily failing live interface update
util: don't return early from virNetDevTapReattachBridge() if "force"
is true
qemu: replace open-coded remove/attach bridge with
virNetDevTapReattachBridge()
qemu: rework needBridgeChange/needReconnect decisions in
qemuDomainChangeNet()
src/conf/domain_conf.c | 2 +-
src/qemu/qemu_hotplug.c | 263 +++++++++++++++++++++++++---------------
src/util/virnetdevtap.c | 8 +-
src/util/virnetdevtap.h | 3 +-
4 files changed, 172 insertions(+), 104 deletions(-)
--
2.46.0
7 months
[PATCH 0/8] qemu: Remember memory backing paths for started domains
by Martin Kletzander
Every time we work with file-backed memory we construct the paths from the
driver config. Not only does is that slow, it is also wrong. If the
configuration changes while a domain with file-backed memory is running, once
the daemon is restarted and the domain is being stopped, we construct the wrong
path to clean up. And it also makes it more difficult to change that in the
future, for example the patch series which led me to write this patch series:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/I...
The patches are maybe split way too much, so feel free to suggest squashing some
together, I'm not opposed to that.
Martin Kletzander (8):
qemu: Move domain-related functions to qemu_domain
qemu_domain.h: Change indentation for new functions
qemu: Change parameters of qemuGetMemoryBackingDomainPath()
qemu_domain: Add memoryBackingDir to qemuDomainObjPrivate
qemu_domain: Add qemuDomainSetPrivateMemPath()
qemu_domain: Set memoryBackingDir in private data upon start
qemu: Use per-domain private memoryBackingDir for new memory backends
qemu_domain: Remove unused qemuGetMemoryBackingDomainPath()
src/qemu/qemu_command.c | 4 +-
src/qemu/qemu_conf.c | 58 ---------------
src/qemu/qemu_conf.h | 8 --
src/qemu/qemu_domain.c | 74 ++++++++++++++++++-
src/qemu/qemu_domain.h | 11 +++
src/qemu/qemu_hotplug.c | 4 +-
src/qemu/qemu_process.c | 12 +--
src/qemu/qemu_process.h | 3 +-
.../qemustatusxml2xmldata/backup-pull-in.xml | 1 +
.../blockjob-blockdev-in.xml | 1 +
.../blockjob-mirror-in.xml | 1 +
.../memory-backing-dir-in.xml | 61 +++++++++++++++
.../memory-backing-dir-out.xml | 1 +
.../migration-in-params-in.xml | 1 +
.../migration-out-nbd-bitmaps-in.xml | 1 +
.../migration-out-nbd-out.xml | 1 +
.../migration-out-nbd-tls-out.xml | 1 +
.../migration-out-params-in.xml | 1 +
tests/qemustatusxml2xmldata/modern-in.xml | 1 +
tests/qemustatusxml2xmldata/upgrade-out.xml | 1 +
.../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 +
tests/qemuxmlactivetest.c | 2 +
22 files changed, 167 insertions(+), 82 deletions(-)
create mode 100644 tests/qemustatusxml2xmldata/memory-backing-dir-in.xml
create mode 120000 tests/qemustatusxml2xmldata/memory-backing-dir-out.xml
--
2.46.0
7 months
[PATCH (pushed)] qemuBuildChardevCommand: Remove unused variable
by Peter Krempa
'charstr' is unused since 36d06a5637f, breaking the build on some
platforms. Remove it.
Fixes: 36d06a5637f
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
Build-breaker fix.
src/qemu/qemu_command.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c2d65645c4..c20d033aea 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1300,7 +1300,6 @@ qemuBuildChardevCommand(virCommand *cmd,
virQEMUCaps *qemuCaps)
{
qemuDomainChrSourcePrivate *chrSourcePriv = QEMU_DOMAIN_CHR_SOURCE_PRIVATE(dev);
- g_autofree char *charstr = NULL;
switch ((virDomainChrType) dev->type) {
case VIR_DOMAIN_CHR_TYPE_TCP:
--
2.46.0
7 months
[PATCH 0/2] qemu: Provide sane default for dump_guest_core
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (2):
qemu.conf.in: Fix dumpCore capitalization
qemu: Provide sane default for dump_guest_core
meson.build | 1 +
src/qemu/qemu.conf.in | 4 ++--
src/qemu/qemu_conf.c | 11 +++++++++++
tests/testutilsqemu.c | 2 ++
4 files changed, 16 insertions(+), 2 deletions(-)
--
2.44.2
7 months
[PULL 02/18] deprecation: don't enable TCG plugins by default with TCI
by Alex Bennée
The softmmu memory instrumentation test sees so many more accesses
than a normal translated host and its really not worth fixing up. Lets
deprecate this odd configuration and save on the CI cycles.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier(a)linaro.org>
Signed-off-by: Alex Bennée <alex.bennee(a)linaro.org>
Message-Id: <20240916085400.1046925-3-alex.bennee(a)linaro.org>
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 809b2b9b81..c0aa52def5 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -196,6 +196,14 @@ benefits from having plenty of host memory it seems reasonable to
encourage users to use 64 bit builds of QEMU for analysis work
whatever targets they are instrumenting.
+TCG Plugin support not enabled by default with TCI (since 9.2)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+While the TCG interpreter can interpret the TCG ops used by plugins it
+is going to be so much slower it wouldn't make sense for any serious
+instrumentation. Due to implementation differences there will also be
+anomalies in things like memory instrumentation.
+
System emulator CPUs
--------------------
diff --git a/configure b/configure
index cc8e1ed5b8..aa7aae70fa 100755
--- a/configure
+++ b/configure
@@ -629,6 +629,9 @@ meson_option_parse() {
exit 1
fi
}
+has_meson_option() {
+ test "${meson_options#*"$1"}" != "$meson_options"
+}
meson_add_machine_file() {
if test "$cross_compile" = "yes"; then
@@ -1048,8 +1051,12 @@ if test "$static" = "yes" ; then
plugins="no"
fi
if test "$plugins" != "no" && test $host_bits -eq 64; then
- plugins=yes
- subdirs="$subdirs contrib/plugins"
+ if has_meson_option "-Dtcg_interpreter=true"; then
+ plugins="no"
+ else
+ plugins=yes
+ subdirs="$subdirs contrib/plugins"
+ fi
fi
cat > $TMPC << EOF
--
2.39.5
7 months