[libvirt PATCH v2] util: fix success return for virProcessKillPainfullyDelay()

2023-09-25 Thread Jonathon Jongsma
virProcessKillPainfullyDelay() currently almost always returns 1 or -1, even though the documentation indicates that it should return 0 if the process was terminated gracefully. But the computation of the return code is faulty and the only case that it currently returns 0 is when it is called with

[libvirt PATCH 33/42] systemd: Drop Conflicts from virtproxyd sockets

2023-09-25 Thread Andrea Bolognani
The idea behind these is to prevent running both modular daemons and monolithic daemon at the same time. We will implement a more effective solution for that shortly. Signed-off-by: Andrea Bolognani --- src/remote/meson.build | 5 - 1 file changed, 5 deletions(-) diff --git a/src/remote/mes

[libvirt PATCH 29/42] systemd: Switch virtqemud to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/meson.build | 33 +--- src/qemu/virtqemud.service.in | 48 --- 2 files changed, 29 insertions(+), 52 deletions(-) delete mode 100644 src/qemu/virtqemud.service.in diff --git a/src/qemu/meso

[libvirt PATCH 17/42] systemd: Switch virtnodedevd to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/node_device/meson.build | 4 src/node_device/virtnodedevd.service.in | 25 - 2 files changed, 29 deletions(-) delete mode 100644 src/node_device/virtnodedevd.service.in diff --git a/src/node_device/meson.build b/s

[libvirt PATCH 11/42] systemd: Drop unnecessary uses of @sockprefix@

2023-09-25 Thread Andrea Bolognani
Now that providing the value is optional, we can remove almost all uses. Signed-off-by: Andrea Bolognani --- src/ch/meson.build | 1 - src/interface/meson.build | 1 - src/libxl/meson.build | 1 - src/locking/meson.build | 1 - src/logging/meson.build | 1 - src/lxc/meso

[libvirt PATCH 15/42] systemd: Introduce common templates

2023-09-25 Thread Andrea Bolognani
These contain the part that is common to all existing service and socket definitions. Each section of each template ends with a placeholder, which marks the spot where additional, service-specific lines should be injected. Signed-off-by: Andrea Bolognani --- src/meson.build | 10 +

[libvirt PATCH 16/42] systemd: Use common templates by default

2023-09-25 Thread Andrea Bolognani
All services are still listing their input files explicitly, so no changes to the output files will occur yet. Signed-off-by: Andrea Bolognani --- src/meson.build | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/meson.build b/src/meson.build index d7133d1293..b0

[libvirt PATCH 14/42] systemd: Provide all input files explicitly

2023-09-25 Thread Andrea Bolognani
We're about to change the defaults and start migrating to common templates: in order to be able to switch units over one at a time, make the input files that are currently used explicit rather than implicit. Signed-off-by: Andrea Bolognani --- src/ch/meson.build | 3 +++ src/interface/

[libvirt PATCH 36/42] systemd: Augment Requires/Wants with After

2023-09-25 Thread Andrea Bolognani
Requires/Wants only tells systemd that the corresponding unit should be started when the current one is, but that could very well happen in parallel. For virtlogd/virtlockd, we want the socket to be already active when the hypervisor driver is started. Signed-off-by: Andrea Bolognani --- src/lib

[libvirt PATCH 42/42] systemd: Move Documentation lines

2023-09-25 Thread Andrea Bolognani
Like the Description, these are intended to be displayed to the user, so it makes sense to have them towards the top of the file before all the information that systemd will parse to calculate dependencies. Signed-off-by: Andrea Bolognani --- src/locking/virtlockd.service.in | 4 ++-- src/loggin

[libvirt PATCH 40/42] systemd: Drop BindTo/After between sockets

2023-09-25 Thread Andrea Bolognani
They are unnecessary, since all sockets for a service are now enabled as soon as one of them is and each service has a very strong dependency on all of its sockets. Signed-off-by: Andrea Bolognani --- src/locking/virtlockd-admin.socket.in | 2 -- src/logging/virtlogd-admin.socket.in | 2 -- src

[libvirt PATCH 41/42] systemd: Improve and unify unit descriptions

2023-09-25 Thread Andrea Bolognani
Hypervisors are referred to by their user-facing name rather than the name of their libvirt driver, the monolithic daemon is explicitly referred to as legacy, and a consistent format is used throughout. Signed-off-by: Andrea Bolognani --- src/ch/meson.build| 2 +- src/interfa

