Re: [PATCH v8 00/18] *** qemu: block: Support block disk along with throttle filters ***

2025-03-12 Thread Harikumar Rajkumar
Hi Team, Could we please get an ETA on when the review will be completed? We would greatly appreciate it if the review could be completed as soon as possible. Apologies for the urgency, but we have a dependency on these changes. Thank you for your understanding! Best regards, Harikumar R

Re: [PATCH v1] tests: update capabilities for QEMU 9.2.0 on s390x

2025-03-12 Thread Shalini Chellathurai Saroja
On 2025-03-11 14:03, Peter Krempa wrote: On Tue, Mar 11, 2025 at 13:49:10 +0100, Shalini Chellathurai Saroja wrote: Update the replies and xml files for QEMU 9.2.0 on s390x based on the released QEMU tag v9.2.0 with commit Id ae35f033b874c627d81d51070187fbf55f0bf1a7. Signed-off-by: Shalini Chel

Re: [PATCH v8 00/18] *** qemu: block: Support block disk along with throttle filters ***

2025-03-12 Thread Peter Krempa
On Wed, Mar 12, 2025 at 08:15:12 -, Harikumar Rajkumar wrote: > Hi Team, Could we please get an ETA on when the review will be completed? No, not really. In the patches I went through I updated the docs to mention 11.2.0. I hope I will not have to update it further. It depends on how the rest

Re: [PATCH v8 00/18] *** qemu: block: Support block disk along with throttle filters ***

2025-03-12 Thread Harikumar Rajkumar
Thank you for the update. I understand that the review process is complex, and the feature potentially requiring ongoing maintenance. I appreciate the effort and work that has been invested so far.

Re: [PATCH v8 08/18] qemu: Refactor qemuDomainSetBlockIoTune to extract common methods

2025-03-12 Thread Peter Krempa
On Wed, Feb 19, 2025 at 22:27:12 +0530, Harikumar Rajkumar wrote: > From: Chun Feng Wu > > extract common methods from "qemuDomainSetBlockIoTune" to be reused > by throttle handling later, common methods include: > * "qemuDomainValidateBlockIoTune", which is to validate that PARAMS > contains o

[PATCH 1/2] Remove libnl checks specific to Linux

2025-03-12 Thread Akihiko Odaki
Builds for Linux without libnl is broken since commit 582f0966f9b9e2148d8887d072364e2a91aed000 because src/util/virnetdevbridge.c refers to virNetlinkBridgeVlanFilterSet(). A fundamental problem here is that nobody tests such builds. Netlink is a critical part of Linux networking so developers may

[PATCH 16/17] qemu: migration: Always assume support for QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING

2025-03-12 Thread Peter Krempa
The 'transform' attribute of 'bitmaps' was added in qemu-6.0, thus we can assume all qemus we're willing to use support it. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qem

[PATCH 17/17] qemu: capabilites: Retire QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING

2025-03-12 Thread Peter Krempa
The capability is no logner used as all qemus support it. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml | 1 - tests/qemuc

[PATCH 04/17] qemu: monitor: Drop support for extra wrapper for 'object_add'

2025-03-12 Thread Peter Krempa
The QAPIfication of objects removed the extra warapper object which we were adding in the monitor code to simplify the other callers. Now that we support only qemus which don't require this we can drop the support code. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 27 +

[PATCH 12/17] qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY

2025-03-12 Thread Peter Krempa
All supported qemus have this and we already deleted alternate code. Retire the feature flag. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_10.0.0_

[PATCH 14/17] qemu: capabilites: Retire QEMU_CAPS_INCREMENTAL_BACKUP

2025-03-12 Thread Peter Krempa
All supported qemu versions now support this. Retire the capability. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 6 ++ src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml | 1

[PATCH 08/17] qemu: capabilities: Retire QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT

2025-03-12 Thread Peter Krempa
The capability is no longer used as all qemus already support the feature. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml |

Re: [PATCH 04/17] qemu: monitor: Drop support for extra wrapper for 'object_add'

