[PATCH v9 16/17] virsh: Add support for throttle group operations

2025-03-19 Thread Peter Krempa via Devel
From: Chun Feng Wu 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 domthrottlegroups

[PATCH v9 04/17] config: Introduce ThrottleFilter and corresponding XML parsing

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu 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 D

[PATCH v9 09/17] qemu: Implement qemu driver for throttle API

2025-03-18 Thread Peter Krempa via Devel
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. * "qemuDomainSetThrottleGroup", this method is to add("object-add") or update("qom-set") throttlegroup

Re: [PATCH] Add NEWS item for auto-shutdown feature

2025-03-20 Thread Peter Krempa via Devel
On Thu, Mar 20, 2025 at 14:57:48 +, Daniel P. Berrangé via Devel wrote: > From: Daniel P. Berrangé > > Signed-off-by: Daniel P. Berrangé > --- > NEWS.rst | 17 + > 1 file changed, 17 insertions(+) Reviewed-by: Peter Krempa

Re: [PATCH 8/8] NEWS: Mention guest agent error code improvements

2025-03-21 Thread Peter Krempa via Devel
On Thu, Mar 20, 2025 at 17:36:27 +0100, Ján Tomko wrote: > On a Thursday in 2025, Peter Krempa via Devel wrote: > > From: Peter Krempa > > > > Signed-off-by: Peter Krempa > > --- > > NEWS.rst | 10 ++ > > 1 file changed, 10 insertions(+) &g

Re: [PATCH 8/8] NEWS: Mention guest agent error code improvements

2025-03-24 Thread Peter Krempa via Devel
On Fri, Mar 21, 2025 at 11:35:36 +, Daniel P. Berrangé wrote: > On Fri, Mar 21, 2025 at 12:15:19PM +0100, Peter Krempa via Devel wrote: > > On Thu, Mar 20, 2025 at 17:36:27 +0100, Ján Tomko wrote: > > > On a Thursday in 2025, Peter Krempa via Devel wrote: > >

Re: [PATCH 1/1] NEWS: Support block disk along with throttle filters

2025-03-25 Thread Peter Krempa via Devel
On Tue, Mar 25, 2025 at 11:10:08 +0530, Harikumar Rajkumar wrote: Missing developer certificate of origin certification: https://libvirt.org/hacking.html#developer-certificate-of-origin > --- > NEWS.rst | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/NEWS.rst b/NEWS.rst > index

[PATCH v9 08/17] qemu: Refactor qemuDomainSetBlockIoTune to extract common methods

2025-03-18 Thread Peter Krempa via Devel
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 only recognized parameter names with correct types * "qemuDomainSetBlockIoTuneF

[PATCH v9 06/17] tests: Test qemuMonitorJSONGetThrottleGroup and qemuMonitorJSONUpdateThrottleGroup

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu Within "testQemuMonitorJSONqemuMonitorJSONUpdateThrottleGroup" * Test qemuMonitorJSONGetThrottleGroup * Test qemuMonitorJSONUpdateThrottleGroup, which updates limits through "qom-set" Signed-off-by: Chun Feng Wu * fix test Signed-off-by: Harikumar Rajkumar * Deleted gett

[PATCH v9 15/17] virsh: Refactor iotune options for re-use

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu Define macro for iotune options, this macro is used by opts_blkdeviotune and later throttle group opts Signed-off-by: Chun Feng Wu Reviewed-by: Peter Krempa Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 308 ++- 1 file chang

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

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu 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: Chun Feng

[PATCH v9 12/17] config: validate: Verify iotune, throttle group and filter

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu 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 call

[PATCH v9 17/17] virsh: Add option "throttle-groups" to "attach_disk"

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu Update "attach_disk" to support new option: throttle-groups to form filter chain in QEMU for specific disk Signed-off-by: Chun Feng Wu * apply suggested coding style changes. Signed-off-by: Harikumar Rajkumar * Fixed alignment of child elements in the XML * Fixed placemen

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

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu 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 descri

[PATCH v9 reviewed 00/17] qemu: block: Support block disk along with throttle filters

2025-03-18 Thread Peter Krempa via Devel
v9 of the throttle filtering series with my reviews and R-b tags applied. Requires [PATCH 0/5] qemu: Two block job fixes https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/TX2YAFHOFO46GR7WVQSPURWHL6O2KCDZ/ to be applied to work properly. Posting for tracking and possibly fi

[PATCH v9 13/17] qemuxmlconftest: Add 'throttlefilter' tests

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu * 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 co

[PATCH v9 11/17] qemu: block: Support block disk along with throttle filters

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu 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 crea

[PATCH v9 14/17] qemustatusxml2xmldata: Add 'throttlefilter' tests

2025-03-18 Thread Peter Krempa via Devel
From: 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: Chun Feng Wu * Isolate status xml test Signed-of