[libvirt PATCH 39/42] systemd: Add Also between sockets

2023-09-25 Thread Andrea Bolognani
This results in all sockets for a service being enabled when a single one of them is. The -tcp and -tls sockets are intentionally excluded, because enabling them should require explicit action on the administrator's part; moreover, disabling them should not result in the local sockets being disabl

[libvirt PATCH 24/42] systemd: Switch virtvboxd to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/vbox/meson.build | 7 +++ src/vbox/virtvboxd.service.in | 26 -- 2 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 src/vbox/virtvboxd.service.in diff --git a/src/vbox/meson.build b/src/vbox/meson.bu

[libvirt PATCH 31/42] systemd: Drop @deps@

2023-09-25 Thread Andrea Bolognani
It's no longer used anywhere. @socket_unit_extra@ would be its equivalent when using common templates. Signed-off-by: Andrea Bolognani --- src/meson.build | 2 -- src/remote/libvirtd-admin.socket.in | 1 - src/remote/libvirtd-ro.socket.in| 1 - src/remote/libvirtd-tcp.soc

[libvirt PATCH 30/42] systemd: Drop libvirtd_socket*_in values

2023-09-25 Thread Andrea Bolognani
Now that the migration to common templates has been completed, we no longer need these. Signed-off-by: Andrea Bolognani --- src/meson.build | 4 1 file changed, 4 deletions(-) diff --git a/src/meson.build b/src/meson.build index b00895fd07..4e837c1e6d 100644 --- a/src/meson.build +++ b/src

[libvirt PATCH 20/42] systemd: Switch virtsecretd to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/secret/meson.build| 4 src/secret/virtsecretd.service.in | 25 - 2 files changed, 29 deletions(-) delete mode 100644 src/secret/virtsecretd.service.in diff --git a/src/secret/meson.build b/src/secret/meson.build i

[libvirt PATCH 38/42] systemd: Drop Before=foo.service from sockets

2023-09-25 Thread Andrea Bolognani
systemd will automatically infer this dependency based on the socket's Service=foo.service setting. Signed-off-by: Andrea Bolognani --- src/remote/libvirtd-admin.socket.in | 1 - src/remote/libvirtd-ro.socket.in| 1 - src/remote/libvirtd-tcp.socket.in | 1 - src/remote/libvirtd-tls.socket.

[libvirt PATCH 27/42] systemd: Switch virtxend to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/libxl/meson.build | 21 - src/libxl/virtxend.service.in | 32 2 files changed, 16 insertions(+), 37 deletions(-) delete mode 100644 src/libxl/virtxend.service.in diff --git a/src/libxl/meson.bui

[libvirt PATCH 26/42] systemd: Switch virtchd to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/ch/meson.build| 27 src/ch/virtchd.service.in | 44 --- 2 files changed, 23 insertions(+), 48 deletions(-) delete mode 100644 src/ch/virtchd.service.in diff --git a/src/ch/meson.build b/

[libvirt PATCH 34/42] systemd: Make modular daemons conflict with libvirtd

2023-09-25 Thread Andrea Bolognani
We want to make sure that, at any given time, we have either the modular daemons or the monolithic one running, never both. In order to achieve that, make every single modular unit conflict with the corresponding libvirtd unit. We set both Conflicts=libvirtd.unit and After=libvirtd.unit: this tell

[libvirt PATCH 12/42] systemd: Make @service_in@ optional

2023-09-25 Thread Andrea Bolognani
It is currently considered required, but we're soon going to provide a default that will be suitable for most services. Since all services currently provide a value explicitly, we can implement a default without breaking anything. Signed-off-by: Andrea Bolognani --- src/meson.build | 6 --

[libvirt PATCH 08/42] systemd: Only set @sockmode@ once

2023-09-25 Thread Andrea Bolognani
The decision is based only on whether Polkit support is enabled, so there's no need to go through it again for every single service. Signed-off-by: Andrea Bolognani --- src/meson.build | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/meson.build b/src/meson.bu

[libvirt PATCH 37/42] systemd: Drop Before=libvirtd from virtlogd/virtlockd

2023-09-25 Thread Andrea Bolognani
We have already declared the mirror relationship, so this one is now redundant. Moreover, this version was incomplete: it only ever worked for the monolithic daemon, but the modular daemons for QEMU and Xen also want the sockets to be active. Signed-off-by: Andrea Bolognani --- src/locking/virt

