[PATCH v2 0/8] Refactor autostart for VM daemons

2025-02-12 Thread Daniel P . Berrangé
These patches are a spin off from my bigger auto-shutdown series: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/EIBL5W75N6HEFQFPEGIK6D5NJ56EUPC4/#6WK5NL2WPO3JDICNZGWZVNZDFFQTQZBW Since they're self contained, they can be merged sooner while I'm still working on Peter'

Re: [PATCH 01/19] build-sys: drop -Winline

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:23PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The warning is triggered when compiling with various build options, such > as -Doptimization=g. > > From gcc(1) man page about -Winline: > seemingly insignificant changes in the source prog

Re: [PATCH v2 2/8] bhyve: stop opening & passing connection to bhyveProcessStart

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 05:43:50PM +0100, Peter Krempa wrote: > On Wed, Feb 12, 2025 at 15:46:40 +, Daniel P. Berrangé wrote: > > A connection object is not required because autostarted domains are > > never marked for autodestroy. > > > > The comment about needing a connection for the network

Re: [PATCH v2 1/8] bhyve: add 'driver' to bhyveProcessStart method

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 05:41:41PM +0100, Peter Krempa wrote: > On Wed, Feb 12, 2025 at 15:46:39 +, Daniel P. Berrangé wrote: > > This allows for passinga NULL connection object in cases where > > domain autodestroy is not required. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > src/

Re: [PATCH v2 6/8] src: convert drivers over to use new autostart helper

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 15:46:44 +, Daniel P. Berrangé wrote: > This eliminates some duplicated code patterns aross drivers. > > Signed-off-by: Daniel P. Berrangé > --- > src/bhyve/bhyve_driver.c | 41 -- > src/libxl/libxl_driver.c | 36 ---

Re: [PATCH v2 6/8] src: convert drivers over to use new autostart helper

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 03:46:44PM +, Daniel P. Berrangé wrote: > This eliminates some duplicated code patterns aross drivers. > > Signed-off-by: Daniel P. Berrangé > --- > src/bhyve/bhyve_driver.c | 41 -- > src/libxl/libxl_driver.c | 36 -

Re: [PATCH v2 4/8] remote: notify systemd when reloading config

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 15:46:42 +, Daniel P. Berrangé wrote: > Switch to the 'notify-reload' service type and send notifications to > systemd when reloading configuration. > > Signed-off-by: Daniel P. Berrangé > --- > src/remote/libvirtd.service.in | 2 +- > src/remote/remote_daemon.c |

Re: [PATCH v2 3/8] util: add APIs for more systemd notifications

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 15:46:41 +, Daniel P. Berrangé wrote: > We have a way to notify systemd when we're done starting the daemon. > > Systemd supports many more notifications, however, and many of them > are quite relevant to our needs: > > https://www.freedesktop.org/software/systemd/ma

Re: [PATCH v2 2/8] bhyve: stop opening & passing connection to bhyveProcessStart

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 17:43:50 +0100, Peter Krempa wrote: > On Wed, Feb 12, 2025 at 15:46:40 +, Daniel P. Berrangé wrote: > > A connection object is not required because autostarted domains are > > never marked for autodestroy. > > > > The comment about needing a connection for the network d

Re: [PATCH v2 2/8] bhyve: stop opening & passing connection to bhyveProcessStart

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 15:46:40 +, Daniel P. Berrangé wrote: > A connection object is not required because autostarted domains are > never marked for autodestroy. > > The comment about needing a connection for the network driver is > obsolete since we can auto-open a connection on demand. >

Re: [PATCH v2 1/8] bhyve: add 'driver' to bhyveProcessStart method

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 15:46:39 +, Daniel P. Berrangé wrote: > This allows for passinga NULL connection object in cases where > domain autodestroy is not required. > > Signed-off-by: Daniel P. Berrangé > --- > src/bhyve/bhyve_driver.c | 6 +++--- > src/bhyve/bhyve_process.c | 5 ++--- > s

Re: [PATCH 18/19] qemu: add RDP support

2025-02-12 Thread Daniel P . Berrangé
On Thu, Jan 30, 2025 at 04:42:24PM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Jan 29, 2025 at 7:25 PM Daniel P. Berrangé > wrote: > > > > On Wed, Jan 29, 2025 at 05:40:40PM +0400, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > Wire the external server RDP sup