2025-03-12 Thread Daniel P . Berrangé
On Wed, Mar 12, 2025 at 05:31:14PM +0100, Peter Krempa wrote: > The QAPIfication of objects removed the extra warapper object which we s/warapper/wrapper/ > were adding in the monitor code to simplify the other callers. > > Now that we support only qemus which don't require this we can drop the

[PATCH 03/17] qemuBuildObjectCommandlineFromJSON: Assume all qemus support QEMU_CAPS_OBJECT_JSON

2025-03-12 Thread Peter Krempa
'-object' was qapified (meaning it supports JSON props) in qemu-6.0, thus now that we require qemu-6.2 we can drop the compatibility code. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/qemu/qem

[PATCH 02/17] qemu: capabilities: Retire QEMU_CAPS_COMPAT_DEPRECATED

2025-03-12 Thread Peter Krempa
The capability always exists in qemu and is no longer checked. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 9 + src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml | 1 -

[PATCH v2 04/22] hypervisor: custom shutdown actions for transient vs persistent VMs

2025-03-12 Thread Daniel P . Berrangé
It may be desirable to treat transient VMs differently from persistent VMs. For example, while performing managed save on persistent VMs makes sense, the same not usually true of transient VMs, since by their nature they will have no config to restore from. This also lets us fix a long standing pr

[PATCH 09/17] qemu: Always assume supprot for QEMU_CAPS_BLOCKDEV_REOPEN

2025-03-12 Thread Peter Krempa
'blockdev-reopen' is supported since qemu-6.1, thus we can now remove the interlocks. Document the change to 'mirror' as this patch removes the last clue why we overwrite the mirror's readonly state to false unconditionally. Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 11 +-

[PATCH v2 05/22] qemu: support automatic VM managed save in system daemon

2025-03-12 Thread Daniel P . Berrangé
Currently automatic VM managed save is only performed in session daemons, on desktop session close, or host OS shutdown request. With this change it is possible to control shutdown behaviour for all daemons. A recommended setup might be: auto_shutdown_try_save = "persistent" auto_shutdown_try

[PATCH v2 00/22] integrate auto-shutdown of VMs with daemons

2025-03-12 Thread Daniel P . Berrangé
This series starts the work needed to obsolete the libvirt-guests.sh script which has grown a surprisingly large amount of functionality. Currently the virt daemons will acquire inhibitors to delay OS shutdown when VMs are running. The libvirt-guests.service unit can be used to call libvirt-guests

[PATCH v2 06/22] qemu: improve shutdown defaults for session daemon

2025-03-12 Thread Daniel P . Berrangé
Currently the session daemon will try a managed save on all VMs, leaving them running if that fails. This limits the managed save just to persistent VMs, as there will usually not be any way to restore transient VMs later. It also enables graceful shutdown and then forced poweroff, should save fa

[PATCH v2 12/22] hypervisor: wire up support for auto restore of running domains

2025-03-12 Thread Daniel P . Berrangé
When performing auto-shutdown of running domains, there is now the option to mark them as "autostart once", so that their state is restored on next boot. This applies on top of the traditional autostart flag. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src/hypervisor/domain

Re: [PATCH 0/5] qemu: Introduce nvme disk emulation support

2025-03-12 Thread honglei . wang
> On Thu, Feb 20, 2025 at 11:35:01AM -, honglei.wang(a)smartx.com wrote: > > The first approach can be rewritten to the second one and is only an > easier to write way. I would suggest we use the second one and we can > add a functionality which will rewrite the first one to the second one >

Re: [PATCH] domainbackupxml2xml: Add test case with unix socket server for pull mode backup

2025-03-12 Thread Ján Tomko
On a Wednesday in 2025, Peter Krempa wrote: While we show the example in the docs we don't have an example XML for exrecrcising the parser/formatter and schema. exercising Signed-off-by: Peter Krempa --- .../backup-pull-unix.xml | 22 ++ .../backup-pull-u

[PATCH 0/2] Remove libnl checks specific to Linux

2025-03-12 Thread Akihiko Odaki
--- base-commit: e5299ddf86121d3c792ca271ffcb54900eb19dc3 change-id: 20250312-linux-30e6e1af51a5 Best regards, -- Akihiko Odaki