[libvirt PATCH 25/42] systemd: Switch virtvzd to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/vz/meson.build| 7 +++ src/vz/virtvzd.service.in | 26 -- 2 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 src/vz/virtvzd.service.in diff --git a/src/vz/meson.build b/src/vz/meson.build index 9c2eb9

[libvirt PATCH 35/42] systemd: Replace Requires with BindTo+After for sockets

2023-09-25 Thread Andrea Bolognani
This is the strongest relationship that can be declared between two units, and causes the service to be terminated immediately if any of its sockets disappear. This is the behavior we want. Signed-off-by: Andrea Bolognani --- src/locking/virtlockd.service.in | 6 -- src/logging/virtlogd.serv

[libvirt PATCH 32/42] systemd: Drop parametrization from libvirtd sockets

2023-09-25 Thread Andrea Bolognani
Up until now the files have been used as template for most services, but now that those have been converted to common templates we can drop parametrization and make it clear that these files are for libvirtd only. Signed-off-by: Andrea Bolognani --- src/remote/libvirtd-admin.socket.in | 10 +

[libvirt PATCH 28/42] systemd: Switch virtlxcd to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/lxc/meson.build | 27 +++ src/lxc/virtlxcd.service.in | 44 - 2 files changed, 23 insertions(+), 48 deletions(-) delete mode 100644 src/lxc/virtlxcd.service.in diff --git a/src/lxc/meson.buil

[libvirt PATCH 23/42] systemd: Switch virtproxyd to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/remote/meson.build | 10 +++--- src/remote/virtproxyd.service.in | 25 - 2 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 src/remote/virtproxyd.service.in diff --git a/src/remote/meson.build b/src/

[libvirt PATCH 04/42] systemd: Set Type=notify for virtlogd/virtlockd

2023-09-25 Thread Andrea Bolognani
This tells systemd that the services in question support the native socket activation protocol. virtlogd and virtlockd, just like all the other daemons, implement the necessary handshake. Signed-off-by: Andrea Bolognani --- src/locking/virtlockd.service.in | 1 + src/logging/virtlogd.service.in

[libvirt PATCH 00/42] systemd: Improve units for services and sockets

2023-09-25 Thread Andrea Bolognani
A grab bag of changes, ranging from very much functional ones to purely aesthetical ones. Patches 01-05 fix a few inconsistencies that the units for virtlogd/virtlockd had compared to the ones for all other services. Patches 06-16 prepare the stage for the mass conversion of unit files to set of

[libvirt PATCH 19/42] systemd: Switch virtnwfilterd to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/nwfilter/meson.build | 4 src/nwfilter/virtnwfilterd.service.in | 25 - 2 files changed, 29 deletions(-) delete mode 100644 src/nwfilter/virtnwfilterd.service.in diff --git a/src/nwfilter/meson.build b/src/nwfilt

[libvirt PATCH 21/42] systemd: Switch virtnetworkd to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/network/meson.build | 7 +++ src/network/virtnetworkd.service.in | 26 -- 2 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 src/network/virtnetworkd.service.in diff --git a/src/network/meson.buil

[libvirt PATCH 05/42] systemd: Set @name@ for virtlogd/virtlockd

2023-09-25 Thread Andrea Bolognani
The information is not used anywhere right now, but the documentation for virt_daemon_units claims it's mandatory. More importantly, we're going to start actually using it later on. Signed-off-by: Andrea Bolognani --- src/locking/meson.build | 2 +- src/logging/meson.build | 2 +- 2 files chang

[libvirt PATCH 22/42] systemd: Switch virtstoraged to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/storage/meson.build | 8 src/storage/virtstoraged.service.in | 27 --- 2 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 src/storage/virtstoraged.service.in diff --git a/src/storage/meson.bu

[libvirt PATCH 13/42] systemd: Introduce temporary libvirtd_socket*_in values

2023-09-25 Thread Andrea Bolognani
These will be useful during the upcoming migration to common templates for systemd units and will be dropped as soon as all services have been converted. Signed-off-by: Andrea Bolognani --- src/meson.build | 4 1 file changed, 4 insertions(+) diff --git a/src/meson.build b/src/meson.build