[PATCH v9 03/17] config: Introduce ThrottleGroup and corresponding XML parsing

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu 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 virDomai

Re: [PATCH v3 00/20] Add qemu RDP server support

2025-03-18 Thread Peter Krempa via Devel
On Sun, Mar 16, 2025 at 12:18:21 +0400, marcandre.lureau--- via Devel wrote: > From: Marc-André Lureau > Marc-André Lureau (20): > build-sys: drop -Winline when optimization=g > build: fix -Werror=maybe-uninitialized > qemu-slirp: drop unneeded check for OOM > util: annotate non-null argum

[PATCH v9 07/17] remote: New APIs for ThrottleGroup lifecycle management

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu 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

[PATCH v9 10/17] qemu: helper: throttle filter nodename and preparation processing

2025-03-18 Thread Peter Krempa via Devel
From: Chun Feng Wu 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 nod

Re: [PATCH] virsh: Introduce new hypervisor-cpu-models command

2025-03-19 Thread Peter Krempa via Devel
On Tue, Mar 18, 2025 at 18:13:57 +0100, Ján Tomko via Devel wrote: > On a Thursday in 2025, Collin Walling wrote: > > From: David Judkovics > > > > Add new virsh command 'hypervisor-cpu-models'. Command pulls from the > > existing domcapabilities XML and uses xpath to parse CPU model strings. >

[PATCH 3/8] qemuAgentCommandFull: Use VIR_ERR_AGENT_COMMAND_TIMEOUT when agent disappears

2025-03-20 Thread Peter Krempa via Devel
From: Peter Krempa When the agent disappears after geting a proper command we ought to report the same error code as if we timed out as it's uncertain whether the guest agent did anything. Signed-off-by: Peter Krempa --- src/qemu/qemu_agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH 2/8] qemu: agent: Differentiate timeouts when syncing from command timeout

2025-03-20 Thread Peter Krempa via Devel
From: Peter Krempa As the guest agent code uses timeouts it is possible that we stop waiting before the guest agent replies. If this happens while syncing everything is okay because we didn't send any state-changing command. In case when the timeout happens after a real command was transmitted i

[PATCH 0/8] qemu: Improve guest agent corner case errors

2025-04-05 Thread Peter Krempa via Devel
This series introduces two new error codes aimed to help management applications to better in deciding when corner cases of guest agent interaction are encountered. Peter Krempa (8): lib: error: Introduce 'VIR_ERR_AGENT_COMMAND_TIMEOUT' qemu: agent: Differentiate timeouts when syncing from com

[PATCH 2/6] qemuSnapshotCreateActiveInternal: Fix error logic

2025-04-05 Thread Peter Krempa via Devel
From: Peter Krempa The 'ret' variable is set to 0 before a call which can theoretically fail. Not in practice really as the failure scenarion includes only object initialization. Since the code already has another variable for checking monitor returns use that one properly so that the code makes

[PATCH 6/8] qemuAgentCheckError: Use 'VIR_ERR_AGENT_COMMAND_FAILED'

2025-04-05 Thread Peter Krempa via Devel
From: Peter Krempa In the two cases when we know that the command returned failure switch to the new error code so that management applications can programatically detect failure of the guest agent command. Signed-off-by: Peter Krempa --- src/qemu/qemu_agent.c | 4 ++-- 1 file changed, 2 inser

[PATCH v9 05/17] qemu: monitor: Add support for ThrottleGroup operations

2025-04-05 Thread Peter Krempa via Devel
From: Chun Feng Wu 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 ad

Re: Questions regarding potential resize implementation in libvirt

2025-04-05 Thread Peter Krempa via Devel
On Thu, Mar 20, 2025 at 08:56:04 +0100, Maximilian Immanuel Brandtner wrote: > I've been working on an RFC patch-set to implement resizing for > consoles in QEMU. Now that the patch-set is in review I've turned my > attention to bringing this feature to libvirt. > > With the QEMU patch-set there a

Re: [PATCH 8/8] NEWS: Mention guest agent error code improvements

2025-04-05 Thread Peter Krempa via Devel
On Fri, Mar 21, 2025 at 11:53:50 +, Daniel P. Berrangé wrote: > On Fri, Mar 21, 2025 at 12:40:39PM +0100, Peter Krempa wrote: > > On Fri, Mar 21, 2025 at 11:35:36 +, Daniel P. Berrangé wrote: > > > On Fri, Mar 21, 2025 at 12:15:19PM +0100, Peter Krempa via Devel wrote: &

Re: [PATCH] esxConnectListAllDomains: Don't propagate failure to lookup a single domain