Re: [PATCH 17/19] qemu: add qemu-rdp helper unit

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:39PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Helpers to start the qemu-rdp server and set it up. > > Signed-off-by: Marc-André Lureau > --- > po/POTFILES| 1 + > src/qemu/meson.build | 1 + > src/qemu/qemu_domain.c

Re: [PATCH 14/19] qemu/dbus: log daemon stdout/err

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 04:18:49PM +, Daniel P. Berrangé wrote: > On Wed, Jan 29, 2025 at 05:40:36PM +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 > > --- > >

Re: [PATCH 16/19] qemu: if -display dbus capability is supported, accept rdp

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:38PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > We may want to check qemu-rdp presence, instead of failing later? Yes, we should validate qemu-rdp, because the capabilities get advertized to client apps in domain capabilities, as well as

Re: [PATCH 11/19] qemu: add RDP ports range allocator

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:33PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > RDP server use port 3389 by default. > > Signed-off-by: Marc-André Lureau > --- > src/qemu/qemu_conf.c | 6 ++ > src/qemu/qemu_conf.h | 6 ++ > src/qemu/qemu_driver.c | 8

Re: [PATCH 15/19] qemu: validate RDP configuration

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:37PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > src/qemu/qemu_validate.c | 30 +- > 1 file changed, 29 insertions(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé

Re: [PATCH 14/19] qemu/dbus: log daemon stdout/err

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:36PM +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/qemu_dbus.c | 61 +++- > 1 file c

Re: [PATCH v3 1/1] qemu: Add support for RAPL MSRs feature

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 16:36:48 +0100, Anthony Harivel wrote: > Add the support in libvirt to activate the RAPL feature in QEMU. > > This feature is activated with -accel kvm,rapl=true,path=/path/sock.sock > in QEMU. > > The feature is activated in libvirt with the following XML > configuration:

Re: [PATCH 13/19] qemu/dbus: keep a connection to the VM D-Bus

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:35PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The following changes are going to communicate with the qemu-rdp server > through the VM D-Bus bus, keep a connection for that and further usage. > > Signed-off-by: Marc-André Lureau > ---

Re: [PATCH 10/19] qemu: use virDomainDefHasGraphics

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:32PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > src/qemu/qemu_validate.c | 11 +-- > 1 file changed, 1 insertion(+), 10 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Dani

Re: [PATCH 09/19] conf: generalize virDomainDefHasSpiceGraphics

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:31PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Generalize the function, broaden its potential usage. > > Signed-off-by: Marc-André Lureau > --- > src/conf/domain_conf.c | 15 --- > src/conf/domain_conf.h | 2 +- > src

Re: [PATCH 08/19] conf: parse optional RDP username & password

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:30PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Like VNC, allow to set credentials for RDP. > > Signed-off-by: Marc-André Lureau > --- > src/conf/domain_conf.c| 13 + > src/conf/domain_conf.h| 2 ++

Re: [PATCH 07/19] qemu: add qemu RDP configuration

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:29PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > src/qemu/libvirtd_qemu.aug | 7 ++ > src/qemu/qemu.conf.in | 31 > src/qemu/qemu_conf.c

Re: [PATCH 03/19] qemu-slirp: drop unneeded check for OOM

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:25PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > glib anti-pattern, since it aborts on OOM. > > Signed-off-by: Marc-André Lureau > --- > src/qemu/qemu_slirp.c | 6 -- > 1 file changed, 6 deletions(-) Reviewed-by: Daniel P. Berrangé

Re: [PATCH 02/19] build: fix -Werror=maybe-uninitialized

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:24PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > When compiled with -Doptimization=g > > ../tools/nss/libvirt_nss_macs.c:155:8: error: ‘jerr’ may be used > uninitialized [-Werror=maybe-uninitialized] > 155 | if (jerr == json_tokene

[PATCH v3 0/1] add RAPL feature in libvirt

2025-02-12 Thread Anthony Harivel
Hi, Since Fedora 41, RAPL feature in QEMU is available. The tested version with this patch is: qemu-9.1.2-2.fc41. Incorporating this feature into libvirt would significantly streamline the process of testing, adopting, and further developing it, thereby enhancing overall productivity and user e

[PATCH v3 1/1] qemu: Add support for RAPL MSRs feature

2025-02-12 Thread Anthony Harivel
Add the support in libvirt to activate the RAPL feature in QEMU. This feature is activated with -accel kvm,rapl=true,path=/path/sock.sock in QEMU. The feature is activated in libvirt with the following XML configuration: [...] [...] See: https://gitlab.com/qemu-project/qemu/-/commit/0

Re: [PATCH 06/19] qemu: add rdp state directory

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:28PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > src/qemu/qemu_conf.c | 2 ++ > src/qemu/qemu_conf.h | 1 + > src/qemu/qemu_driver.c | 12 > tests/testutilsqemu.c | 2 ++ > 4

[PATCH v2 8/8] qemu: add 'auto_start_delay' configuration parameter

2025-02-12 Thread Daniel P . Berrangé
This allows a user specified delay between autostart of each VM, giving parity with the equivalent feature of libvirt-guests. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf.in | 5 + src/qemu/qemu_con

[PATCH v2 7/8] hypervisor: add support for delay interval during autostart

2025-02-12 Thread Daniel P . Berrangé
This delay can reduce the CPU/IO load storm when autostarting many guests. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src/hypervisor/domain_driver.c | 20 +--- src/hypervisor/domain_driver.h | 2 ++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --

[PATCH v2 6/8] src: convert drivers over to use new autostart helper

2025-02-12 Thread Daniel P . Berrangé
This eliminates some duplicated code patterns aross drivers. Signed-off-by: Daniel P. Berrangé --- src/bhyve/bhyve_driver.c | 41 -- src/libxl/libxl_driver.c | 36 --- src/lxc/lxc_driver.c | 13 +- src/lxc/lxc_process.c| 18 ++--

[PATCH v2 5/8] hypervisor: introduce helper for autostart

2025-02-12 Thread Daniel P . Berrangé
There's a common pattern for autostart of iterating over VMs, acquiring a lock and ref count, then checking the autostart & is-active flags. Wrap this all up into a helper method. Reviewed-by: Peter Krempa Signed-off-by: Daniel P. Berrangé --- src/hypervisor/domain_driver.c | 41 +++

[PATCH v2 4/8] remote: notify systemd when reloading config

2025-02-12 Thread Daniel P . Berrangé
Switch to the 'notify-reload' service type and send notifications to systemd when reloading configuration. Signed-off-by: Daniel P. Berrangé --- src/remote/libvirtd.service.in | 2 +- src/remote/remote_daemon.c | 2 ++ src/virtd.service.in | 2 +- 3 files changed, 4 insertions(+),

[PATCH v2 3/8] util: add APIs for more systemd notifications

2025-02-12 Thread Daniel P . Berrangé
We have a way to notify systemd when we're done starting the daemon. Systemd supports many more notifications, however, and many of them are quite relevant to our needs: https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html This renames the existing notification API to better

[PATCH v2 2/8] bhyve: stop opening & passing connection to bhyveProcessStart

2025-02-12 Thread Daniel P . Berrangé
A connection object is not required because autostarted domains are never marked for autodestroy. The comment about needing a connection for the network driver is obsolete since we can auto-open a connection on demand. Signed-off-by: Daniel P. Berrangé --- src/bhyve/bhyve_driver.c | 19 +++-

[PATCH v2 1/8] bhyve: add 'driver' to bhyveProcessStart method

2025-02-12 Thread Daniel P . Berrangé
This allows for passinga NULL connection object in cases where domain autodestroy is not required. Signed-off-by: Daniel P. Berrangé --- src/bhyve/bhyve_driver.c | 6 +++--- src/bhyve/bhyve_process.c | 5 ++--- src/bhyve/bhyve_process.h | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-)

Re: [PATCH 05/19] qemu: report an error for unsupported graphics

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:27PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Without an error message, it can be tedious to figure out failure to start. > > Signed-off-by: Marc-André Lureau > --- > src/qemu/qemu_command.c | 3 +++ > 1 file changed, 3 insertions(+)

Re: [PATCH 04/19] util: add conn != NULL precondition in virGDBusCallMethod()

2025-02-12 Thread Daniel P . Berrangé
On Wed, Jan 29, 2025 at 05:40:26PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Helps avoid/debug a potential SEGV if conn is NULL, since gio will not > set the "gerror" in that case and we will crash later at: > virReportError(VIR_ERR_DBUS_SERVICE, "%s", gerror->mess

Re: [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP

2025-02-12 Thread Vladimir Sementsov-Ogievskiy
On 11.02.25 00:46, Eric Blake wrote: On Thu, Feb 06, 2025 at 10:20:09AM +0300, Vladimir Sementsov-Ogievskiy wrote: --- qapi/block-export.json | 10 ++ include/block/nbd.h| 6 +++--- [..] @@ -52,6 +57,10 @@ # # @addr: Address on which to listen. # +#

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

2025-02-12 Thread Harikumar Rajkumar
> https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/V...), https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/AKDGMLKQ5BKSU6Y7R5OO46GIY2SYNDXF/

Re: [PATCH v2 5/5] qemu: migration: Reactivate block nodes after migration if VM is left paused

2025-02-12 Thread Jiri Denemark
On Wed, Feb 12, 2025 at 13:33:46 +0100, Peter Krempa wrote: > On incoming migration qemu doesn't activate the block graph nodes right > away. This is to properly facilitate locking of the images. > > The block nodes are normally re-activated when starting the CPUs after > migration, but in cases (

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

2025-02-12 Thread Harikumar Rajkumar
> On Mon, Nov 18, 2024 at 19:24:08 +0530, Harikumar R wrote: > > The review is done now. There are few bits. > > Please note that I didn't point out *all* places needing a version > number update, so make sure to check everything explicitly. Please use > 11.1.0 for next posting. > > One importan

[PATCH v2 5/5] qemu: migration: Reactivate block nodes after migration if VM is left paused

2025-02-12 Thread Peter Krempa
On incoming migration qemu doesn't activate the block graph nodes right away. This is to properly facilitate locking of the images. The block nodes are normally re-activated when starting the CPUs after migration, but in cases (e.g. when a paused VM was migrated) when the VM is left paused the blo

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

2025-02-12 Thread Harikumar Rajkumar
> On Wed, Feb 12, 2025 at 04:05:19PM +0530, Harikumar Rajkumar wrote: > > It is helpful to provide a slightly more detailed summary of > what the patch series is doing when posting such a large > series. > > Also when posting repeated new versions of a series, can you > try to provide a bullet po

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

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 04:05:19PM +0530, Harikumar Rajkumar wrote: > *** Support block disk along with throttle filters *** It is helpful to provide a slightly more detailed summary of what the patch series is doing when posting such a large series. Also when posting repeated new versions of a s

Re: [PATCH v7 03/18] config: Introduce ThrottleGroup and corresponding XML parsing

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 04:05:22PM +0530, Harikumar Rajkumar wrote: > Introduce throttlegroup into domain and provide corresponding methods > > * Define new struct 'virDomainThrottleGroupDef' and corresponding destructor > * Add operations(Add, Update, Del, ByName, Copy, Free) for > 'virDomainThro

Re: [PATCH] node_device: Do not lock the driver state needlessly

2025-02-12 Thread Ján Tomko
On a Wednesday in 2025, Martin Kletzander wrote: On Fri, Feb 07, 2025 at 04:32:07PM +0100, Ján Tomko wrote: On a Friday in 2025, Martin Kletzander wrote: When processing the PCI devices we can only read the configs for each of them if running as privileged. That information is saved in the dri

Re: [PATCH 1/4] virpci: changed the work with PCI via libpciaccess

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 02:54:17PM +0300, Alexander Shursha wrote: > Daniel P. Berrangé writes: > > Should I remove Sponsored from the commit log and add Copyright to the > file? > > * virpci.c: helper APIs for managing host PCI devices > * > * Copyright (C) 2009-2015 Red Hat, Inc. > + * C

[PATCH v7 02/18] schema: Add new domain elements to support multiple throttle filters

2025-02-12 Thread Harikumar Rajkumar
Introduce schema for defining '' element which references throttling groups to form filter chain in qemu for specific disk * Add new elements '' * can include multiple throttlegroup references to form filter chain in qemu * Chained throttle filters feature in qemu is described at https://gitla

Re: [PATCH 1/4] virpci: changed the work with PCI via libpciaccess

2025-02-12 Thread Alexander Shursha
Daniel P. Berrangé writes: Should I remove Sponsored from the commit log and add Copyright to the file? * virpci.c: helper APIs for managing host PCI devices * * Copyright (C) 2009-2015 Red Hat, Inc. + * Copyright (C) 2024-2025 Future Crew, LLC * * This library is free software; you ca

[PATCH v7 16/18] virsh: Refactor iotune options for re-use

2025-02-12 Thread Harikumar Rajkumar
Define macro for iotune options, this macro is used by opts_blkdeviotune and later throttle group opts Signed-off-by: Harikumar Rajkumar --- tools/virsh-domain.c | 308 ++- 1 file changed, 156 insertions(+), 152 deletions(-) diff --git a/tools/virsh-domai

[PATCH v7 18/18] virsh: Add option throttle-groups to attach_disk

2025-02-12 Thread Harikumar Rajkumar
Update "attach_disk" to support new option: throttle-groups to form filter chain in QEMU for specific disk Signed-off-by: Harikumar Rajkumar --- docs/manpages/virsh.rst| 3 ++- tools/virsh-completer-domain.c | 27 +++ tools/virsh-completer-domain.h | 5 + to

[PATCH v7 17/18] virsh: Add support for throttle group operations

2025-02-12 Thread Harikumar Rajkumar
Implement new throttle cmds * Add new virsh cmds: domthrottlegroupset, domthrottlegrouplist, domthrottlegroupinfo, domthrottlegroupdel * Add doc for new cmds at docs/manpages/virsh.rst * Add cmd helper "virshDomainThrottleGroupCompleter", which is used by domthrottlegroupset, domthrottlegroupi

[PATCH v7 15/18] test_driver: Test throttle group lifecycle APIs

2025-02-12 Thread Harikumar Rajkumar
Test throttle group APIs * Extract common methods for both "testDomainSetThrottleGroup" and "testDomainSetBlockIoTune": testDomainValidateBlockIoTune, testDomainSetBlockIoTuneFields, testDomainCheckBlockIoTuneMutualExclusion, testDomainCheckBlockIoTuneMax * Test "Set": testDomainSetThrottleGroup

[libvirt PATCH] qemu: fix qemuDomainSaveImageDefineXML

2025-02-12 Thread Pavel Hrdina
The commit in question made an incorrect change that resulted in getting O_RDONLY FD instead of O_RDWR preventing any writes to happen with the following error: virQEMUSaveDataWrite:176 : failed to write header to domain save file '/path/to/save.img': Bad file descriptor Fixes: 517248e2394476a31

[PATCH v7 14/18] qemustatusxml2xmldata: Add 'throttlefilter' tests

2025-02-12 Thread Harikumar Rajkumar
* Add tests for throttlefilter nodename parse and format for statusxml (disk/privateData/nodenames/nodename with type='throttle-filter') * Add iotune limited disk tests to make sure iotune refactory works Signed-off-by: Harikumar Rajkumar --- .../throttlefilter-in.xml | 392 +

[PATCH v7 13/18] qemuxmlconftest: Add 'throttlefilter' tests

2025-02-12 Thread Harikumar Rajkumar
* Add tests for throttlegroup domain xml processing, including groups referenced and not referenced by filters * Add tests for throttlefilter domain xml processing, including throttle group referenced by different disks * Add negative test case to report error when iotune is configured together wit

[PATCH v7 12/18] config: validate: Verify iotune, throttle group and filter

2025-02-12 Thread Harikumar Rajkumar
Refactor iotune verification, and verify some rules * Disk iotune validation can be reused for throttle group validation, refactor it into common method "virDomainDiskIoTuneValidate" * Add "virDomainDefValidateThrottleGroups" to validate throttle groups, which in turn calls "virDomainDiskIoTun

[PATCH v7 11/18] qemu: block: Support block disk along with throttle filters

2025-02-12 Thread Harikumar Rajkumar
For hot attaching/detaching * Leverage qemuBlockThrottleFiltersData to prepare attaching/detaching throttle filter data for qemuMonitorBlockdevAdd and qemuMonitorBlockdevDel * For hot attaching, within qemuDomainAttachDiskGeneric,prepare throttle filters json data, and create corresponding bloc

[PATCH v7 10/18] qemu: helper: throttle filter nodename and preparation processing

2025-02-12 Thread Harikumar Rajkumar
It contains throttle filter nodename processing(new nodename, topnodename, parse and format nodename), throttle filter attaching/detaching preparation and implementation. * Updated "qemuDomainDiskGetTopNodename", so if throttlefilter is used together with copyOnRead, top node is throttle filter

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

2025-02-12 Thread Harikumar Rajkumar
ThrottleGroup lifecycle implementation, note, in QOM, throttlegroup name is prefixed with "throttle-" to clearly separate throttle group objects into their own namespace. * "qemuDomainSetThrottleGroup", this method is to add("object-add") or update("qom-set") throttlegroup in QOM and update corr

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

2025-02-12 Thread Harikumar Rajkumar
extract common methods from "qemuDomainSetBlockIoTune" to be reused by throttle handling later, common methods include: * "qemuDomainValidateBlockIoTune", which is to validate that PARAMS contains only recognized parameter names with correct types * "qemuDomainSetBlockIoTuneFields", which is to l

[PATCH v7 07/18] remote: New APIs for ThrottleGroup lifecycle management

2025-02-12 Thread Harikumar Rajkumar
Defined new public APIs: * virDomainSetThrottleGroup to add or update throttlegroup within specific domain, it will be referenced by throttlefilter later in disk to do limits * virDomainGetThrottleGroup to get throttlegroup info, old-style is discarded (APIs to query first for the number of pa

[PATCH v7 06/18] tests: Test qemuMonitorJSONGetThrottleGroup and qemuMonitorJSONUpdateThrottleGroup

2025-02-12 Thread Harikumar Rajkumar
Within "testQemuMonitorJSONqemuMonitorJSONUpdateThrottleGroup" * Test qemuMonitorJSONGetThrottleGroup * Test qemuMonitorJSONUpdateThrottleGroup, which updates limits through "qom-set" Signed-off-by: Harikumar Rajkumar --- tests/qemumonitorjsontest.c | 86 + 1

[PATCH v7 05/18] qemu: monitor: Add support for ThrottleGroup operations

2025-02-12 Thread Harikumar Rajkumar
This change contains QMP requests for ThrottleGroup * ThrottleGroup is updated through "qemuMonitorJSONUpdateThrottleGroup" * ThrottleGroup is retrieved through "qemuMonitorJSONGetThrottleGroup" * ThrottleGroup is deleted by reusing "qemuMonitorDelObject" * ThrottleGroup is added by reusing "qemuM

[PATCH v7 04/18] config: Introduce ThrottleFilter and corresponding XML parsing

2025-02-12 Thread Harikumar Rajkumar
Introduce throttle filter along with corresponding operations. * Define new struct 'virDomainThrottleFilterDef' and corresponding destructor * Update _virDomainDiskDef to include virDomainThrottleFilterDef * Support throttle filter "Parse" and "Format" for operations between DOM XML and structs.

[PATCH v7 03/18] config: Introduce ThrottleGroup and corresponding XML parsing

2025-02-12 Thread Harikumar Rajkumar
Introduce throttlegroup into domain and provide corresponding methods * Define new struct 'virDomainThrottleGroupDef' and corresponding destructor * Add operations(Add, Update, Del, ByName, Copy, Free) for 'virDomainThrottleGroupDef' * Update _virDomainDef to include virDomainThrottleGroupDef * Su

[PATCH v7 01/18] schema: Add new domain elements to support multiple throttle groups

2025-02-12 Thread Harikumar Rajkumar
Introduce schema for defining '' element which configures throttling groups which can be configured for multiple disks. * Refactor "diskIoTune" to extract common schema "iotune" * Add new elements '' * contains defintion, which references "iotune" Signed-off-by: Harikumar Rajkumar --- docs/

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

2025-02-12 Thread Harikumar Rajkumar
*** Support block disk along with throttle filters *** Harikumar Rajkumar (18): schema: Add new domain elements to support multiple throttle groups schema: Add new domain elements to support multiple throttle filters config: Introduce ThrottleGroup and corresponding XML parsing config: Int

Re: [PATCH 5/5] qemu: migration: Reactivate block nodes after migration if VM is left paused

2025-02-12 Thread Jiri Denemark
On Tue, Feb 11, 2025 at 14:20:27 +0100, Peter Krempa wrote: > On incoming migration qemu doesn't activate the block graph nodes right > away. This is to properly facilitate locking of the images. > > The block nodes are normally re-activated when starting the CPUs after > migration, but in cases (

Re: [libvirt PATCH] qemu: fix qemuDomainSaveImageDefineXML

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 11:21:25AM +0100, Pavel Hrdina wrote: > The commit in question made an incorrect change that resulted in getting > O_RDONLY FD instead of O_RDWR preventing any writes to happen with the > following error: > > virQEMUSaveDataWrite:176 : failed to write header to domain save

Re: [PATCH 4/5] qemu: monitor: Add monitor backend for 'blockdev-set-active'

2025-02-12 Thread Jiri Denemark
On Tue, Feb 11, 2025 at 14:20:26 +0100, Peter Krempa wrote: > The command will be used to re-activate block nodes after migration when > we're leaving the VM paused so that blockjobs can be used. > > As the 'node-name' field is optional the 'qemumonitorjsontest' case > tests both variants. > > Si

virsh console hangs when ssh connection is lost

2025-02-12 Thread Olaf Hering via Devel
Hello, the command 'virsh -c qemu+ssh://root@remotehost/system console vm' from libvirt 10.0.0 just hangs when the remotehost is rebooted. It prints error: Disconnected from qemu+ssh://root@remotehost/system due to end of file and waits for the user to press return. Then it prints error: internal

Re: [libvirt PATCH] qemu: fix qemuDomainSaveImageDefineXML

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 11:21:25 +0100, Pavel Hrdina wrote: > The commit in question made an incorrect change that resulted in getting > O_RDONLY FD instead of O_RDWR preventing any writes to happen with the > following error: > > virQEMUSaveDataWrite:176 : failed to write header to domain save fi

Re: [PATCH 3/5] qemu: capabilies: Introduce QEMU_CAPS_BLOCKDEV_SET_ACTIVE

2025-02-12 Thread Jiri Denemark
On Tue, Feb 11, 2025 at 14:20:25 +0100, Peter Krempa wrote: > The flag signals presence of the 'blockdev-set-active' QMP command. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_capabilities.c | 2 ++ > src/qemu/qemu_capabilities.h | 1 + > tests/q

Re: [PATCH 1/5] qemu-replies-tool: Dump also query string for optional members

2025-02-12 Thread Jiri Denemark
On Tue, Feb 11, 2025 at 14:20:23 +0100, Peter Krempa wrote: > The query language allows querying whether a member is optional by using > the '*' "operator" but the dumper script didn't output those query > strings. > > Signed-off-by: Peter Krempa > --- > scripts/qemu-replies-tool.py | 4 >

Re: [PATCH 2/5] qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to 'v9.2.0-1636-gffaf7f0376'

2025-02-12 Thread Jiri Denemark
On Tue, Feb 11, 2025 at 14:20:24 +0100, Peter Krempa wrote: > Notable changes: > - 'blockdev-set-active' QMP command and the corresponding 'active' > flag for instantiating blockdev backends added > > Signed-off-by: Peter Krempa > --- > .../caps_10.0.0_x86_64.replies| 3

Re: [PATCH 4/4] bhyve: parse passthru argument from XML-config

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 09:46:10AM +0300, Alexander Shursha wrote: > Sponsored by: Future Crew, LLC > Signed-off-by: Alexander Shursha > --- > src/bhyve/bhyve_parse_command.c | 59 + > 1 file changed, 59 insertions(+) Should come with additions to bhyveargv2xmlte

Re: [PATCH 3/4] bhyve: add command line argument "passthru"

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 09:46:09AM +0300, Alexander Shursha wrote: > Sponsored by: Future Crew, LLC > Signed-off-by: Alexander Shursha > --- > src/bhyve/bhyve_command.c | 27 +++ > 1 file changed, 27 insertions(+) This should come with additions to bhyvexml2argvtest.c dat

Re: [PATCH 1/4] virpci: changed the work with PCI via libpciaccess

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 09:46:07AM +0300, Alexander Shursha wrote: Please provide a commit message that describes the problem you're solving with this refactoring. Likewise for other commits in this series which all have empty commit messages. > Sponsored by: Future Crew, LLC While it is nice th

Re: [PATCH] ci: refresh with 'lcitool manifest'

2025-02-12 Thread Peter Krempa
On Tue, Feb 11, 2025 at 17:41:32 +, Daniel P. Berrangé wrote: > This replaces Fedora 39 with Fedora 41, updates the FreeBSD > Cirrus CI image names, and tweaks some package names > > Signed-off-by: Daniel P. Berrangé > --- Reviewed-by: Peter Krempa

Re: [PATCH] node_device: Do not lock the driver state needlessly

2025-02-12 Thread Martin Kletzander
On Fri, Feb 07, 2025 at 04:32:07PM +0100, Ján Tomko wrote: On a Friday in 2025, Martin Kletzander wrote: When processing the PCI devices we can only read the configs for each of them if running as privileged. That information is saved in the driver state as a boolean introduced in commit 643c74

Re: [PATCH 2/2] qemu: Introduce acpi-generic-initiator device

2025-02-12 Thread Andrea Righi via Devel
Hi Peter, On Wed, Feb 12, 2025 at 10:05:08AM +0100, Peter Krempa wrote: > On Wed, Feb 12, 2025 at 07:26:09 +0100, Andrea Righi via Devel wrote: > > Allow to define new acpi-generic-initiator objects to link a PCI device > > with multiple NUMA nodes. > > > > Link: https://mail.gnu.org/archive/html

Re: [PATCH 2/2] qemu: Introduce acpi-generic-initiator device

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 07:26:09 +0100, Andrea Righi via Devel wrote: > Allow to define new acpi-generic-initiator objects to link a PCI device > with multiple NUMA nodes. > > Link: https://mail.gnu.org/archive/html/qemu-arm/2024-03/msg00358.html > Signed-off-by: Andrea Righi > --- Note this is

Re: [PATCH 1/4] virpci: changed the work with PCI via libpciaccess

2025-02-12 Thread Peter Krempa
On Wed, Feb 12, 2025 at 09:46:07 +0300, Alexander Shursha wrote: > Sponsored by: Future Crew, LLC > Signed-off-by: Alexander Shursha As mentioned in the PR upstream the commit message serves as a place to describe the patch and most importantly the justification/why it's done, rather than serving

[PATCH] NEWS: Improve mention of vTPM transient VM crash fix in v11.0.0

2025-02-12 Thread Peter Krempa
The original NEWS entry for the vTPM transient VM crash was rather vague and non-actionable. As the bug is still actively experienced by users [1] of distros that didn't yet ship an update to v11.0.0 and is hit by relatively common usage improve the entry to mention situations when it happens a bi

[PATCH 2/2] qemu: Introduce acpi-generic-initiator device

2025-02-12 Thread Andrea Righi via Devel
Allow to define new acpi-generic-initiator objects to link a PCI device with multiple NUMA nodes. Link: https://mail.gnu.org/archive/html/qemu-arm/2024-03/msg00358.html Signed-off-by: Andrea Righi --- src/ch/ch_domain.c| 1 + src/conf/domain_conf.c| 153

[PATCH 1/2] qemu: Allow to define NUMA nodes without memory or CPUs assigned

2025-02-12 Thread Andrea Righi via Devel
Allow to define NUMA nodes without memory or CPUs assigned to properly support the new acpi-generic-initiator device. This is required because the NUMA nodes passed to the acpi-generic-initiator object must be independent and not be shared with other resources, such as CPU or memory. Signed-off-b

[PATCH 0/2] qemu: acpi-generic-initiator support

2025-02-12 Thread Andrea Righi via Devel
= Overview = This patch set introduces support for acpi-generic-initiator devices, supported by QEMU [1]. The acpi-generic-initiator object is required to support Multi-Instance GPU (MIG) configurations on NVIDIA GPUs [2]. MIG enables partitioning of GPU resources into multiple isolated instances