[libvirt PATCH 18/42] systemd: Switch virtinterfaced to common templates

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/interface/meson.build | 4 src/interface/virtinterfaced.service.in | 25 - 2 files changed, 29 deletions(-) delete mode 100644 src/interface/virtinterfaced.service.in diff --git a/src/interface/meson.build b/src

[libvirt PATCH 10/42] systemd: Make @sockprefix@ optional

2023-09-25 Thread Andrea Bolognani
For most services, the socket paths can be derived trivially from the name of the daemon: for virtqemud, for example, they will be /run/libvirt/virtqemud-sock /run/libvirt/virtqemud-sock-ro /run/libvirt/virtqemud-admin-sock libvirtd and virtproxyd are the exceptions, since their socket path

[libvirt PATCH 09/42] systemd: Drop unnecessary uses of @sockets@

2023-09-25 Thread Andrea Bolognani
For most services, the value provided explicitly matches the documented default. Signed-off-by: Andrea Bolognani --- src/ch/meson.build | 1 - src/interface/meson.build | 1 - src/libxl/meson.build | 1 - src/lxc/meson.build | 1 - src/network/meson.build | 1 - src/

[libvirt PATCH 03/42] systemd: Add missing Service for virtlogd/virtlockd

2023-09-25 Thread Andrea Bolognani
While systemd will automatically match foo.socket with foo.service based on their names, it's nicer to connect the two explicitly. This is what we do for all services, with virtlogd and virtlockd being the only exceptions. Signed-off-by: Andrea Bolognani --- src/locking/virtlockd.socket.in | 1

[libvirt PATCH 07/42] systemd: Rename @mode@ -> @sockmode@

2023-09-25 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/meson.build | 6 +++--- src/remote/libvirtd.socket.in | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/meson.build b/src/meson.build index 7b6ce6d32f..3fae80d67c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -

[libvirt PATCH 01/42] systemd: Add missing Also for admin socket

2023-09-25 Thread Andrea Bolognani
When libvirtd, virtlog and virtlockd are enabled, we want their admin sockets to be enabled as well. Signed-off-by: Andrea Bolognani --- src/locking/virtlockd.service.in | 1 + src/logging/virtlogd.service.in | 1 + src/remote/libvirtd.service.in | 1 + 3 files changed, 3 insertions(+) diff

[libvirt PATCH 06/42] systemd: Rename socket_in_def -> socket_in_default

2023-09-25 Thread Andrea Bolognani
The meaning of the _def suffix might not be immediately obvious, especially since it's also used to refer to the output of the meson-gen-def.py script elsewhere in the same file. Signed-off-by: Andrea Bolognani --- src/meson.build | 8 1 file changed, 4 insertions(+), 4 deletions(-) di

[libvirt PATCH 02/42] systemd: Add missing WantedBy for virtlogd/virtlockd

2023-09-25 Thread Andrea Bolognani
This annotation being missing resulted in virtlogd and virtlockd being marked as "indirect" services, i.e. services that cannot be started directly but have to be socket activated instead. While this is our preferred configuration, we shouldn't prevent the admin to start them at boot if they want

Re: [PATCH 04/31] docs: mark CRIS support as deprecated

2023-09-25 Thread Edgar E. Iglesias
On Mon, Sep 25, 2023 at 7:00 PM Alex Bennée wrote: > > Daniel P. Berrangé writes: > > > On Mon, Sep 25, 2023 at 03:48:27PM +0100, Alex Bennée wrote: > >> This might be premature but while streamling the avocado tests I > >> realised the only tests we have are "check-tcg" ones. The aging > >> fed

Re: [PATCH 08/31] configure: ensure dependency for cross-compile setup

2023-09-25 Thread Peter Maydell
On Mon, 25 Sept 2023 at 17:45, Alex Bennée wrote: > > > Paolo Bonzini writes: > > > On 9/25/23 16:48, Alex Bennée wrote: > >> If we update configure we should make sure we regenerate all the > >> compiler details. We should also ensure those details are upto date > >> before building the TCG test

Re: [PATCH 08/31] configure: ensure dependency for cross-compile setup

2023-09-25 Thread Paolo Bonzini
Il lun 25 set 2023, 18:45 Alex Bennée ha scritto: > Paolo Bonzini writes: > > On 9/25/23 16:48, Alex Bennée wrote: > >> echo "HOST_GDB_SUPPORTS_ARCH=y" >> "$config_target_mak" > >> fi > >> + echo "$config_target_mak: configure" >> Makefile.prereqs > > > > This in pract