2025-03-26 Thread Peter Krempa via Devel
On Wed, Mar 26, 2025 at 15:07:37 +0100, Ján Tomko wrote: > On a Wednesday in 2025, Peter Krempa via Devel wrote: > > From: Peter Krempa > > > > In esxConnectListAllDomains if the lookup of the VM name and UUID fails > > for a single VM (possible e.g. with broken s

Re: [PATCH] esxConnectListAllDomains: Don't propagate failure to lookup a single domain

2025-03-26 Thread Peter Krempa via Devel
On Wed, Mar 26, 2025 at 13:39:55 +0100, Peter Krempa via Devel wrote: > From: Peter Krempa > > In esxConnectListAllDomains if the lookup of the VM name and UUID fails > for a single VM (possible e.g. with broken storage) the whole API would > return failure even when there

[PATCH 7/8] qemuAgentCheckError: Rewort error if neither return nor error is found

2025-03-27 Thread Peter Krempa via Devel
From: Peter Krempa Disambiguate the case from other types of error. Signed-off-by: Peter Krempa --- src/qemu/qemu_agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index d4eb4897a4..ee0921eca6 100644 --- a/src/qemu/qemu_ag

[PATCH] NEWS: Mention bump to qemu-6.2, vhost-user shmem check and stats params discoverabilty

2025-03-26 Thread Peter Krempa via Devel
From: Peter Krempa Signed-off-by: Peter Krempa --- NEWS.rst | 20 1 file changed, 20 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 18d45656b8..2855ec77e4 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -15,6 +15,11 @@ v11.2.0 (unreleased) * **Removed features** + * Remo

[PATCH] esxConnectListAllDomains: Don't propagate failure to lookup a single domain

2025-03-26 Thread Peter Krempa via Devel
From: Peter Krempa In esxConnectListAllDomains if the lookup of the VM name and UUID fails for a single VM (possible e.g. with broken storage) the whole API would return failure even when there are working VMs. Rework the lookup so that if a subset fails we ignore the failure on those. We report

[PATCH 2/3] qemuDomainBlockCopyCommon: Reorder setup of 'mirror' data

2025-04-10 Thread Peter Krempa via Devel
From: Peter Krempa While exploring an idea that modified the setup of the mirror I've noticed that the code setting up the 'discard' field in the block copy job happens after setup of the stroage source, while normally e.g. in qemuDomainPrepareStorageSource() it happens before. Reorder it despit

[PATCH 1/3] qemu: domain: Unexport 'qemuDomainPrepareStorageSourceBlockdevNodename'

2025-04-10 Thread Peter Krempa via Devel
From: Peter Krempa The function is referenced only from within qemu_domain.c Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain.h | 5 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c3ca

[PATCH 3/3] qemuDomainBlockCopyCommon: Don't revoke access to file twice on failure

2025-04-10 Thread Peter Krempa via Devel
From: Peter Krempa If the copy job fails to start up when calling the 'blockdev-mirror' command the code would call qemuDomainStorageSourceChainAccessRevoke() twice; once right after the monitor call and the second time in the 'endjob' section. Remove the one directly after the monitor call and

[PATCH 2/4] qemu: monitor: Drop wrappers for 'nbd-server-add'

2025-04-08 Thread Peter Krempa via Devel
From: Peter Krempa The code is no longer used. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 17 - src/qemu/qemu_monitor.h | 5 - src/qemu/qemu_monitor_json.c | 28 src/qemu/qemu_monitor_json.h | 6 -- tests/qemumonit

[PATCH 4/4] qemu: capabilities: Retire QEMU_CAPS_NBD_BITMAP

2025-04-08 Thread Peter Krempa via Devel
From: Peter Krempa The capability wasn't used since it's inception. It now refers to a deprecated QMP command. Drop it. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemuc

[PATCH 3/4] qemu: capabilities: Retire QEMU_CAPS_BLOCK_EXPORT_ADD

2025-04-08 Thread Peter Krempa via Devel
From: Peter Krempa The 'block-export-add' command was added in qemu-5.2 so we now use it unconditionally. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdat

[PATCH] docs: drvqemu: Fix required minimum qemu version to 6.2.0

2025-04-08 Thread Peter Krempa via Devel
From: Peter Krempa Commit 8824af826d3 (and also commit 073bf167843 before it) which bumped minimu, qemu version forgot to update the qemu driver documentation page Fixes: 8824af826d3 Signed-off-by: Peter Krempa --- docs/drvqemu.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH 0/3] qemu: block copy fixes

2025-04-10 Thread Peter Krempa via Devel
Three patches fixing various bits in block copy job setup. Peter Krempa (3): qemu: domain: Unexport 'qemuDomainPrepareStorageSourceBlockdevNodename' qemuDomainBlockCopyCommon: Reorder setup of 'mirror' data qemuDomainBlockCopyCommon: Don't revoke access to file twice on failure src

[PATCH 2/5] virHostCPUGetInfoPopulateLinux: Remove 'cleanup'

