[PATCH 0/2] network: avoid logging unnecessary and misleading errors when failing to unset a zone
by Laine Stump
While testing a recent patch that unsets the zone of bridge interfaces
when a virtual network is stopped, a side effect was noticed: when
firewalld reloaded its rules, this would result in an error log from
libvirt complaining about attempting to unset the zone of an interface
that wasn't in any zone. The two patches here fix that from different
angles:
* The first modifies the call to unsetZone so that it puts any error
message returned from firewalld to libvirt into a virError object
rather than logging it; this virError object is then silently
discarded.
* The second avoids even calling firewalld to unset the zone if it's
just going to immediately be set again. This avoids an error message
that would be logged directly by firewalld even if libvirt didn't
log the message it received from firewalld.
The combination of these two patches eliminate all misleading log
messages about failed attempts to unset a zone.
Laine Stump (2):
network: ignore/don't log errors when unsetting firewalld zone
network: don't unset the firewalld zone if it's going to be
immediately re-set
src/network/bridge_driver.c | 8 +++----
src/network/bridge_driver_linux.c | 10 +++++----
src/network/bridge_driver_nop.c | 4 +++-
src/network/bridge_driver_platform.h | 3 ++-
src/util/virfirewalld.c | 33 ++++++++++++++++++----------
src/util/virfirewalld.h | 2 +-
6 files changed, 38 insertions(+), 22 deletions(-)
--
2.47.0
2 weeks, 2 days
[PATCH v2 00/20] maintainer updates (testing, gdbstub, plugins)
by Alex Bennée
This is an aggregation of three of my maintainer trees which you can
also get from their respective branches (testing/next, gdbstub/next
and plugins/next). I didn't include the plugins on the last post as I
hadn't had a chance to do my sweep through patches before travelling.
I've also updated MAINTAINERS to point at my next trees.
For testing we have mostly tweaks and cleanups. I've included some
tracepoints tweaks for cpu_loop_exit_atomic purely as there was no
where else to but it. There are also some cleanups to the tsan support
from Pierrick. The mipsel tweaks have already been applied directly to
the tree.
For gdbstub more cleanups as well as fixing some gdbstub breakage of
the untested aarch64-be linux-user target. I've added a very basic
some test to prevent silly regressions in the future.
For plugins again more cleanups. The GDB trigger patch will probably
not get merged and should be considered an experimental hack for now.
The following still need review:
plugins: add ability to register a GDB triggered callback
tests/tcg: enable basic testing for aarch64_be-linux-user
config/targets: update aarch64_be-linux-user gdb XML list
MAINTAINERS: mention my gdbstub/next tree
gitlab: make check-[dco|patch] a little more verbose
scripts/ci: remove architecture checks for build-environment updates
MAINTAINERS: mention my testing/next tree
tests/docker: add NOFETCH env variable for testing
MAINTAINERS: mention my plugins/next tree
Alex Bennée (10):
tests/docker: add NOFETCH env variable for testing
MAINTAINERS: mention my testing/next tree
scripts/ci: remove architecture checks for build-environment updates
accel/tcg: add tracepoints for cpu_loop_exit_atomic
gitlab: make check-[dco|patch] a little more verbose
MAINTAINERS: mention my gdbstub/next tree
config/targets: update aarch64_be-linux-user gdb XML list
tests/tcg: enable basic testing for aarch64_be-linux-user
MAINTAINERS: mention my plugins/next tree
plugins: add ability to register a GDB triggered callback
Gustavo Romero (2):
tests/tcg/aarch64: Use raw strings for regexes in test-mte.py
testing: Enhance gdb probe script
Ilya Leoshkevich (2):
tests/docker: Fix microblaze atomics
tests/tcg/x86_64: Add cross-modifying code test
Pierrick Bouvier (6):
meson: hide tsan related warnings
docs/devel: update tsan build documentation
dockerfiles: fix default targets for debian-loongarch-cross
meson: build contrib/plugins with meson
contrib/plugins: remove Makefile for contrib/plugins
plugins: fix qemu_plugin_reset
MAINTAINERS | 3 +
docs/devel/testing/main.rst | 26 +++++-
configure | 23 ++---
Makefile | 10 ---
configs/targets/aarch64_be-linux-user.mak | 2 +-
meson.build | 14 ++-
include/qemu/plugin-event.h | 1 +
include/qemu/qemu-plugin.h | 16 ++++
plugins/plugin.h | 9 ++
accel/tcg/plugin-gen.c | 4 +
accel/tcg/user-exec.c | 2 +-
plugins/api.c | 18 ++++
plugins/core.c | 37 ++++++++
tests/tcg/aarch64_be/hello.c | 35 ++++++++
tests/tcg/plugins/mem.c | 11 ++-
tests/tcg/x86_64/cross-modifying-code.c | 80 +++++++++++++++++
accel/tcg/ldst_atomicity.c.inc | 9 ++
.gitlab-ci.d/check-dco.py | 9 +-
.gitlab-ci.d/check-patch.py | 9 +-
accel/tcg/trace-events | 12 +++
contrib/plugins/Makefile | 87 -------------------
contrib/plugins/meson.build | 23 +++++
plugins/qemu-plugins.symbols | 1 +
scripts/ci/setup/ubuntu/build-environment.yml | 2 -
scripts/probe-gdb-support.py | 75 ++++++++--------
tests/docker/Makefile.include | 5 +-
.../dockerfiles/debian-loongarch-cross.docker | 4 +-
.../build-toolchain.sh | 8 ++
.../dockerfiles/debian-toolchain.docker | 7 ++
tests/tcg/Makefile.target | 7 +-
tests/tcg/aarch64/gdbstub/test-mte.py | 4 +-
tests/tcg/aarch64_be/Makefile.target | 17 ++++
tests/tcg/x86_64/Makefile.target | 4 +
33 files changed, 397 insertions(+), 177 deletions(-)
create mode 100644 tests/tcg/aarch64_be/hello.c
create mode 100644 tests/tcg/x86_64/cross-modifying-code.c
delete mode 100644 contrib/plugins/Makefile
create mode 100644 contrib/plugins/meson.build
create mode 100644 tests/tcg/aarch64_be/Makefile.target
--
2.39.5
2 weeks, 3 days
[PATCH v2 0/4] multiple memory backend support for CPR Live Updates
by mgalaxy@akamai.com
From: Michael Galaxy <mgalaxy(a)akamai.com>
CPR-based support for whole-hypervisor kexec-based live updates is
now finally merged into QEMU. In support of this, we need NUMA to be
supported in these kinds of environments. To do this we use a technology
called PMEM (persistent memory) in Linux, which underpins the ability for
CPR Live Updates to work so that QEMU memory can remain in RAM and
be recovered after a kexec operationg has completed. Our systems are highly
NUMA-aware, and so this patch series enables NUMA awareness for live updates.
Further, we make a small change that allows live migrations to work
between *non* PMEM-based systems and PMEM-based systems (and
vice-versa). This allows for seemless upgrades from non-live-compatible
systems to live-update-compatible sytems without any downtime.
Michael Galaxy (4):
qemu.conf changes to support multiple memory backend
Support live migration between file-backed memory and anonymous
memory.
Update unit test to support multiple memory backends
Update documentation to reflect memory_backing_dir change in qemu.conf
NEWS.rst | 7 ++
docs/kbase/virtiofs.rst | 2 +
src/qemu/qemu.conf.in | 2 +
src/qemu/qemu_command.c | 8 ++-
src/qemu/qemu_conf.c | 141 +++++++++++++++++++++++++++++++++++-----
src/qemu/qemu_conf.h | 14 ++--
src/qemu/qemu_domain.c | 24 +++++--
src/qemu/qemu_driver.c | 29 +++++----
src/qemu/qemu_hotplug.c | 6 +-
src/qemu/qemu_process.c | 44 +++++++------
src/qemu/qemu_process.h | 7 +-
tests/testutilsqemu.c | 5 +-
12 files changed, 221 insertions(+), 68 deletions(-)
--
2.34.1
2 weeks, 3 days
[PATCH v3 00/18] maintainer updates (testing, gdbstub, plugins) pre-PR
by Alex Bennée
This is an aggregation of three of my maintainer trees which you can
also get from their respective branches (testing/next, gdbstub/next
and plugins/next). It is now ready for a pull request.
Since last post:
- added r-b tags
- some minor typo fixes
- dropped meson plugin contrib build and gdb hook changes
The last thing that still needs review:
gitlab: make check-[dco|patch] a little more verbose
Alex Bennée (9):
tests/docker: add NOFETCH env variable for testing
MAINTAINERS: mention my testing/next tree
scripts/ci: remove architecture checks for build-environment updates
accel/tcg: add tracepoints for cpu_loop_exit_atomic
gitlab: make check-[dco|patch] a little more verbose
MAINTAINERS: mention my gdbstub/next tree
config/targets: update aarch64_be-linux-user gdb XML list
tests/tcg: enable basic testing for aarch64_be-linux-user
MAINTAINERS: mention my plugins/next tree
Gustavo Romero (2):
tests/tcg/aarch64: Use raw strings for regexes in test-mte.py
testing: Enhance gdb probe script
Ilya Leoshkevich (2):
tests/docker: Fix microblaze atomics
tests/tcg/x86_64: Add cross-modifying code test
Pierrick Bouvier (5):
meson: hide tsan related warnings
docs/devel: update tsan build documentation
dockerfiles: fix default targets for debian-loongarch-cross
contrib/plugins: remove Makefile for contrib/plugins
plugins: fix qemu_plugin_reset
MAINTAINERS | 3 +
docs/devel/testing/main.rst | 26 +++++-
configure | 23 ++---
Makefile | 10 ---
configs/targets/aarch64_be-linux-user.mak | 2 +-
meson.build | 10 ++-
accel/tcg/plugin-gen.c | 4 +
accel/tcg/user-exec.c | 2 +-
tests/tcg/aarch64_be/hello.c | 35 ++++++++
tests/tcg/x86_64/cross-modifying-code.c | 80 +++++++++++++++++
accel/tcg/ldst_atomicity.c.inc | 9 ++
.gitlab-ci.d/check-dco.py | 5 +-
.gitlab-ci.d/check-patch.py | 5 +-
accel/tcg/trace-events | 12 +++
contrib/plugins/Makefile | 87 -------------------
scripts/ci/setup/ubuntu/build-environment.yml | 2 -
scripts/probe-gdb-support.py | 75 ++++++++--------
tests/docker/Makefile.include | 5 +-
.../dockerfiles/debian-loongarch-cross.docker | 4 +-
.../build-toolchain.sh | 8 ++
.../dockerfiles/debian-toolchain.docker | 7 ++
tests/tcg/Makefile.target | 7 +-
tests/tcg/aarch64/gdbstub/test-mte.py | 4 +-
tests/tcg/aarch64_be/Makefile.target | 17 ++++
tests/tcg/x86_64/Makefile.target | 4 +
25 files changed, 273 insertions(+), 173 deletions(-)
create mode 100644 tests/tcg/aarch64_be/hello.c
create mode 100644 tests/tcg/x86_64/cross-modifying-code.c
delete mode 100644 contrib/plugins/Makefile
create mode 100644 tests/tcg/aarch64_be/Makefile.target
--
2.39.5
2 weeks, 3 days
[PATCH 0/9] qemu: Change CPU comparison algorithm for future models
by Jiri Denemark
When starting a domain we check whether the guest CPU definition is
compatible with the host (i.e., when the host supports all features
required both explicitly and by the specified CPU model) as long as
check == 'partial', which is the default.
We are doing so by checking our definition of the CPU model in the CPU
map amending it with explicitly mentioned features and comparing it to
features QEMU would enabled when started with -cpu host. But since our
CPU model definitions often slightly differ from QEMU we may be checking
features which are not actually needed and on the other hand not
checking something that is part of the CPU model in QEMU.
This patch changes the algorithm for CPU models added in the future
(changing it for existing models could cause them to suddenly become
incompatible with the host and domains using them would fail to start).
The new algorithm uses information we probe from QEMU about features
that block each model from being directly usable. If all those features
are explicitly disabled in the CPU definition we consider the base model
compatible with the host. Then we only need to check that all explicitly
required features are supported by QEMU on the host to get the result
for the whole CPU definition.
After this we only use the model definitions (for newly added models)
from CPU map for creating a CPU definition for host-model.
Jiri Denemark (9):
cpu_x86: Introduce <check> element for CPU models
cpu_map: Use compat partial check for all x86 CPU models
cpu: Introduce virCPUGetCheckMode
qemu: Use g_autoptr in qemuConnectCompareHypervisorCPU
qemu: Use virCPUCompare in qemuConnectCompareHypervisorCPU directly
qemu: Separate partial CPU check into a function
cpu: Introduce virCPUCompareUnusable
qemu_capabilities: Introduce virQEMUCapsGetCPUBlockers
qemu: Change CPU comparison algorithm for future models
src/cpu/cpu.c | 104 ++++++++++++++++++
src/cpu/cpu.h | 17 +++
src/cpu/cpu_x86.c | 67 +++++++++++
src/cpu_map/x86_486.xml | 1 +
src/cpu_map/x86_Broadwell-IBRS.xml | 1 +
src/cpu_map/x86_Broadwell-noTSX-IBRS.xml | 1 +
src/cpu_map/x86_Broadwell-noTSX.xml | 1 +
src/cpu_map/x86_Broadwell.xml | 1 +
src/cpu_map/x86_Cascadelake-Server-noTSX.xml | 1 +
src/cpu_map/x86_Cascadelake-Server.xml | 1 +
src/cpu_map/x86_Conroe.xml | 1 +
src/cpu_map/x86_Cooperlake.xml | 1 +
src/cpu_map/x86_Dhyana.xml | 1 +
src/cpu_map/x86_EPYC-Genoa.xml | 1 +
src/cpu_map/x86_EPYC-IBPB.xml | 1 +
src/cpu_map/x86_EPYC-Milan.xml | 1 +
src/cpu_map/x86_EPYC-Rome.xml | 1 +
src/cpu_map/x86_EPYC.xml | 1 +
src/cpu_map/x86_GraniteRapids.xml | 1 +
src/cpu_map/x86_Haswell-IBRS.xml | 1 +
src/cpu_map/x86_Haswell-noTSX-IBRS.xml | 1 +
src/cpu_map/x86_Haswell-noTSX.xml | 1 +
src/cpu_map/x86_Haswell.xml | 1 +
src/cpu_map/x86_Icelake-Client-noTSX.xml | 1 +
src/cpu_map/x86_Icelake-Client.xml | 1 +
src/cpu_map/x86_Icelake-Server-noTSX.xml | 1 +
src/cpu_map/x86_Icelake-Server.xml | 1 +
src/cpu_map/x86_IvyBridge-IBRS.xml | 1 +
src/cpu_map/x86_IvyBridge.xml | 1 +
src/cpu_map/x86_Nehalem-IBRS.xml | 1 +
src/cpu_map/x86_Nehalem.xml | 1 +
src/cpu_map/x86_Opteron_G1.xml | 1 +
src/cpu_map/x86_Opteron_G2.xml | 1 +
src/cpu_map/x86_Opteron_G3.xml | 1 +
src/cpu_map/x86_Opteron_G4.xml | 1 +
src/cpu_map/x86_Opteron_G5.xml | 1 +
src/cpu_map/x86_Penryn.xml | 1 +
src/cpu_map/x86_SandyBridge-IBRS.xml | 1 +
src/cpu_map/x86_SandyBridge.xml | 1 +
src/cpu_map/x86_SapphireRapids.xml | 1 +
src/cpu_map/x86_SierraForest.xml | 1 +
src/cpu_map/x86_Skylake-Client-IBRS.xml | 1 +
src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml | 1 +
src/cpu_map/x86_Skylake-Client.xml | 1 +
src/cpu_map/x86_Skylake-Server-IBRS.xml | 1 +
src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml | 1 +
src/cpu_map/x86_Skylake-Server.xml | 1 +
src/cpu_map/x86_Snowridge.xml | 1 +
src/cpu_map/x86_Westmere-IBRS.xml | 1 +
src/cpu_map/x86_Westmere.xml | 1 +
src/cpu_map/x86_athlon.xml | 1 +
src/cpu_map/x86_core2duo.xml | 1 +
src/cpu_map/x86_coreduo.xml | 1 +
src/cpu_map/x86_cpu64-rhel5.xml | 1 +
src/cpu_map/x86_cpu64-rhel6.xml | 1 +
src/cpu_map/x86_kvm32.xml | 1 +
src/cpu_map/x86_kvm64.xml | 1 +
src/cpu_map/x86_n270.xml | 1 +
src/cpu_map/x86_pentium.xml | 1 +
src/cpu_map/x86_pentium2.xml | 1 +
src/cpu_map/x86_pentium3.xml | 1 +
src/cpu_map/x86_pentiumpro.xml | 1 +
src/cpu_map/x86_phenom.xml | 1 +
src/cpu_map/x86_qemu32.xml | 1 +
src/cpu_map/x86_qemu64.xml | 1 +
src/libvirt_private.syms | 2 +
src/qemu/qemu_capabilities.c | 38 +++++++
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_domain.c | 65 +++++++++++
src/qemu/qemu_domain.h | 7 ++
src/qemu/qemu_driver.c | 45 ++++----
src/qemu/qemu_process.c | 7 +-
72 files changed, 390 insertions(+), 28 deletions(-)
--
2.47.0
2 weeks, 3 days
[PATCH] ci: Move definition of exit codes allowed to fail for cirrus jobs
by Peter Krempa
Update with latest lcitool.
Update the build templates to move the definition of exit codes which
are allowed to fail for cirrus jobs for cases when we run out of CI
minutes. The previous location was overridden with the per-job
'allow_failure' value and thus didn't apply.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
Based on:
https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/510
example run:
https://gitlab.com/libvirt/libvirt/-/pipelines/1508364775
ci/gitlab/build-templates.yml | 2 --
ci/gitlab/builds.yml | 9 ++++++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/ci/gitlab/build-templates.yml b/ci/gitlab/build-templates.yml
index 31a901e47c..b1e41b0783 100644
--- a/ci/gitlab/build-templates.yml
+++ b/ci/gitlab/build-templates.yml
@@ -282,8 +282,6 @@
image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:latest
interruptible: true
needs: []
- allow_failure:
- exit_codes: 3
script:
- set -o allexport
- source ci/cirrus/$NAME.vars
diff --git a/ci/gitlab/builds.yml b/ci/gitlab/builds.yml
index 771fa67501..c24421378c 100644
--- a/ci/gitlab/builds.yml
+++ b/ci/gitlab/builds.yml
@@ -599,7 +599,8 @@ mingw64-fedora-rawhide:
x86_64-freebsd-13:
extends: .cirrus_build_job
needs: []
- allow_failure: false
+ allow_failure:
+ exit_codes: 3
variables:
CIRRUS_VM_IMAGE_NAME: freebsd-13-3
CIRRUS_VM_IMAGE_SELECTOR: image_family
@@ -613,7 +614,8 @@ x86_64-freebsd-13:
x86_64-freebsd-14:
extends: .cirrus_build_job
needs: []
- allow_failure: false
+ allow_failure:
+ exit_codes: 3
variables:
CIRRUS_VM_IMAGE_NAME: freebsd-14-0
CIRRUS_VM_IMAGE_SELECTOR: image_family
@@ -627,7 +629,8 @@ x86_64-freebsd-14:
aarch64-macos-14:
extends: .cirrus_build_job
needs: []
- allow_failure: false
+ allow_failure:
+ exit_codes: 3
variables:
CIRRUS_VM_IMAGE_NAME: ghcr.io/cirruslabs/macos-runner:sonoma
CIRRUS_VM_IMAGE_SELECTOR: image
--
2.47.0
2 weeks, 4 days
[PATCH v2 0/6] ch: handle events from cloud-hypervisor
by Purna Pavan Chandra Aekkaladevi
changes from v1->v2:
* Rebase on latest master
* Use /* */ for comments
* Remove fifo file if already exists
* Address other comments from Praveen Paladugu
cloud-hypervisor raises various events, including VM lifecylce operations
such as boot, shutdown, pause, resume, etc. Libvirt will now read these
events and take the necessary actions, such as correctly updating the
domain state. A FIFO file is passed to `--event-monitor` option of
cloud-hypervisor. Libvirt creates a new thread that acts as the reader
of the fifo file and continuously monitors for new events. Currently,
shutdown events are handled by updating the domain state appropriately.
Purna Pavan Chandra Aekkaladevi (6):
utils: Implement virFileIsNamedPipe
ch: pass --event-monitor option to cloud-hypervisor
ch: start a new thread for handling ch events
ch: events: Read and parse cloud-hypervisor events
ch: events: facilitate lifecycle events handling
NEWS: Mention event handling support in ch driver
NEWS.rst | 7 +
po/POTFILES | 1 +
src/ch/ch_events.c | 349 +++++++++++++++++++++++++++++++++++++++
src/ch/ch_events.h | 54 ++++++
src/ch/ch_monitor.c | 52 +++++-
src/ch/ch_monitor.h | 11 ++
src/ch/meson.build | 2 +
src/libvirt_private.syms | 1 +
src/util/virfile.c | 8 +
src/util/virfile.h | 1 +
10 files changed, 479 insertions(+), 7 deletions(-)
create mode 100644 src/ch/ch_events.c
create mode 100644 src/ch/ch_events.h
--
2.34.1
2 weeks, 4 days
[PATCH 00/10] PCI passthrough support for ch guests
by Praveen K Paladugu
This patch series introduces PCI passthrough support for ch guests. While
enabling this feature I refactored a bunch of methods from qemu to hypervisor
to reduce duplication of logic between the drivers.
Praveen K Paladugu (7):
hypervisor: move HostdevNeedsVFIO to hypervisor
hypervisor: move HostdevHostSupportsPassthroughVFIO
qemu: replace qemuHostdevPreparePCIDevices
ch: prepare domain definition for pci passthrough
ch: allow hostdev in domain definitions
ch: reattach PCI devices to host while stopping guest
ch: explicitly set INFILESIZE to 0
Wei Liu (3):
ch: add host device manager to driver
ch: add scaffolding for host devices management
ch: prepare host for PCI passthrough
po/POTFILES | 1 +
src/ch/ch_conf.h | 4 ++
src/ch/ch_domain.c | 2 +-
src/ch/ch_driver.c | 4 ++
src/ch/ch_hostdev.c | 115 +++++++++++++++++++++++++++++++++++
src/ch/ch_hostdev.h | 32 ++++++++++
src/ch/ch_monitor.c | 1 +
src/ch/ch_process.c | 74 +++++++++++++++++++++-
src/ch/meson.build | 2 +
src/hypervisor/virhostdev.c | 23 +++++++
src/hypervisor/virhostdev.h | 5 ++
src/libvirt_private.syms | 2 +
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_cgroup.c | 5 +-
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_hostdev.c | 40 +-----------
src/qemu/qemu_hostdev.h | 10 ---
src/qemu/qemu_hotplug.c | 5 +-
src/qemu/qemu_namespace.c | 2 +-
tests/domaincapstest.c | 2 +-
21 files changed, 276 insertions(+), 59 deletions(-)
create mode 100644 src/ch/ch_hostdev.c
create mode 100644 src/ch/ch_hostdev.h
--
2.44.0
2 weeks, 4 days
[PATCH v2 0/3] util/xml: make xml parser error reporting less terrible
by Daniel P. Berrangé
libxml2 has terrible error reporting when failing to open files, which
has led to significant wasted time on wild goose chases. This improves
it by taking libxml2 out of the business of opening & reading files.
Daniel P. Berrangé (3):
util/xml: fix extraction of XML context
util/xml: don't assume libxml2 has the filename of the document
util/xml: open XML files before calling libxml2
src/util/virxml.c | 29 +++++++++++++------
.../broken-xml-invalid.x86_64-latest.err | 4 +--
.../nonexistent-file.x86_64-latest.err | 2 +-
3 files changed, 23 insertions(+), 12 deletions(-)
--
2.46.0
2 weeks, 4 days