Re: [PATCH 04/31] docs: mark CRIS support as deprecated

2023-09-25 Thread Alex Bennée
Daniel P. Berrangé writes: > On Mon, Sep 25, 2023 at 03:48:27PM +0100, Alex Bennée wrote: >> This might be premature but while streamling the avocado tests I >> realised the only tests we have are "check-tcg" ones. The aging >> fedora-criss-cross image works well enough for developers but can't

Re: [PATCH 08/31] configure: ensure dependency for cross-compile setup

2023-09-25 Thread Alex Bennée
Paolo Bonzini writes: > On 9/25/23 16:48, Alex Bennée wrote: >> If we update configure we should make sure we regenerate all the >> compiler details. We should also ensure those details are upto date >> before building the TCG tests. >> Signed-off-by: Alex Bennée >> --- >> configure | 2 ++ >

Re: [PATCH 04/31] docs: mark CRIS support as deprecated

2023-09-25 Thread Daniel P . Berrangé
On Mon, Sep 25, 2023 at 03:48:27PM +0100, Alex Bennée wrote: > This might be premature but while streamling the avocado tests I > realised the only tests we have are "check-tcg" ones. The aging > fedora-criss-cross image works well enough for developers but can't be > used in CI as we need supporte

Re: [PATCH 04/31] docs: mark CRIS support as deprecated

2023-09-25 Thread Daniel P . Berrangé
On Mon, Sep 25, 2023 at 03:48:27PM +0100, Alex Bennée wrote: > This might be premature but while streamling the avocado tests I > realised the only tests we have are "check-tcg" ones. The aging > fedora-criss-cross image works well enough for developers but can't be > used in CI as we need supporte

Re: [PATCH 08/31] configure: ensure dependency for cross-compile setup

2023-09-25 Thread Paolo Bonzini
On 9/25/23 16:48, Alex Bennée wrote: If we update configure we should make sure we regenerate all the compiler details. We should also ensure those details are upto date before building the TCG tests. Signed-off-by: Alex Bennée --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --gi

Re: [PATCH 05/31] tests/docker: make docker engine choice entirely configure driven

2023-09-25 Thread Paolo Bonzini
On 9/25/23 16:48, Alex Bennée wrote: Since 0b1a649047 (tests/docker: use direct RUNC call to build containers) we ended up with the potential for the remaining docker.py script calls to deviate from the direct RUNC calls. Fix this by dropping the use of ENGINE in the makefile and rely entirely on

Re: [PATCH 02/31] tests/lcitool: add swtpm to the package list

2023-09-25 Thread Daniel P . Berrangé
On Mon, Sep 25, 2023 at 03:48:25PM +0100, Alex Bennée wrote: > We need this to test some TPM stuff. > > Signed-off-by: Alex Bennée > --- > .gitlab-ci.d/cirrus/macos-12.vars| 2 +- > tests/docker/dockerfiles/alpine.docker | 1 + > tests/docker/dockerfiles/centos8

Re: [RFC PATCH libvirt v1 2/3] Improve `virsh start --console` behavior

2023-09-25 Thread Daniel P . Berrangé
On Mon, Sep 25, 2023 at 03:39:09PM +0200, Marc Hartmayer wrote: > When starting a guest via libvirt (`virsh start --console`), early > console output was missed because the guest was started first and then > the console was attached. This patch changes this to the following > sequence: > > 1. crea

[PATCH 04/31] docs: mark CRIS support as deprecated

2023-09-25 Thread Alex Bennée
This might be premature but while streamling the avocado tests I realised the only tests we have are "check-tcg" ones. The aging fedora-criss-cross image works well enough for developers but can't be used in CI as we need supported build platforms to build QEMU. Does this mean the writing is on th

[PATCH 23/31] plugins: Set final instruction count in plugin_gen_tb_end

2023-09-25 Thread Alex Bennée
From: Matt Borgerson Translation logic may partially decode an instruction, then abort and remove the instruction from the TB. This can happen for example when an instruction spans two pages. In this case, plugins may get an incorrect result when calling qemu_plugin_tb_n_insns to query for the nu

[PATCH 17/31] target/arm: Remove references to gdb_has_xml

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki Acked-by: Alex Bennée Message-Id: <20230912224107.29669-10-akihiko.od...@daynix.com> Signed-off-by: Alex Bennée ---

