[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
3 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
3 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
3 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
3 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
3 months
[PULL 01/18] deprecation: don't enable TCG plugins by default on 32 bit hosts
by Alex Bennée
The existing plugins already liberally use host pointer stuffing for
passing user data which will fail when doing 64 bit guests on 32 bit
hosts. We should discourage this by officially deprecating support and
adding another nail to the 32 bit host coffin.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier(a)linaro.org>
Signed-off-by: Alex Bennée <alex.bennee(a)linaro.org>
Message-Id: <20240916085400.1046925-2-alex.bennee(a)linaro.org>
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index ed31d4b0b2..809b2b9b81 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -184,6 +184,17 @@ be an effective use of its limited resources, and thus intends to discontinue
it. Since all recent x86 hardware from the past >10 years is capable of the
64-bit x86 extensions, a corresponding 64-bit OS should be used instead.
+TCG Plugin support not enabled by default on 32-bit hosts (since 9.2)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+While it is still possible to enable TCG plugin support for 32-bit
+hosts there are a number of potential pitfalls when instrumenting
+64-bit guests. The plugin APIs typically pass most addresses as
+uint64_t but practices like encoding that address in a host pointer
+for passing as user-data will lose data. As most software analysis
+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.
System emulator CPUs
--------------------
diff --git a/configure b/configure
index f3e7572afb..cc8e1ed5b8 100755
--- a/configure
+++ b/configure
@@ -516,6 +516,25 @@ case "$cpu" in
;;
esac
+# Now we have our CPU_CFLAGS we can check if we are targeting a 32 or
+# 64 bit host.
+
+check_64bit_host() {
+cat > $TMPC <<EOF
+#if __SIZEOF_POINTER__ != 8
+#error not 64 bit system
+#endif
+int main(void) { return 0; }
+EOF
+ compile_object "$1"
+}
+
+if check_64bit_host "$CPU_CFLAGS"; then
+ host_bits=64
+else
+ host_bits=32
+fi
+
if test -n "$host_arch" && {
! test -d "$source_path/linux-user/include/host/$host_arch" ||
! test -d "$source_path/common-user/host/$host_arch"; }; then
@@ -1028,7 +1047,7 @@ if test "$static" = "yes" ; then
fi
plugins="no"
fi
-if test "$plugins" != "no"; then
+if test "$plugins" != "no" && test $host_bits -eq 64; then
plugins=yes
subdirs="$subdirs contrib/plugins"
fi
--
2.39.5
3 months
Plans for 10.8.0 release (freeze on Wednesday 25 Sep)
by Jiri Denemark
We are getting close to 10.8.0 release of libvirt. To aim for the
release on Tuesday 01 Oct I suggest entering the freeze on Wednesday
25 Sep and tagging RC2 on Friday 27 Sep.
I hope this works for everyone.
Jirka
3 months
[PATCH 0/2] qemu: Reject unsupported chardev '<protocol' settings
by Peter Krempa
See 2/2
Peter Krempa (2):
conf: Convert 'protocol' field of TCP char device backend to proper
type
qemu: Reject unsupported chardev backend protocols
src/conf/domain_conf.c | 11 +++------
src/conf/domain_conf.h | 2 +-
src/qemu/qemu_validate.c | 19 +++++++++++++++
src/vmx/vmx.c | 7 +++---
...rial-tcp-chardev-telnets.x86_64-latest.err | 1 +
.../serial-tcp-chardev-telnets.xml | 23 +++++++++++++++++++
tests/qemuxmlconftest.c | 1 +
7 files changed, 51 insertions(+), 13 deletions(-)
create mode 100644 tests/qemuxmlconfdata/serial-tcp-chardev-telnets.x86_64-latest.err
create mode 100644 tests/qemuxmlconfdata/serial-tcp-chardev-telnets.xml
--
2.46.0
3 months
[PATCH 0/8] qemu: Unify generators for commandline and monitor chardev backends
by Peter Krempa
Apart from having just one place to fix when changing chardev backends
this also adds validation against the schema so we can spot deprecations
early.
Peter Krempa (8):
qemu: capabilities: Explain that QEMU_CAPS_CHARDEV_JSON will be used
in tests only
qemuxmlconftest: Add 'chardev-backends' test case
qemu: Introduce unified chardev backend config generator
qemuxmlconftest: Add support for validating schema for 'chardev-add'
qemuxmlconftest: Add test case for QMP schema validation of -chardev
backends
qemu: Move check for chardev backends which can't be hotplugged out of
the monitor
qemu: Use the new chardev backend JSON props generator also in the
monitor
qemu: monitor: Remove the old chardev backend generator
src/qemu/meson.build | 1 +
src/qemu/qemu_block.c | 9 +-
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_chardev.c | 488 ++++++++++++++++++
src/qemu/qemu_chardev.h | 22 +
src/qemu/qemu_command.c | 202 +-------
src/qemu/qemu_hotplug.c | 51 +-
src/qemu/qemu_monitor.c | 8 +-
src/qemu/qemu_monitor.h | 4 +-
src/qemu/qemu_monitor_json.c | 273 +---------
src/qemu/qemu_monitor_json.h | 4 +-
tests/qemumonitorjsontest.c | 23 +-
.../chardev-backends-json.x86_64-latest.args | 79 +++
.../chardev-backends-json.x86_64-latest.xml | 1 +
.../qemuxmlconfdata/chardev-backends-json.xml | 1 +
.../chardev-backends.x86_64-latest.args | 79 +++
.../chardev-backends.x86_64-latest.xml | 149 ++++++
tests/qemuxmlconfdata/chardev-backends.xml | 111 ++++
tests/qemuxmlconftest.c | 7 +
19 files changed, 1026 insertions(+), 488 deletions(-)
create mode 100644 src/qemu/qemu_chardev.c
create mode 100644 src/qemu/qemu_chardev.h
create mode 100644 tests/qemuxmlconfdata/chardev-backends-json.x86_64-latest.args
create mode 120000 tests/qemuxmlconfdata/chardev-backends-json.x86_64-latest.xml
create mode 120000 tests/qemuxmlconfdata/chardev-backends-json.xml
create mode 100644 tests/qemuxmlconfdata/chardev-backends.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/chardev-backends.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/chardev-backends.xml
--
2.46.0
3 months
[PATCH] rpm: Add riscv64 to arches_qemu_kvm
by Andrea Bolognani
The riscv64 architecture is not yet fully integrated into
Fedora, but KVM support is already implemented across the stack
and the Fedora package for QEMU is already set up to generate
the qemu-kvm binary package when targeting it.
Thanks: David Abdurachmanov <davidlt(a)rivosinc.com>
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 4dec7ace6f..c332fb4ff1 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -6,7 +6,7 @@
%define min_rhel 8
%define min_fedora 37
-%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
+%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x riscv64
%if 0%{?rhel}
%if 0%{?rhel} > 8
%define arches_qemu_kvm x86_64 aarch64 s390x
--
2.46.0
3 months