Re: [PATCH] NEWS: Mention removal of compile time helper program lookup, virito-net ABI check and FDC capabilities

2025-05-29 Thread Peter Krempa via Devel
On Thu, May 29, 2025 at 14:58:17 +0200, Ján Tomko wrote: > On a Thursday in 2025, Peter Krempa via Devel wrote: > > From: Peter Krempa > > > > Signed-off-by: Peter Krempa > > --- > > NEWS.rst | 25 + > > 1 file changed, 25 insertions(+) > > > > diff --git a/NEWS.rst b/NEW

[PATCH] virConnectAuthCallbackDefault: Return failure if 'virGetPassword' returns NULL

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa virGetPassword can return NULL on linux or BSD if it fails. The caller in virConnectAuthCallbackDefault does dereference it unconditionally. Return failure if virGetPassword returns NULL. Fixes: db72866310d1e520efa8ed2d4589bdb5e76a1c95 Closes: https://gitlab.com/libvirt/libvi

[PATCH] NEWS: Mention removal of compile time helper program lookup, virito-net ABI check and FDC capabilities

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Signed-off-by: Peter Krempa --- NEWS.rst | 25 + 1 file changed, 25 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index fd577021b3..884fcad2d8 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -35,6 +35,24 @@ v11.4.0 (unreleased) + * All he

Re: [PATCH] NEWS: Mention removal of compile time helper program lookup, virito-net ABI check and FDC capabilities

2025-05-29 Thread Ján Tomko via Devel
On a Thursday in 2025, Peter Krempa via Devel wrote: From: Peter Krempa Signed-off-by: Peter Krempa --- NEWS.rst | 25 + 1 file changed, 25 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index fd577021b3..884fcad2d8 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -35,6 +35,24 @

Re: [PATCH] virConnectAuthCallbackDefault: Return failure if 'virGetPassword' returns NULL

2025-05-29 Thread Jiri Denemark via Devel
On Thu, May 29, 2025 at 22:43:20 +0200, Peter Krempa wrote: > From: Peter Krempa > > virGetPassword can return NULL on linux or BSD if it fails. The caller > in virConnectAuthCallbackDefault does dereference it unconditionally. > > Return failure if virGetPassword returns NULL. > > Fixes: db728

Re: [PATCH 03/15] storage_file_probe: qcow2GetExtensions: Fix qcow2 header extension parsing

2025-05-29 Thread Ján Tomko via Devel
On a Thursday in 2025, Peter Krempa via Devel wrote: From: Peter Krempa There are 3 bugs in the qcow2 header extension parser: 1) Header extension padding not taken into account Per qcow2 documentation (qemu.git/docs/interop/qcow2.txt, also now mirrored in the comment explaining the parser)

[PATCH 2/3] util: Introduce virFileGetExistingParent helper

2025-05-29 Thread Jiri Denemark via Devel
From: Jiri Denemark The code from virFileIsSharedFSType which finds the longest existing path for a given input is separated into a new helper so that it can be reused elsewhere. Signed-off-by: Jiri Denemark --- Notes: If you wonder why the code is almost the same as the original one, but

[PATCH 1/3] util: Document limitation of virFileCanonicalizePath

2025-05-29 Thread Jiri Denemark via Devel
From: Jiri Denemark On most platforms virFileCanonicalizePath is implemented using realpath(), which only works on existing paths. Signed-off-by: Jiri Denemark --- src/util/virfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c i

[PATCH 3/3] util: Fix virFileIsSharedFSOverride on nonexistent paths

2025-05-29 Thread Jiri Denemark via Devel
From: Jiri Denemark Commit v11.0.0-162-gf2023e8018 added path canonicalization to virFileIsSharedFSOverride to make sure we can properly match shared filesystem override paths which include symlinks. But virFileCanonicalizePath only works on existing paths, while virFileIsSharedFSOverride may be

[PATCH 0/3] util: Fix virFileIsSharedFSOverride on nonexistent paths

2025-05-29 Thread Jiri Denemark via Devel
Jiri Denemark (3): util: Document limitation of virFileCanonicalizePath util: Introduce virFileGetExistingParent helper util: Fix virFileIsSharedFSOverride on nonexistent paths src/util/virfile.c | 76 +++--- 1 file changed, 45 insertions(+), 31 delet

Re: [PATCH 13/15] storage_file_probe: Parse all qcow2 extensions at once

2025-05-29 Thread Ján Tomko via Devel
On a Thursday in 2025, Peter Krempa via Devel wrote: From: Peter Krempa Refactor qcow2GetExtensions to parse everything at once and directly assign it into fields in the parsed virStorageSource. This removes the need for qcow2GetDataFile as it will be parsed directly. The patch also simplifie

Re: [PATCH 00/15] storage_file_probe: Fix ancient bug in qcow2 header extensions parser and refactor the image probing callbacks

2025-05-29 Thread Ján Tomko via Devel
On a Thursday in 2025, Peter Krempa via Devel wrote: Patch 3 fixes an almost 15 year old bug in the qcow2 header extension parser which breaks when the qcow2 image has more than 1 header extension. For us it caused problems for qcow2 images with data file and backing file which we didn't use befo

[PATCH 3/3] bhyve: implement domainMemoryStats

2025-05-29 Thread Roman Bogorodskiy
Currently, bhyve does not support neither memory ballooning nor reporting guest memory usage. So the following information can be obtained: - RSS of the running process - Memory available to the guest (that is, guest total memory) Signed-off-by: Roman Bogorodskiy --- src/bhyve/bhyve_driver.c

[PATCH 2/3] virprocess: implement virProcessGetStatInfo() for FreeBSD

2025-05-29 Thread Roman Bogorodskiy
Use the "kern.proc.pid" sysctl and retrieve information from the kinfo_proc struct. Signed-off-by: Roman Bogorodskiy --- src/util/virprocess.c | 104 +++--- 1 file changed, 78 insertions(+), 26 deletions(-) diff --git a/src/util/virprocess.c b/src/util/virpro

[PATCH 0/3] bhyve: implement domainInterfaceStats and domainMemoryStats

2025-05-29 Thread Roman Bogorodskiy
Roman Bogorodskiy (3): bhyve: implement domainInterfaceStats virprocess: implement virProcessGetStatInfo() for FreeBSD bhyve: implement domainMemoryStats src/bhyve/bhyve_driver.c | 84 +++ src/util/virprocess.c| 104 +--

[PATCH 1/3] bhyve: implement domainInterfaceStats

2025-05-29 Thread Roman Bogorodskiy
The virNetDevTapInterfaceStats() function already works on FreeBSD, so it's just a matter of wrapping that for domainInterfaceStats. Signed-off-by: Roman Bogorodskiy --- src/bhyve/bhyve_driver.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/src/bhyve/bhy

Re: [PATCH 0/3] util: Fix virFileIsSharedFSOverride on nonexistent paths

2025-05-29 Thread Ján Tomko via Devel
On a Thursday in 2025, Jiri Denemark via Devel wrote: Jiri Denemark (3): util: Document limitation of virFileCanonicalizePath util: Introduce virFileGetExistingParent helper util: Fix virFileIsSharedFSOverride on nonexistent paths src/util/virfile.c | 76 +++---

[PATCH 14/15] storage_file_probe: Move setting of 'compat' attribute to qcow2GetFeatures

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Since the 'compat' field is set based on qcow2 features it belongs to the qcow2 code rather than to the main metadata probing function. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --g

[PATCH 13/15] storage_file_probe: Parse all qcow2 extensions at once

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Refactor qcow2GetExtensions to parse everything at once and directly assign it into fields in the parsed virStorageSource. This removes the need for qcow2GetDataFile as it will be parsed directly. The patch also simplifies the juggling of variables which was needed to parse t

[PATCH 12/15] storage_file_probe: Call qcow2GetFeatures from qcow2GetImageSpecific

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Parse qcow2 feature flags from qcow2GetImageSpecific. To achieve that qcow2GetFeatures is refactored to take virStorageSource directly and fill the data. To avoid the need to pass 'format' the parsing of the qcow2 version is changed to access the offset directly (same as in qco

[PATCH 11/15] storage_file_probe: Move qcow2GetFeatures(ProcessGroup) functions

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Move the two functions to where they will be used. Subsequent patches will refactor the control flow so that they will no longer be declared ahead of time. Moving them in a separate patch will make the changes in the refactor more clear to see. Signed-off-by: Peter Krempa ---

[PATCH 15/15] storage_file_probe: Remove unused image probing callbacks

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Remove the old now-unused infrastructure. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 66 +++ 1 file changed, 16 insertions(+), 50 deletions(-) diff --git a/src/storage_file/storage_file_probe.c b/src/storage_file/storage

RE: [RFC PATCH v3 6/6] qemuxmlconftest: Adds Arm CCA support

2025-05-29 Thread Kazuhiro Abe (Fujitsu) via Devel
On 5/20/25 17:56, Peter Krempa wrote: > On Tue, May 20, 2025 at 17:28:28 +0900, Kazuhiro Abe wrote: > > From: Akio Kakuno > > > > - This test was added to check the xml used to launch the VM > > for Arm CCA support. > > This test was created using the method described in the > > documentat

RE: [RFC PATCH v3 5/6] domaincapstest: Adds Arm CCA support

2025-05-29 Thread Kazuhiro Abe (Fujitsu) via Devel
On 5/20/25 17:55, Peter Krempa wrote: > On Tue, May 20, 2025 at 17:28:27 +0900, Kazuhiro Abe wrote: > > From: Akio Kakuno > > > > - This test was added to check domain capabilities for Arm > > CCA support. > > This test was created using the method described in the > > documentation. > > >

RE: [RFC PATCH v3 4/6] qemucapabilitiestest: Adds Arm CCA support

2025-05-29 Thread Kazuhiro Abe (Fujitsu) via Devel
On 5/20/25 17:54, Peter Krempa wrote: > On Tue, May 20, 2025 at 17:28:26 +0900, Kazuhiro Abe wrote: > > From: Akio Kakuno > > > > - This test was added to check qemu capabilities for Arm > > CCA support. > > IF > > > This test was created using the method described in the > > documentati

RE: [RFC PATCH v3 4/6] qemucapabilitiestest: Adds Arm CCA support

2025-05-29 Thread Kazuhiro Abe (Fujitsu) via Devel
On 5/20/25 17:58, Daniel P. Berrangé via Devel wrote: > On Tue, May 20, 2025 at 10:54:19AM +0200, Peter Krempa via Devel wrote: > > On Tue, May 20, 2025 at 17:28:26 +0900, Kazuhiro Abe wrote: > > > From: Akio Kakuno > > > > > > - This test was added to check qemu capabilities for Arm > > > CCA

[PATCH 00/15] storage_file_probe: Fix ancient bug in qcow2 header extensions parser and refactor the image probing callbacks

2025-05-29 Thread Peter Krempa via Devel
Patch 3 fixes an almost 15 year old bug in the qcow2 header extension parser which breaks when the qcow2 image has more than 1 header extension. For us it caused problems for qcow2 images with data file and backing file which we didn't use before, and the only field we cared about was always put fi

[PATCH 01/15] qcow2GetExtensions: Add debug logs for interesting fields in qcow2 header extension parser

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Add debug statements which were useful in figuring out bugs in the qcow2 extension parser. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/storage_file/storage_file_probe.c b/src/storage_fil

[PATCH 03/15] storage_file_probe: qcow2GetExtensions: Fix qcow2 header extension parsing

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa There are 3 bugs in the qcow2 header extension parser: 1) Header extension padding not taken into account Per qcow2 documentation (qemu.git/docs/interop/qcow2.txt, also now mirrored in the comment explaining the parser) each header extension entry is padded to a multipl

[PATCH 02/15] virstoragetest: Reformat output to hilight dataFile relationship

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Move the 'dataFileRaw' field to the main block as it's based on the data in the qcow2 header same as 'backingStoreRaw'. Indent and annotate the corresponding dataFile block to show where it belongs. Signed-off-by: Peter Krempa --- tests/virstoragetest.c

[PATCH 05/15] storage_file_probe: Add image specific callback taking the whole virStorageSource

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa The callbacks getting just some fields are not flexible and in some cases cause the metadata to be probed multiple times. Add a callback that will pass the whole virStorageSource struct being probed so that the code can be written more efficiently. As a first step we add just

[PATCH 04/15] virstoragetest: Add qcow2 bitmaps to some images

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Add change block tracking bitmaps to some of the qcow2 images, to ensure that they work with our qcow2 header parser even when we don't parse them ourselves. The existing images were modified by running: $ qemu-img bitmap --add qcow2_qcow2-qcow2_qcow2-auto.qcow2 testbitmap

[PATCH 06/15] storage_file_probe: Refactor cowGetBackingStore into cowGetImageSpecific

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Rename the function, adjust parameters and fix the code to fill the virStorageSource fields directly. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/s

[PATCH 07/15] storage_file_probe: Refactor qedGetBackingStore into qedGetImageSpecific

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Change to the new function prototype and adjust the code to fill the fields in virStorageSource directly. The code also converts the copying of the backing file string from 'g_new0' + 'memcpy' to 'g_strndup' as we treat it as a string later on. Signed-off-by: Peter Krempa --

[PATCH 08/15] storage_file_probe: Refactor vmdk4GetBackingStore into vmdk4GetImageSpecific

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Change to the new function prototype and adjust the code to fill the fields in virStorageSource directly. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src

[PATCH 09/15] storage_file_probe: Refactor qcowXGetBackingStore into specific callbacks for qcow and qcow2

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Change qcowXGetBackingStore to use the new function prototype which fills virStorageSource directly. Convert the copying of the backing file string from 'g_new0' + 'memcpy' to 'g_strndup' as we treat it as a string. Introduce qcowGetImageSpecific (as a wrapper for qcowXGetBack

[PATCH 10/15] storage_file_probe: Move logic from qcow2GetClusterSize to qcow2GetImageSpecific

2025-05-29 Thread Peter Krempa via Devel
From: Peter Krempa Move the cluster size parser into the image specific code for qcow2, which will later allow us to remove the callback for cluster size which is not used by any other format. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 31 --

Re: [PATCH 01/15] qcow2GetExtensions: Add debug logs for interesting fields in qcow2 header extension parser

2025-05-29 Thread Ján Tomko via Devel
On a Thursday in 2025, Peter Krempa via Devel wrote: From: Peter Krempa Add debug statements which were useful in figuring out bugs in the qcow2 extension parser. Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 6 ++ 1 file changed, 6 insertions(+) Reviewed-by: J

Re: [PATCH 02/15] virstoragetest: Reformat output to hilight dataFile relationship

2025-05-29 Thread Ján Tomko via Devel
In the commit summary: s/hilight/highlight/ On a Thursday in 2025, Peter Krempa via Devel wrote: From: Peter Krempa Move the 'dataFileRaw' field to the main block as it's based on the data in the qcow2 header same as 'backingStoreRaw'. Indent and annotate the corresponding dataFile block to s