[PATCH 18/31] target/ppc: Remove references to gdb_has_xml

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-11-akihiko.od...@daynix.com> Signed-off-by: Alex Bennée --- target/ppc/gdbstub.c |

[PATCH 26/31] contrib/plugins: fix coverity warning in hotblocks

2023-09-25 Thread Alex Bennée
Coverity complains that we have an unbalance use of mutex leading to potential deadlocks. Fixes: CID 1519048 Signed-off-by: Alex Bennée --- contrib/plugins/hotblocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c in

[RFC PATCH 31/31] contrib/plugins: add iops plugin example for cost modelling

2023-09-25 Thread Alex Bennée
This plugin uses the new time control interface to make decisions about the state of time during the emulation. The algorithm is currently very simple. The user specifies an iops rate which applies per core. If the core runs ahead of its allocated execution time the plugin sleeps for a bit to let r

[PATCH 11/31] plugins: Check if vCPU is realized

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki The created member of CPUState tells if the vCPU thread is started, and will be always false for the user space emulation that manages threads independently. Use the realized member of DeviceState, which is valid for both of the system and user space emulation. Fixes: 54cb65d

[RFC PATCH 29/31] sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time

2023-09-25 Thread Alex Bennée
Move the key functionality of moving time forward into the clock sub-system itself. This will allow us to plumb in time control into plugins. Signed-off-by: Alex Bennée Message-Id: <20230519170454.2353945-7-alex.ben...@linaro.org> --- v2 - rename arg to target_ns --- include/qemu/timer.h | 15

[PATCH 21/31] accel/tcg: Add plugin_enabled to DisasContextBase

2023-09-25 Thread Alex Bennée
From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230824181233.1568795-2-richard.hender...@linaro.org> Signed-off-by: Alex Bennée --- include/exec/translator.h | 2 ++ accel/tcg/translator.c| 1 + 2 files changed, 3 insertions(+) diff --git a/include/exec/translator.

[PATCH 16/31] gdbstub: Use g_markup_printf_escaped()

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki g_markup_printf_escaped() is a safer alternative to simple printf() as it automatically escapes values. Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-9-akihiko.od...@daynix.com> Signed-off-by: Alex Bennée --- gdbstub/gdbstub.c | 36 +---

[RFC PATCH 30/31] plugins: add time control API

2023-09-25 Thread Alex Bennée
Expose the ability to control time through the plugin API. Only one plugin can control time so it has to request control when loaded. There are probably more corner cases to catch here. Signed-off-by: Alex Bennée Message-Id: <20230519170454.2353945-8-alex.ben...@linaro.org> --- v2 - ifdef for

[PATCH 25/31] contrib/plugins: fix coverity warning in lockstep

2023-09-25 Thread Alex Bennée
Coverity complains that e don't check for a truncation when copying in the path. Bail if we can't copy the whole path into sockaddr. Fixes: CID 1519045 Fixes: CID 1519046 Signed-off-by: Alex Bennée --- contrib/plugins/lockstep.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-

[PATCH 22/31] target/sh4: Disable decode_gusa when plugins enabled

2023-09-25 Thread Alex Bennée
From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230824181233.1568795-3-richard.hender...@linaro.org> Signed-off-by: Alex Bennée --- target/sh4/translate.c | 41 + 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/tar

[PATCH 14/31] target/arm: Move the reference to arm-core.xml

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki Some subclasses overwrite gdb_core_xml_file member but others don't. Always initialize the member in the subclasses for consistency. This especially helps for AArch64; in a following change, the file specified by gdb_core_xml_file is always looked up even if it's going to be

[PATCH 05/31] tests/docker: make docker engine choice entirely configure driven

2023-09-25 Thread Alex Bennée
Since 0b1a649047 (tests/docker: use direct RUNC call to build containers) we ended up with the potential for the remaining docker.py script calls to deviate from the direct RUNC calls. Fix this by dropping the use of ENGINE in the makefile and rely entirely on what we detect at configure time. Sig

[RFC PATCH 27/31] sysemu: add set_virtual_time to accel ops

2023-09-25 Thread Alex Bennée
We are about to remove direct calls to individual accelerators for this information and will need a central point for plugins to hook into time changes. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230519170454.2353945-5-alex.ben...@linaro.org> --- v2 - more k