2025-04-10 Thread Peter Krempa via Devel
From: Peter Krempa As the cleanup section is empty; the code can now return directly on errors. Signed-off-by: Peter Krempa --- src/util/virhostcpu.c | 31 +-- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcp

Re: [libvirt PATCH] tools: virsh: metadata: do not report error on missing metadata

2025-04-01 Thread Peter Krempa via Devel
On Fri, Feb 21, 2025 at 14:36:50 +0100, Michal Prívozník wrote: > On 2/20/25 23:26, Ján Tomko wrote: > > Similarly to `desc` and `net-desc`, return an empty string if > > there is no metadata to be returned. > > > > https://issues.redhat.com/browse/RHEL-27172 > > > > Signed-off-by: Ján Tomko > >

[PATCH 4/8] virStorageNetHostDefClear: Move into virStorageNetHostDefFree

2025-03-28 Thread Peter Krempa via Devel
From: Peter Krempa There are no other callers. Signed-off-by: Peter Krempa --- src/conf/storage_source_conf.c | 19 +-- src/conf/storage_source_conf.h | 3 --- src/libvirt_private.syms | 1 - 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/conf/stora

[PATCH 2/8] virDomainStorageNetworkParseHost: Refactor cleanup

2025-03-28 Thread Peter Krempa via Devel
From: Peter Krempa Use a 'switch' statement instead of a bunch of if statements to do validation and selection what to parse. Remove the pre-clearing of the struct as we always alocate cleared memory for it and we can reorder assignments to avoid the need for cleanup. Signed-off-by: Peter Kremp

[PATCH 6/8] backup: Add support for passing server socket file descriptor to backup NBD server

2025-03-28 Thread Peter Krempa via Devel
From: Peter Krempa In deployments where libvirt is containerized together with the VM it may be hard for the management application to access listening sockets inside the container from the outside. This patch implements "transport='fd'" for the NBD server definition for backups which allows to

[PATCH 5/8] qemu: monitor: Support FD passing of sockets to 'qemuMonitorJSONNBDServerStart'

2025-03-28 Thread Peter Krempa via Devel
From: Peter Krempa Upcoming patches will extend the FD passing infrastructure to the backup job so that users can pass an opened socket instead of qemu opening it themself to bypass difficulities caused by containerizing libvirt. Signed-off-by: Peter Krempa --- src/conf/storage_source_conf.c |

[PATCH 7/8] tests: domainbackupxml2xml: Add test case for pull-mode backup with NBD transport='fd'

2025-03-28 Thread Peter Krempa via Devel
From: Peter Krempa Signed-off-by: Peter Krempa --- .../domainbackupxml2xmlin/backup-pull-fd.xml | 22 ++ .../domainbackupxml2xmlout/backup-pull-fd.xml | 23 +++ tests/genericxml2xmltest.c| 1 + 3 files changed, 46 insertions(+) create mode

[PATCH 8/8] qemu: monitor: Improve field annotations in QEMU_CHECK_MONITOR

2025-03-28 Thread Peter Krempa via Devel
From: Peter Krempa The macro checking monitor object state also logs information such as the monitor object pointer and the number of the monitor FD. Name the field 'monfd' instead of 'fd' as it's confusing when debugging FD pasing via monitor. Signed-off-by: Peter Krempa --- src/qemu/qemu_mo

[PATCH 0/8] Support FD passing for the NBD server socket used for backup

2025-03-28 Thread Peter Krempa via Devel
See 6/8 for justification. Peter Krempa (8): virDomainStorageNetworkParseHost: Remove unpopulated 'transport' variable virDomainStorageNetworkParseHost: Refactor cleanup conf: Introduce VIR_STORAGE_NET_HOST_TRANS_FD virStorageNetHostDefClear: Move into virStorageNetHostDefFree qemu:

[PATCH 1/8] virDomainStorageNetworkParseHost: Remove unpopulated 'transport' variable

2025-03-28 Thread Peter Krempa via Devel
From: Peter Krempa Since the refactor to use proper enum type for the network transport the 'transport' variable is no longer filled. Remove it and fix the error message which references it without using NULLSTR. Fixes: 452695926dc Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 3 +--

Re: [PATCH] [for-10.1] qapi/block-core: derpecate some block-job- APIs

2025-04-01 Thread Peter Krempa via Devel
On Tue, Apr 01, 2025 at 18:57:30 +0300, Vladimir Sementsov-Ogievskiy wrote: > For change, pause, resume, complete, dismiss and finalize actions > corresponding job- and block-job commands are almost equal. The > difference is in find_block_job_locked() vs find_job_locked() > functions. What's diffe

Re: Report a build issue

2025-04-02 Thread Peter Krempa via Devel
On Wed, Apr 02, 2025 at 06:56:17 +, Duan, Zhenzhong wrote: > Hi, > > When -Dlibnl=disabled, build failed as below: > > ../src/util/virnetdevbridge.c: In function 'virNetDevBridgeSetupVlans': > ../src/util/virnetdevbridge.c:326:9: error: implicit declaration of function > 'virNetlinkBridgeVla