[PATCH 2/2] virnetlink: Remove stub functions

2025-03-12 Thread Akihiko Odaki
virnetlink provides stub functions when libnl is not available, but this approach caused a few problems: - Commit 582f0966f9b9e2148d8887d072364e2a91aed000 broke builds without libnl for Linux because virNetlinkBridgeVlanFilterSet() lacked a stub. - A call to virNetlinkEventServiceStopAll() stub

[PATCH] domainbackupxml2xml: Add test case with unix socket server for pull mode backup

2025-03-12 Thread Peter Krempa
While we show the example in the docs we don't have an example XML for exrecrcising the parser/formatter and schema. Signed-off-by: Peter Krempa --- .../backup-pull-unix.xml | 22 ++ .../backup-pull-unix.xml | 23 +++ test

[PATCH v2 10/22] src: add new APIs for marking a domain to autostart once

2025-03-12 Thread Daniel P . Berrangé
When a domain is marked for autostart, it will be started on every subsequent host OS boot. There may be times when it is desirable to mark a domain to be autostarted, on the next boot only. Thus we add virDomainSetAutostartOnce / virDomainGetAutostartOnce. An alternative would have been to overl

[PATCH v2 07/22] qemu: configurable delay for shutdown before poweroff

2025-03-12 Thread Daniel P . Berrangé
Allow users to control how many seconds libvirt waits for QEMU shutdown before force powering off a guest. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf.in | 6 ++ src/qemu/qemu_conf.c

[PATCH v2 01/22] hypervisor: move support for auto-shutdown out of QEMU driver

2025-03-12 Thread Daniel P . Berrangé
This is a move of the code that currently exists in the QEMU driver, into the common layer that can be used by multiple drivers. The code currently supports performing managed save of all running guests, ignoring any failures. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src

[PATCH v2 08/22] hypervisor: support bypassing cache for managed save

2025-03-12 Thread Daniel P . Berrangé
Bypassing cache can make save performance more predictable and avoids trashing the OS cache with data that will not be read again. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src/hypervisor/domain_driver.c | 7 +-- src/hypervisor/domain_driver.h | 1 + 2 files changed, 6

[PATCH v2 16/22] rpc: rename virNetDaemonSetShutdownCallbacks

2025-03-12 Thread Daniel P . Berrangé
The next patch will be introducing a new callback, so rename the method to virNetDaemonSetLifecycleCallbacks to reflect the more general usage. Signed-off-by: Daniel P. Berrangé --- src/libvirt_remote.syms| 2 +- src/remote/remote_daemon.c | 6 +++--- src/rpc/virnetdaemon.c | 10 +-

[PATCH v2 14/22] qemu: add config to control if auto-shutdown VMs are restored

2025-03-12 Thread Daniel P . Berrangé
If shutting down running VMs at host shutdown, it can be useful to automatically start them again on next boot. This adds a config parameter 'auto_shutdown_restore', which defaults to enabled, which leverages the autostart once feature. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé

[PATCH v2 13/22] qemu: wire up support for once only autostart

2025-03-12 Thread Daniel P . Berrangé
Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_driver.c | 97 ++ 1 file changed, 97 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3932640b79..3b74a98685 100644 --- a/src/qemu/qemu_driver.c

Re: [PATCH v8 09/18] qemu: Implement qemu driver for throttle API

2025-03-12 Thread Peter Krempa
On Wed, Feb 19, 2025 at 22:27:13 +0530, Harikumar Rajkumar wrote: > From: Chun Feng Wu > > ThrottleGroup lifecycle implementation, note, in QOM, throttlegroup name is > prefixed with > "throttle-" to clearly separate throttle group objects into their own > namespace. > * "qemuDomainSetThrottleG

[PATCH v2 19/22] rpc: fix shutdown sequence when preserving state

2025-03-12 Thread Daniel P . Berrangé
The preserving of state (ie running VMs) requires a fully functional daemon and hypervisor driver. If any part has started shutting down then saving state may fail, or worse, hang. The current shutdown sequence does not guarantee safe ordering, as we synchronize with the state saving thread only a