[PATCH 10/31] gdbstub: Fix target.xml response

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki It was failing to return target.xml after the first request. Fixes: 56e534bd11 ("gdbstub: refactor get_feature_xml") Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-3-akihiko.od...@daynix.com> Signed-off-by: Alex Bennée --- gdbstub/gdbstub.c | 2 +- 1 file c

[PATCH 15/31] hw/core/cpu: Return static value with gdb_arch_name()

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki All implementations of gdb_arch_name() returns dynamic duplicates of static strings. It's also unlikely that there will be an implementation of gdb_arch_name() that returns a truly dynamic value due to the nature of the function returning a well-known identifiers. Qualify the

[PATCH 09/31] gdbstub: Fix target_xml initialization

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki target_xml is no longer a fixed-length array but a pointer to a variable-length memory. Fixes: 56e534bd11 ("gdbstub: refactor get_feature_xml") Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230912224107.29669-2-akihiko.od...@daynix.com> Sig

[PATCH 13/31] gdbstub: Introduce GDBFeature structure

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki Before this change, the information from a XML file was stored in an array that is not descriptive. Introduce a dedicated structure type to make it easier to understand and to extend with more fields. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Reviewed

[PATCH 01/31] tests/avocado: update firmware to enable sbsa-ref/neoverse-v1

2023-09-25 Thread Alex Bennée
From: Marcin Juszkiewicz Update prebuilt firmware images to have TF-A with Neoverse V1 support enabled. This allowed us to enable test for this cpu in sbsa-ref machine. Signed-off-by: Marcin Juszkiewicz Acked-by: Leif Lindholm Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson

[PATCH 07/31] configure: remove gcc version suffixes

2023-09-25 Thread Alex Bennée
The modern packaging of cross GCC's doesn't need the explicit version number at the end. Signed-off-by: Alex Bennée --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index ebad155d9e..e83872571d 100755 --- a/configure +++ b/configure @@ -

[PATCH 08/31] configure: ensure dependency for cross-compile setup

2023-09-25 Thread Alex Bennée
If we update configure we should make sure we regenerate all the compiler details. We should also ensure those details are upto date before building the TCG tests. Signed-off-by: Alex Bennée --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index e83872571

[PATCH 12/31] contrib/plugins: Use GRWLock in execlog

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki execlog had the following comment: > As we could have multiple threads trying to do this we need to > serialise the expansion under a lock. Threads accessing already > created entries can continue without issue even if the ptr array > gets reallocated during resize. However,

[RFC PATCH 28/31] qtest: use cpu interface in qtest_clock_warp

2023-09-25 Thread Alex Bennée
This generalises the qtest_clock_warp code to use the AccelOps handlers for updating its own sense of time. This will make the next patch which moves the warp code closer to pure code motion. Signed-off-by: Alex Bennée Acked-by: Thomas Huth Message-Id: <20230519170454.2353945-6-alex.ben...@linar