[PATCH 0/6] qemu: Remove last HMP commands

2025-04-02 Thread Peter Krempa via Devel
RIP HMP use in libvirt: 2007-02-14 [1] - 2025-04-02 [1] 23ad665cb05ef9ce7d298cc34bff5efb95ef6948 Peter Krempa (6): qemu: domain: Don't check return value of 'virCPUDefCopy' qemuSnapshotCreateActiveInternal: Fix error logic qemu: snapshot: Always assume support for QEMU_CAPS_SNAPSHOT_I

[PATCH 1/6] qemu: domain: Don't check return value of 'virCPUDefCopy'

2025-04-02 Thread Peter Krempa via Devel
From: Peter Krempa As 'virCPUDefCopy' can't fail any more (without aborting) remove the last two return value checks. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.

[PATCH 5/6] qemu: monitor: Remove HMP monitor code

2025-04-02 Thread Peter Krempa via Devel
From: Peter Krempa Now that we've replaced the final two HMP commands used by libvirt we can fully drop the 'text' monitor support. The only thing we keep is the HMP passtrhough with 'virsh qemu-monitor-command'. Signed-off-by: Peter Krempa --- po/POTFILES | 1 - src/qemu/me

[PATCH 6/6] qemu: capabilities: Retire QEMU_CAPS_SNAPSHOT_INTERNAL_QMP

2025-04-02 Thread Peter Krempa via Devel
From: Peter Krempa The code now always assumes support for the QMP internal snapshot commands so the capability is no longer needed. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +-

Re: [PATCH] meson: Add back prefix path for runstatedir

2025-04-02 Thread Peter Krempa via Devel
On Wed, Apr 02, 2025 at 15:58:28 +0800, Zhenzhong Duan wrote: > Currently libvirt favors /run instead of /var/run, but for local build > run test, a prefix path is still needed to avoid interoperating with OS > vendor provided binaries. Could you please elaborate? > > Signed-off-by: Zhenzhong Du

[PATCH 2/5] qemu: Do not replace filter nodes with virDomainBlockCopy

2025-03-17 Thread Peter Krempa via Devel
From: Peter Krempa The block copy operation is supposed to just move the disk to a new destination. While in certain scenarios it'd make sense to drop the copy-on-read layer, the definition would not correspond to it. This was caused by a fix to the behaviour of the block job after conversion to

[PATCH 0/5] qemu: Two block job fixes

2025-03-17 Thread Peter Krempa via Devel
Peter Krempa (5): qemu: monitor: Wire up 'replaces' attribute for 'blockdev-mirror' qemu: Do not replace filter nodes with virDomainBlockCopy qemu: Remove return value from 'qemuHotplugRemoveManagedPR' qemuDomainChangeEjectableMedia: Separate rollback and success code paths qemuHotplu

[PATCH 1/5] qemu: monitor: Wire up 'replaces' attribute for 'blockdev-mirror'

2025-03-17 Thread Peter Krempa via Devel
From: Peter Krempa The 'replaces' field controls which node will be replaced by the job. This can be used to e.g. keep filter nodes in place after the copy finishes. This will be used to keep the 'copy-on-read' and 'throttle' layers in place after a copy. This patch wires up the monitor and tes

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

2025-03-17 Thread Peter Krempa via Devel
On Wed, Feb 19, 2025 at 22:27:04 +0530, Harikumar Rajkumar wrote: > *** Support block disk along with throttle filters *** > > Chun Feng Wu (17): > schema: Add new domain elements to support multiple throttle groups > schema: Add new domain elements to support multiple throttle filters > con

[PATCH 3/5] qemu: Remove return value from 'qemuHotplugRemoveManagedPR'

2025-03-17 Thread Peter Krempa via Devel
From: Peter Krempa The only place which actually checked the return value would skip code e.g. to delete unused files or stop no longer used services. The rest of the callers ignored the value. As this is expected to be used on cleanup code paths which have no possibility to report errors we sho

[PATCH 5/5] qemuHotplugRemoveManagedPR: Integrate check whether removal is needed

2025-03-17 Thread Peter Krempa via Devel
From: Peter Krempa Calls to 'qemuHotplugRemoveManagedPR' needed to be guarded by a check if the removed elements actually caused us to add the manager in the first place. The two new calls added in commit 1697323bfe6000c2f5a2519c06f0ba81 were not guarded by such check and thus would spam the deb

[PATCH 4/5] qemuDomainChangeEjectableMedia: Separate rollback and success code paths

2025-03-17 Thread Peter Krempa via Devel
From: Peter Krempa Do not use the rollback code path on success just to avoid extra call to qemuHotplugRemoveManagedPR. Rename the label and use it only when rolling back. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 37 +++-- 1 file changed, 15 in

Re: [PATCH] storage: virStorageVolDefParse and storageVolCreateXML flags fix

2025-04-07 Thread Peter Krempa via Devel
t is not checked that happens regularly. > On Mon, Apr 7, 2025 at 3:11 PM Peter Krempa wrote: > > > On Mon, Apr 07, 2025 at 14:49:14 +0200, Peter Krempa via Devel wrote: > > > On Mon, Apr 07, 2025 at 14:25:43 +0200, Kirill Shchetiniuk via Devel > > wrote: > > > &

Re: [PATCH] storage: virStorageVolDefParse and storageVolCreateXML flags fix

2025-04-07 Thread Peter Krempa via Devel
On Mon, Apr 07, 2025 at 15:45:24 +0200, Michal Prívozník wrote: > On 4/7/25 15:11, Peter Krempa via Devel wrote: > > On Mon, Apr 07, 2025 at 14:49:14 +0200, Peter Krempa via Devel wrote: > >> On Mon, Apr 07, 2025 at 14:25:43 +0200, Kirill Shchetiniuk via Devel wrote: [...] &g

[PATCH 3/5] libvirt-host: Clarify/fix description of the CPU frequency field

2025-04-07 Thread Peter Krempa via Devel
From: Peter Krempa The 'virNodeInfo' field for CPU frequency is named 'mhz'. The docs were mentioning 'mHZ', which is neither the field name nor proper spelling of the unit. Reword the paragraph to mention "CPU frequency" instead and explicitly name the field in virNodeInfo struct. Signed-off-b

[PATCH 0/4] qemu: Remove legacy 'nbd-export-add' code and deprecate corresponding capabilities

2025-04-08 Thread Peter Krempa via Devel
Peter Krempa (4): qemu: block: Always assume support for 'block-export-add' qemu: monitor: Drop wrappers for 'nbd-server-add' qemu: capabilities: Retire QEMU_CAPS_BLOCK_EXPORT_ADD qemu: capabilities: Retire QEMU_CAPS_NBD_BITMAP src/qemu/qemu_block.c | 7 - src

[PATCH 1/4] qemu: block: Always assume support for 'block-export-add'

2025-04-08 Thread Peter Krempa via Devel
From: Peter Krempa 'block-export-add' QMP command which replaces 'nbd-server-add' was introduced in qemu-5.2. We can thus drop the old code now. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu

[PATCH] esx: Accept empty "path" URI component same way as "/"

2025-04-08 Thread Peter Krempa via Devel
From: Peter Krempa When connecting to "esx://" URI there's code which prints a warning that the path is not "empty". The check validates that "uri->path" is "/". In case when the user uses URI such as: esx://hostname the warning is printed as well. Since there is no effective difference betwe

[PATCH] NEWS: Mention fix for 'qemu-rdp' error being logged

2025-04-08 Thread Peter Krempa via Devel
From: Peter Krempa Add the news entry stating that it's safe to ignore the error. Signed-off-by: Peter Krempa --- NEWS.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2608086717..18b873abe9 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -34,6 +34,16 @@ v1

Re: [PATCH] storage: virStorageVolDefParse and storageVolCreateXML flags fix

2025-04-08 Thread Peter Krempa via Devel
On Tue, Apr 08, 2025 at 20:21:13 +0200, Kirill Shchetiniuk wrote: > On Mon, Apr 07, 2025 at 03:59:25PM +0200, Peter Krempa wrote: > > On Mon, Apr 07, 2025 at 15:45:24 +0200, Michal Prívozník wrote: > > > On 4/7/25 15:11, Peter Krempa via Devel wrote: > > > > On Mon,

Re: [PATCH V1 0/6] fast qom tree get

2025-04-09 Thread Peter Krempa via Devel
On Wed, Apr 09, 2025 at 09:39:02 +0200, Markus Armbruster via Devel wrote: > Hi Steve, I apologize for the slow response. > > Steve Sistare writes: > > > Using qom-list and qom-get to get all the nodes and property values in a > > QOM tree can take multiple seconds because it requires 1000's of

[PATCH 1/3] qemu: block: Don't crash if qemuBlockThrottleFiltersDetach gets NULL @data

2025-04-11 Thread Peter Krempa via Devel
From: Peter Krempa 'qemuBlockThrottleFiltersDetach' crashes if @data is NULL. That can happen in 'qemuDomainAttachDiskGeneric' as it's used as a rollback path in cases when we didn't yet initialize the filter struct. Fix it by tolerating NULL @data. Closes: https://gitlab.com/libvirt/libvirt/-/

[PATCH 2/3] qemuDomainAttachDiskGeneric: Report errors from 'qemuBuildThrottleFiltersAttachPrepareBlockdev'