[PATCH v2 22/22] hypervisor: emit systemd status & log messages while saving

2025-03-12 Thread Daniel P . Berrangé
Since processing running VMs on OS shutdown can take a while, it is beneficial to send systemd status messages about the progress. The systemd status is a point-in-time message, with no ability to look at the history of received messages. So in the systemd status we include the progress informatio

[PATCH v2 11/22] conf: implement support for autostart once feature

2025-03-12 Thread Daniel P . Berrangé
This is maintained in the same way as the autostart flag, using a symlink. The difference is that instead of '.xml', the symlink suffix is '.xml.once'. The link is also deleted immediately after it has been read. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 7 ++-

[PATCH v2 17/22] rpc: move state stop into virNetDaemon class

2025-03-12 Thread Daniel P . Berrangé
Currently the remote daemon code is responsible for calling virStateStop in a background thread. The virNetDaemon code wants to synchronize with this during shutdown, however, so the virThreadPtr must be passed over. Even the limited synchronization done currently, however, is flawed and to fix th

[PATCH v2 15/22] src: clarify semantics of the various virStateNNN methods

2025-03-12 Thread Daniel P . Berrangé
It is not documented what the various virStateNNN methods are each responsible for doing and the names give little guidance either. Provide some useful documentation comments to explain the intended usage of each. Signed-off-by: Daniel P. Berrangé --- src/libvirt.c | 44 +

[PATCH v2 21/22] rpc: don't let systemd shutdown daemon while saving VMs

2025-03-12 Thread Daniel P . Berrangé
The service unit "TimeoutStopSec" setting controls how long systemd waits for a service to stop before aggressively killing it, defaulting to 30 seconds if not set. When we're processing shutdown of VMs in response to OS shutdown, we very likely need more than 30 seconds to complete this job, and

[PATCH v2 18/22] rpc: don't unconditionally quit after preserving state

2025-03-12 Thread Daniel P . Berrangé
The call to preserve state (ie running VMs) is triggered in response to the desktop session dbus terminating (session daemon), or logind sending a "PrepareForShutdown" signal. In the case of the latter, daemons should only save their state, not actually exit yet. Other things on the system may stil

[PATCH v2 20/22] admin: add 'daemon-shutdown' command

2025-03-12 Thread Daniel P . Berrangé
The daemons are wired up to shutdown in responsible to UNIX process signals, as well as in response to login1 dbus signals, or loss of desktop session. The latter two options can optionally preserve state (ie running VMs). In non-systemd environments, as well as for testing, it would be useful to

[PATCH v2 02/22] remote: always invoke virStateStop for all daemons

2025-03-12 Thread Daniel P . Berrangé
Currently the virStateStop method is only wired up to run save for the unprivileged daemons, so there is no functional change. IOW, session exit, or host OS shutdown will trigger VM managed saved for QEMU session daemon, but not the system daemon. This changes the daemon code to always run virSta

[PATCH 00/17] qemu: Clean up various unneeded capabilities

2025-03-12 Thread Peter Krempa
The recent bump of minimum qemu version resulted into some capabilities always being present. I've noticed one while doing a review and from there I removed a few others, mostly storage related ones as well. Peter Krempa (17): qemuBuildCompatDeprecatedCommandLine: Assume that QEMU_CAPS_COMPA

[PATCH 01/17] qemuBuildCompatDeprecatedCommandLine: Assume that QEMU_CAPS_COMPAT_DEPRECATED is supported

2025-03-12 Thread Peter Krempa
Bumping minimum version of qemu to 6.2 means that the '-compat' option is now always supported. As we were unable to detect it in any other way we based this capability on QEMU_CAPS_OBJECT_JSON. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 12 ++-- 1 file changed, 2 inserti

[PATCH 05/17] util: Drop 'virQEMUBuildCommandLineJSONArrayBitmap'

2025-03-12 Thread Peter Krempa
It was used to convert JSON arrays in legacy -object commandline conversion. Since we now exclusively use JSON with -object, this infrastructure is no longer needed. Signed-off-by: Peter Krempa --- src/libvirt_private.syms| 1 - src/util/virqemu.c | 36 -