[PATCH 20/31] gdbstub: Replace gdb_regs with an array

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki An array is a more appropriate data structure than a list for gdb_regs since it is initialized only with append operation and read-only after initialization. Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-13-akihiko.od...@daynix.com> [AJB: fixed a checkpatch

[PATCH 24/31] contrib/plugins: fix coverity warning in cache

2023-09-25 Thread Alex Bennée
Coverity complains that appends_stats_line can be fed a 0 leading to the undefined behaviour of a divide by 0. Fixes: CID 1519044 Fixes: CID 1519047 Signed-off-by: Alex Bennée --- contrib/plugins/cache.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/cont

[PATCH 19/31] gdbstub: Remove gdb_has_xml variable

2023-09-25 Thread Alex Bennée
From: Akihiko Odaki GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki Message-Id: <20230912224107.29669-12-akihiko.od...@daynix.com> Signed-off-by: Alex Bennée --- gdbstub/internals.h

[PATCH 03/31] gitlab: shuffle some targets and reduce avocado noise

2023-09-25 Thread Alex Bennée
We move a couple of targets out of the avocado runs because there are no tests to run. Tricore already has some coverage. The cris target only really has check-tcg tests but its getting harder to find anything that packages the compiler. To reduce the noise of CANCEL messages we also set AVOCADO_

[PATCH 06/31] configure: allow user to override docker engine

2023-09-25 Thread Alex Bennée
If you have both engines installed but one is broken you are stuck with the automagic. Allow the user to override the engine for this case. Signed-off-by: Alex Bennée --- configure | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 707132a3ae.

[PATCH 02/31] tests/lcitool: add swtpm to the package list

2023-09-25 Thread Alex Bennée
We need this to test some TPM stuff. Signed-off-by: Alex Bennée --- .gitlab-ci.d/cirrus/macos-12.vars| 2 +- tests/docker/dockerfiles/alpine.docker | 1 + tests/docker/dockerfiles/centos8.docker | 1 + tests/docker/dockerfiles/debian-amd64-cross.doc

[PATCH 00/31] September maintainer omnibus (tests, gdbstub, plugins)

2023-09-25 Thread Alex Bennée
Hi, This wraps up my current testing, gdbstub and plugin trees in an attempt to do my part to reduce the qemu-devel fire hose. For testing we have a number of cleanups to configure to better handle selecting the container engine (removing the ability to dynamically switch). I had to do this as on

[RFC PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-09-25 Thread Marc Hartmayer
Currently, early console output may be lost, e.g. if starting a guest with `virsh start --console` guest, which can make debugging of early failures very difficult (like zipl messages or disabled wait conditions happening early). This is because QEMU may emit serial console output before the libvir

[RFC PATCH libvirt v1 2/3] Improve `virsh start --console` behavior

2023-09-25 Thread Marc Hartmayer
When starting a guest via libvirt (`virsh start --console`), early console output was missed because the guest was started first and then the console was attached. This patch changes this to the following sequence: 1. create a paused guest 2. attach the console 3. resume the guest Reviewed-by: Bo

[RFC PATCH libvirt v1 3/3] Improve `virsh create --console` behavior

2023-09-25 Thread Marc Hartmayer
When starting a guest via libvirt (`virsh create --console`), early console output was missed because the guest was started first and then the console was attached. This patch changes this to the following sequence: 1. create a paused transient guest 2. attach the console 3. resume the guest Revi

[RFC PATCH libvirt v1 1/3] virsh: add `console --resume` support

2023-09-25 Thread Marc Hartmayer
This patch adds the command line flag `--resume` to the `virsh console` command. This resumes a paused guest after connecting to the console. This might be handy since it's a "common" pattern to start a guest paused, connect to the console, and then resume it so as not to miss any console messages.

Re: [PATCH v3] interface: fix udev_device_get_sysattr_value return value check

2023-09-25 Thread Martin Kletzander
On Tue, Sep 12, 2023 at 03:56:47PM +0300, Dmitry Frolov wrote: Reviewing the code I found that return value of function udev_device_get_sysattr_value() is dereferenced without a check. udev_device_get_sysattr_value() may return NULL by number of reasons. v2: VIR_DEBUG added, replaced STREQ(NULLS

Re: [libvirt PATCH 2/2] util: fix success return for virProcessKillPainfullyDelay()

2023-09-25 Thread Ján Tomko
On a Friday in 2023, Jonathon Jongsma wrote: virProcessKillPainfullyDelay() currently almost always returns 1 or -1, even though the documentation indicates that it should return 0 if the process was terminated gracefully. The only case that it currently returns 0 is when it is called with the pi

Re: [libvirt PATCH 1/2] util: Fix error return for virProcessKillPainfullyDelay()

2023-09-25 Thread Ján Tomko
On a Friday in 2023, Jonathon Jongsma wrote: Commit 93af79fb removed a cleanup label in favor of returning error values directly in certain cases. But the final return value was changed from -1 to 0. If we get to the end of the function, that means that we've waited for the process to exit but it

Re: [libvirt PATCH 0/3] qemu: validate more filesystem elements (virtiofs saga)

2023-09-25 Thread Andrea Bolognani
On Wed, Sep 20, 2023 at 05:24:59PM +0200, Ján Tomko wrote: > Ján Tomko (3): > qemu: fix indentation in qemuValidateDomainDeviceDefFS > qemu: extend filesystem XML validation > docs: formatdomain: clarify support of some filesystem options > > docs/formatdomain.rst| 5 - > src/qemu/q

Re: [PATCH] libxl: Fix connection to modular network daemon

2023-09-25 Thread Daniel P . Berrangé
On Fri, Sep 22, 2023 at 02:20:10PM -0600, Jim Fehlig wrote: > In a modular daemon configuration, virtxend does not support the > virNetwork* APIs. It should open a connection to virtnetworkd when > using those APIs, but currently always opens a connection to > "xen:///system". Switch to using virGe