2025-04-11 Thread Peter Krempa via Devel
From: Peter Krempa 'qemuBuildThrottleFiltersAttachPrepareBlockdev' can fail when constructing JSON props, but otherwise always retruns a pointer even if there's nothing to do. The code in 'qemuDomainAttachDiskGeneric' didn't handle this properly as it considered NULL as "nothing to do". Return t

[PATCH 3/3] NEWS: Mention fix of crash on disk hotplug failure

2025-04-11 Thread Peter Krempa via Devel
From: Peter Krempa Signed-off-by: Peter Krempa --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4f1e8ecbdf..7b4dbd795b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -50,6 +50,11 @@ v11.3.0 (unreleased) to be logged in the system log. It is safe to i

[PATCH 0/3] qemu: Fix crash on disk hotplug rollback

2025-04-11 Thread Peter Krempa via Devel
Peter Krempa (3): qemu: block: Don't crash if qemuBlockThrottleFiltersDetach gets NULL @data qemuDomainAttachDiskGeneric: Report errors from 'qemuBuildThrottleFiltersAttachPrepareBlockdev' NEWS: Mention fix of crash on disk hotplug failure NEWS.rst| 5 + src/qemu

Re: [PATCH v3 18/20] qemu: add 'rdp' capability if qemu-rdp is available

2025-04-07 Thread Peter Krempa via Devel
On Sun, Mar 16, 2025 at 12:18:39 +0400, marcandre.lureau--- via Devel wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Reviewed-by: Martin Kletzander > --- > diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c > index ca99e61896..2c137bb663 100644 >

Re: [PATCH] storage: virStorageVolDefParse and storageVolCreateXML flags fix

2025-04-07 Thread Peter Krempa via Devel
On Mon, Apr 07, 2025 at 14:25:43 +0200, Kirill Shchetiniuk via Devel wrote: > When the new storage was created using virsh with --validate option > following errors occurred: > > # virsh vol-create default --file vol-def.xml --validate > error: Failed to create vol from vol-def.xml > error: unsupp

[PATCH 0/5] virNodeGetInfo: Fix docs and propagate them to 'virsh nodeinfo'

2025-04-07 Thread Peter Krempa via Devel
Patches 1,2 cleanup the code the rest deals with docs. Peter Krempa (5): virHostCPUGetInfoPopulateLinux: Use automatic memory freeing virHostCPUGetInfoPopulateLinux: Remove 'cleanup' libvirt-host: Clarify/fix description of the CPU frequency field virNodeGetInfo: Improve description of the

[PATCH 1/5] virHostCPUGetInfoPopulateLinux: Use automatic memory freeing

2025-04-07 Thread Peter Krempa via Devel
From: Peter Krempa Use 'g_autfree' for the two temporary strings. 'sysfs_cpudir' was used in two places, one of which is in a loop. Add another helper variable for it and declare the other one in the loop. Signed-off-by: Peter Krempa --- src/util/virhostcpu.c | 16 ++-- 1 file cha

[PATCH 4/5] virNodeGetInfo: Improve description of the case when fake data is reported

2025-04-07 Thread Peter Krempa via Devel
From: Peter Krempa virNodeGetInfo due to the rigid desing of the filled struct can't faithfully represent all topologies. Improve the description when that happens and outline the fallback topology. The function docs already state that users ought to use virConnectGetCapabilities() instead. Sig

[PATCH 5/5] manpages: virsh: Use disclaimer from 'virNodeGetInfo()' for 'virsh nodeinfo'

2025-04-07 Thread Peter Krempa via Devel
From: Peter Krempa Adapt the disclarimer about the data not being accurate in many cases from the API docs to the virsh command using the aforementioned API. Signed-off-by: Peter Krempa --- docs/manpages/virsh.rst | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-)

Re: [PATCH] storage: virStorageVolDefParse and storageVolCreateXML flags fix

2025-04-07 Thread Peter Krempa via Devel
On Mon, Apr 07, 2025 at 14:49:14 +0200, Peter Krempa via Devel wrote: > On Mon, Apr 07, 2025 at 14:25:43 +0200, Kirill Shchetiniuk via Devel wrote: > > When the new storage was created using virsh with --validate option > > following errors occurred: > > > > # virsh vo

Re: [PATCH] rpc: Re-read the data if EAGAIN or EINTR were captured

2025-04-07 Thread Peter Krempa via Devel
On Tue, Apr 08, 2025 at 00:55:04 +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > If EAGAIN or EINTR are returned from the gnutls_record_recv, > GNU TLS suggests calling the gnutls_record_recv once again to Since the guidance is about 'gnutls_record_recv' ... > get the data. Refer to

[PATCH 0/2] qemucapabilitiestest: Update of x86_64 test data for qemu-10.0 release

2025-04-23 Thread Peter Krempa via Devel
Peter Krempa (2): qemucapabilitiestest: Final update for qemu-10.0 release on x86_64 qemucapabilitiestest: Final update for qemu-10.0 release on x86_64 of the 'amdsev' variant .../caps_10.0.0_x86_64+amdsev.replies | 199 ++ .../caps_10.0.0_x86_64+amdsev.xml

[PATCH 2/2] qemucapabilitiestest: Final update for qemu-10.0 release on x86_64 of the 'amdsev' variant

2025-04-23 Thread Peter Krempa via Devel
From: Peter Krempa Signed-off-by: Peter Krempa --- .../caps_10.0.0_x86_64+amdsev.replies | 199 ++ .../caps_10.0.0_x86_64+amdsev.xml | 9 +- 2 files changed, 113 insertions(+), 95 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amds

Re: [PATCH v1] tests: add capabilities for QEMU 10.0.0 on s390x

2025-04-23 Thread Peter Krempa via Devel
On Tue, Jan 21, 2025 at 16:33:03 +0100, Shalini Chellathurai Saroja wrote: > Let us introduce the xml and reply files for QEMU 10.0.0 on s390x. > > Notable changes: > - new s390-ccw-virtio-10.0 machine type > - old machine types (2.4 - 2.8) dropped > - new CPU models > - New device

[PATCH 1/2] qemucapabilitiestest: Final update for qemu-10.0 release on x86_64

2025-04-23 Thread Peter Krempa via Devel
From: Peter Krempa Update the data after the release. Notable changes: - the 7.0 machine types became deprecated Signed-off-by: Peter Krempa --- .../caps_10.0.0_x86_64.replies | 16 .../qemucapabilitiesdata/caps_10.0.0_x86_64.xml | 12 ++-- 2 files

Re: [PATCHv2 1/5] qemu: Add support for NVMe namespace disk bus type

2025-04-28 Thread Peter Krempa via Devel
On Sun, Apr 27, 2025 at 19:48:03 +0800, honglei.w...@smartx.com wrote: > From: ray > > This patch extends the disk bus support by introducing a new nvme-ns bus type. > > The nvme-ns bus disk needs to be attached to nvme controller. A controller > can contain multiple nvme-ns disk devices. > > S

Re: [PATCHv2 2/5] qemu_capabilities: Add support for nvme-ns bus capabilities

2025-04-28 Thread Peter Krempa via Devel
On Sun, Apr 27, 2025 at 19:48:04 +0800, honglei.w...@smartx.com wrote: > From: ray > > Signed-off-by: ray > --- Generally patches adding a capability flag should only add the capability flag. Thus you'll need to split this patch. 1) capability addition - move it ahead to the beginning of t

Re: [RFC PATCH 0/3] single-binary: make QAPI generated files common

2025-04-28 Thread Peter Krempa via Devel
On Fri, Apr 25, 2025 at 17:38:44 +0200, Markus Armbruster via Devel wrote: > Pierrick Bouvier writes: [...] > To be precise: conditionals that use macros restricted to > target-specific code, i.e. the ones poisoned by exec/poison.h. Let's > call them target-specific QAPI conditionals. > > The

[PATCH] qemuxmlactivetest: Don't segfault when capability XMLs are invalid

2025-04-24 Thread Peter Krempa via Devel
From: Peter Krempa This is purely a devel-time problem in the test suite. 'qemuxmlactivetest' invokes the whole test worker twice, once for inactive output and second time for active. Now 'testQemuInfoInitArgs' returns a failure if the XML is invalid and the test is skipped. On another invocati

Re: [PATCH 2/3] qemu: Replace usb-storage with usb-bot

2025-04-24 Thread Peter Krempa via Devel
On Sat, Mar 08, 2025 at 14:57:41 +0900, Akihiko Odaki wrote: > usb-storage is a compound device that automatically creates a USB mass > storage device and a SCSI device as its backend. Unfortunately it lacks > some configuration options that are usually present with a SCSI device, > and cannot repr

[PATCH] qemu: rdp: Fix 'qemuRdpAvailable()'

2025-04-10 Thread Peter Krempa via Devel
From: Peter Krempa qemuRdpAvailable() is called from the capability filing code, thus: - it must not report spurious errors - it should not call any extra processes We can solve the above by just checking existance of 'qemu-rdp' in the path as: - at the time of adding of qemuRdpAvailable() there

Re: [PATCH] nss: Fix memory leak in findLease

2025-04-14 Thread Peter Krempa via Devel
On Mon, Apr 14, 2025 at 15:06:09 +0300, Alexander Kuznetsov wrote: > path is allocated by asprintf() and must be freed later if realloc() fails or > at > the end of each while() iteration > > Move the free() call out of LIBVIRT_NSS_GUEST macro and add another one if > realloc() fails > > Found b

  1   2   3   4   5   >