[PATCH 07/17] qemu: monitor: Always assume support for QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT

2025-03-12 Thread Peter Krempa
The flat mode of 'query-named-block-nodes' is supported since qemu-5.0. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 1 - src/qemu/qemu_monitor_json.c | 2 +- src/qemu/qemu_monitor_priv.h | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_monito

[PATCH 15/17] qemu: domain: Remove qemuDomainSupportsCheckpointsBlockjobs

2025-03-12 Thread Peter Krempa
The function now serves no real purpose. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c| 3 --- src/qemu/qemu_domain.c | 14 -- src/qemu/qemu_domain.h | 4 src/qemu/qemu_driver.c | 6 -- src/qemu/qemu_snapshot.c | 4 5 files changed, 31 deletions(-)

[PATCH 11/17] qemu: Always assume support for QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY

2025-03-12 Thread Peter Krempa
qemu supports the @allow-write-only-overlay feature since qemu-5.0. Remove the alternate code paths. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c| 1 - src/qemu/qemu_blockjob.c | 9 +++-- src/qemu/qemu_driver.c | 20 ++-- 3 files changed, 9 insertions(+), 21

[PATCH 13/17] qemu: Always assume support for QEMU_CAPS_INCREMENTAL_BACKUP

2025-03-12 Thread Peter Krempa
The support for incremental backup (not the backup api itself) was gated on support for migrating bitmaps. As the ability to migrate bitmaps was added in qemu-6.0 we can now assume that all supported qemu versions support incremental backup. Remove the interlocking. Signed-off-by: Peter Krempa -

Re: [PATCH v2 20/21] qemu: add RDP support

2025-03-12 Thread Marc-André Lureau
Hi On Fri, Mar 7, 2025 at 7:03 PM Martin Kletzander wrote: > > On Tue, Feb 18, 2025 at 02:16:25PM +0400, marcandre.lur...@redhat.com wrote: > >From: Marc-André Lureau > > > >Wire the external server RDP support with QEMU. > > > >Check the configuration, allocate a port, start the process > >and

Re: [PATCH v2 05/21] qemu: fall-through for unsupported graphics

2025-03-12 Thread Marc-André Lureau
Hi On Fri, Mar 7, 2025 at 3:58 PM Martin Kletzander wrote: > > On Tue, Feb 18, 2025 at 02:16:10PM +0400, marcandre.lur...@redhat.com wrote: > >From: Marc-André Lureau > > > >Without an error message, it can be tedious to figure out failure to > >start, just fall-through the generic range error.

[PATCH 10/17] qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_REOPEN

2025-03-12 Thread Peter Krempa
'blockdev-reopen' is supported since qemu-6.1. Since we now don't have any code using this capability we can retire it. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 6 ++ src/qemu/qemu_capabilities.h | 2 +- tests/qemu

Re: [PATCH v2 15/21] qemu/dbus: log daemon stdout/err, use domainLogContext

2025-03-12 Thread Marc-André Lureau
Hi On Fri, Mar 7, 2025 at 6:11 PM Martin Kletzander wrote: > > On Tue, Feb 18, 2025 at 02:16:20PM +0400, marcandre.lur...@redhat.com wrote: > >From: Marc-André Lureau > > > >Currently, if dbus-daemon writes on errfd, it will SIGPIPE. > > > >Signed-off-by: Marc-André Lureau > >--- > > src/qemu/q

[PATCH v2 03/22] hypervisor: expand available shutdown actions

2025-03-12 Thread Daniel P . Berrangé
The auto shutdown code can currently only perform managed save, which may fail in some cases, for example when PCI devices are assigned. On failure, shutdown inhibitors remain in place which may be undesirable. This expands the logic to try a sequence of operations * Managed save * Graceful shu

[PATCH 06/17] qemu: capabilities: Retire QEMU_CAPS_OBJECT_JSON

2025-03-12 Thread Peter Krempa
Now that we dropped support for old qemus which didn't support JSON props for -object we can retire the capability. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabil