[PATCH] qemu: Check usage count of qemu:override node

2022-04-20 Thread Justin Gatzen
When is the only usage of the qemu namespace the entire section is mistakenly removed. Add check for use count. Signed-off-by: Justin Gatzen --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

Re: [PATCH v3 00/30] Add 'version' to other exported types

2022-04-20 Thread Victor Toso
Hi, On Wed, Apr 20, 2022 at 09:07:49PM +0200, Victor Toso wrote: > Gitlab run of this series (fails with codestyle of do-not-commit > script). Actually, I fixed before sending. > https://gitlab.com/victortoso/libvirt/-/pipelines/520901763 Cheers, Victor signature.asc Description: PGP

[PATCH v3 24/30] scripts: apibuild: fix parsing block comments from typedef enum

2022-04-20 Thread Victor Toso
Removed the TODO as we can rely to the serialize_typedef() the job to report missing comments. Signed-off-by: Victor Toso --- scripts/apibuild.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index 19e897b1ba..ddc2fff7af

[PATCH v3 10/30] docstring: typedef: libvirt:: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given typedef was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-domain-checkpoint.h | 34 +- include/libvirt/libvirt-domain-snapshot.h | 40 +-

[PATCH v3 20/30] docstring: Fix and append Since to virDomainDeviceModifyFlags

2022-04-20 Thread Victor Toso
This commit is similar to "docs: Fix generated documentation of virConnectListAllNodeDeviceFlags", check it out for more info. Signed-off-by: Victor Toso --- include/libvirt/libvirt-domain.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v3 30/30] do-not-commit: script to validate output

2022-04-20 Thread Victor Toso
A throw away script to validate that the generated XML has the correct versions. It checks if $keyword is present in $git_tag and also in the $next_git_tag but not in the $previous_git_tag. Takes almost a minute to run, in my computer. | python3 ./scripts/version-quest.py -i ./include/ -d

[PATCH v3 27/30] scripts: apibuild: parse 'Since' for functions

2022-04-20 Thread Victor Toso
This patch adds 'version' parameter to generated XML API for functions and functypes. The 'version' metadata has been added with e0e0bf6628 by parsing .syms files. This commit does not override that but it will warn if there is not 'Since' metadata with new additions. There is not clear benefit

[PATCH v3 16/30] docstring: function: admin: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given function was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-admin.h | 3 ++ src/admin/libvirt-admin.c | 93 + 2 files

[PATCH v3 29/30] scripts: apibuild: add parsing variable's comments

2022-04-20 Thread Victor Toso
scripts/apibuild.py did not consider exporting external variable's comments into the XML API. This commits fixes that. Noe that the way that CParser is designed, it is currently possible to lose a parsed comment when parsing other fields as self.comment in several places. I've added a comment to

[PATCH v3 28/30] scripts: apibuild: factor out comment cleaning

2022-04-20 Thread Victor Toso
So we can use for comments that are being hold in helper variables. Signed-off-by: Victor Toso --- scripts/apibuild.py | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index ec10931151..151eba37e6 100755 ---

[PATCH v3 26/30] scripts: apibuild: parse 'Since' for macros

2022-04-20 Thread Victor Toso
This patch adds 'version' parameter to the generated XML API for macros It'll require, for new additions, to add a comment with the version that the macro was added. An example bellow of code diff and the change in the generated XML. Note that the Since tag is removed from the comment as there

[PATCH v3 25/30] scripts: apibuild: parse 'Since' for typedefs

2022-04-20 Thread Victor Toso
This patch adds 'version' parameter to the generated XML API for typedefs It'll require, for new additions, to add a comment with the version that the typedef value was added. An example bellow of code diff and the change in the generated XML. Note that the Since tag is removed from the comment

[PATCH v3 23/30] scripts: apibuild: parse 'Since' version for enums

2022-04-20 Thread Victor Toso
This patch adds 'version' parameter to the generated XML API for enums. It'll require, for new additions, to add a comment with the version that the enum value was added. Note that the Since tag is removed from the comment as there is a proper field for it in the XML. Signed-off-by: Victor Toso

[PATCH v3 22/30] docstring: Fix and append Since to virDomainVcpuFlags

2022-04-20 Thread Victor Toso
This commit is similar to "docs: Fix generated documentation of virConnectListAllNodeDeviceFlags", check it out for more info. Signed-off-by: Victor Toso --- include/libvirt/libvirt-domain.h | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git

[PATCH v3 15/30] docstring: function: lxc: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given function was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- src/libvirt-lxc.c | 12 1 file changed, 12 insertions(+) diff --git a/src/libvirt-lxc.c b/src/libvirt-lxc.c

[PATCH v3 21/30] docstring: Fix and append Since to virDomainMemoryModFlags

2022-04-20 Thread Victor Toso
This commit is similar to "docs: Fix generated documentation of virConnectListAllNodeDeviceFlags", check it out for more info. Signed-off-by: Victor Toso --- include/libvirt/libvirt-domain.h | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git

[PATCH v3 12/30] docstring: typedef: admin:: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given typedef was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-admin.h | 24 1 file changed, 24 insertions(+) diff --git

[PATCH v3 17/30] docstring: libvirt-common: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Similarly to previous commits but with the targeting libvirt-common in a batch. Either create or append to existing docstring, the version (git tag) that a given typedef, enum value, macro or function was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso ---

[PATCH v3 19/30] docstring: Fix and append Since to virConnectListAllStoragePoolsFlags

2022-04-20 Thread Victor Toso
This commit is similar to "docs: Fix generated documentation of virConnectListAllNodeDeviceFlags", check it out for more info. Signed-off-by: Victor Toso --- include/libvirt/libvirt-storage.h | 49 +++ 1 file changed, 24 insertions(+), 25 deletions(-) diff --git

[PATCH v3 18/30] docstring: Fix generated documentation of virStorageVolInfoFlags

2022-04-20 Thread Victor Toso
This commit is similar to "docs: Fix generated documentation of virConnectListAllNodeDeviceFlags", check it out for more info. Using git diff --word-diff to show the fixed output xml (redacted). -] {+type='virStorageVolInfoFlags' version='3.0.0' info='Return the physical size in

[PATCH v3 11/30] docstring: typedef: qemu:: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given typedef was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-qemu.h | 18 ++ 1 file changed, 18 insertions(+) diff --git

[PATCH v3 14/30] docstring: function: qemu: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given function was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-qemu.h | 3 +++ src/libvirt-qemu.c | 18 ++ 2 files changed, 21

[PATCH v3 09/30] docstring: macros: admin: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given macro was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-admin.h | 60 + 1 file changed, 60 insertions(+) diff --git

[PATCH v3 07/30] docstring: enums: admin: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given enum value was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-admin.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v3 08/30] docstring: macros: libvirt: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given macro was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-domain.h | 663 +- include/libvirt/libvirt-host.h| 123 ++

[PATCH v3 06/30] docstring: enums: qemu: Add 'Since version' metadata

2022-04-20 Thread Victor Toso
Either create or append to existing docstring, the version (git tag) that a given enum value was introduced in the format: Since: v1.2.3 Signed-off-by: Victor Toso --- include/libvirt/libvirt-qemu.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH v3 04/30] docstring: variable: Move docstring from source to header file

2022-04-20 Thread Victor Toso
virConnectAuthPtrDefault is the only variable that we export and with the documentation being at the C file, it makes harder to find it. With this patch, the documentation of this variable can be found by those who look at the header file for guidance plus, it will also be included in the XML

[PATCH v3 03/30] docstring: Fix generated documentation of virConnectListAllNodeDeviceFlags

2022-04-20 Thread Victor Toso
scripts/apibuild.py does not handle well enum's with comments between values. The outcome depends on whether the enum value has its own docstring or not and if there is spaces between the enum values or not. Either way, virConnectListAllNodeDeviceFlags documentation is explicit that this enum is

[PATCH v3 01/30] syntax-check: sc_prohibit_nonreentrant: skip comments

2022-04-20 Thread Victor Toso
It doesn't need to fail the test if a reentrant function is found in a comment. Fixes: | ... | prohibit_nonreentrant | libvirt/ci/helper:33:default=os.getlogin(), # exempt from syntax-check | libvirt/include/libvirt/libvirt-storage.h:223: VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 =

[PATCH v3 02/30] syntax-check: prohibit_virXXXFree: skip strings

2022-04-20 Thread Victor Toso
We should allow strings (not the functions) in the format of "virDomainFree" and friends. This fixes an error in latter commit "scripts: apibuild: parse 'Since' for functions" as it uses this function names as keys in a dictionary. Fixes: | ... | prohibit_virXXXFree |

[PATCH v3 00/30] Add 'version' to other exported types

2022-04-20 Thread Victor Toso
Hi, Here it comes, version 3. v1: https://listman.redhat.com/archives/libvir-list/2022-April/229881.html v2: https://listman.redhat.com/archives/libvir-list/2022-April/230097.html In this version, I have: - dropped the changes to .sym files (Peter, Daniel) - improved commit log:

[PATCH] apparmor: Allow swtpm to use its own apparmor profile

2022-04-20 Thread Daniel P . Berrangé
binj1uIU4i9EZ.bin Description: Binary data

Re: [PATCH 1/2] qemu_processpriv: Fix #error message

2022-04-20 Thread Michal Prívozník
On 4/14/22 16:44, Michal Privoznik wrote: > The point of qemu_processpriv.h file is to allow a small subset > of functions to be called from test suite but not elsewhere. This > is implemented by requiring everybody that includes the file to > define a macro. If not done so, an error is printed at

Re: virThread: why no return values permitted in thread API?

2022-04-20 Thread Daniel P . Berrangé
On Wed, Apr 20, 2022 at 02:24:39PM +0200, Claudio Fontana wrote: > Hi, > > I noticed that in the virThread API return values from threads are explicitly > excluded from the API. > > The "virThreadHelper" sits in the middle between the caller of > virThreadCreate and pthread, making it

Re: virThread: why no return values permitted in thread API?

2022-04-20 Thread Michal Prívozník
On 4/20/22 14:24, Claudio Fontana wrote: > Hi, > > I noticed that in the virThread API return values from threads are explicitly > excluded from the API. > > The "virThreadHelper" sits in the middle between the caller of > virThreadCreate and pthread, making it impossible to return a value

Re: virThread: why no return values permitted in thread API?

2022-04-20 Thread Daniel P . Berrangé
On Wed, Apr 20, 2022 at 02:33:19PM +0200, Peter Krempa wrote: > On Wed, Apr 20, 2022 at 14:24:39 +0200, Claudio Fontana wrote: > > Hi, > > > > I noticed that in the virThread API return values from threads are > > explicitly excluded from the API. > > > > The "virThreadHelper" sits in the

Re: [PATCH v2 1/8] Make NVRAM a virStorageSource type.

2022-04-20 Thread Peter Krempa
On Fri, Apr 08, 2022 at 10:48:44 -0700, Rohit Kumar wrote: > Currently, libvirt allows only local filepaths to specify > a NVRAM disk. Since, VMs can migrate across hosts, so making Note that this is not strictly needed for migration to work. In fact qemu migratest he contents of the nvram inside

Re: [PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Igor Mammedov
On Wed, 20 Apr 2022 14:13:00 +0200 Peter Krempa wrote: > On Wed, Apr 20, 2022 at 14:00:52 +0200, Igor Mammedov wrote: > > On Wed, 20 Apr 2022 12:21:03 +0100 > > Daniel P. Berrangé wrote: > > > > > On Wed, Apr 20, 2022 at 01:15:43PM +0200, Igor Mammedov wrote: > > > > On Wed, 20 Apr 2022

Re: virThread: why no return values permitted in thread API?

2022-04-20 Thread Peter Krempa
On Wed, Apr 20, 2022 at 14:24:39 +0200, Claudio Fontana wrote: > Hi, > > I noticed that in the virThread API return values from threads are explicitly > excluded from the API. > > The "virThreadHelper" sits in the middle between the caller of > virThreadCreate and pthread, making it impossible

virThread: why no return values permitted in thread API?

2022-04-20 Thread Claudio Fontana
Hi, I noticed that in the virThread API return values from threads are explicitly excluded from the API. The "virThreadHelper" sits in the middle between the caller of virThreadCreate and pthread, making it impossible to return a value from the thread, to check after joining the thread. I'd

Re: [PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Daniel P . Berrangé
On Wed, Apr 20, 2022 at 02:00:52PM +0200, Igor Mammedov wrote: > On Wed, 20 Apr 2022 12:21:03 +0100 > Daniel P. Berrangé wrote: > > > On Wed, Apr 20, 2022 at 01:15:43PM +0200, Igor Mammedov wrote: > > > On Wed, 20 Apr 2022 13:02:12 +0200 > > > Peter Krempa wrote: > > > > > > > Few minor

Re: [PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Peter Krempa
On Wed, Apr 20, 2022 at 14:00:52 +0200, Igor Mammedov wrote: > On Wed, 20 Apr 2022 12:21:03 +0100 > Daniel P. Berrangé wrote: > > > On Wed, Apr 20, 2022 at 01:15:43PM +0200, Igor Mammedov wrote: > > > On Wed, 20 Apr 2022 13:02:12 +0200 > > > Peter Krempa wrote: > > > > > > > Few minor

Re: [PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Igor Mammedov
On Wed, 20 Apr 2022 12:21:03 +0100 Daniel P. Berrangé wrote: > On Wed, Apr 20, 2022 at 01:15:43PM +0200, Igor Mammedov wrote: > > On Wed, 20 Apr 2022 13:02:12 +0200 > > Peter Krempa wrote: > > > > > Few minor changes in qemu since the last update: > > > - PIIX4_PM gained

Re: [PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Peter Krempa
On Wed, Apr 20, 2022 at 16:52:14 +0530, Ani Sinha wrote: > On Wed, Apr 20, 2022 at 4:46 PM Igor Mammedov wrote: > > > > On Wed, 20 Apr 2022 13:02:12 +0200 > > Peter Krempa wrote: > > > > > Few minor changes in qemu since the last update: > > > - PIIX4_PM gained 'x-not-migrate-acpi-index'

Re: [PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Peter Krempa
On Wed, Apr 20, 2022 at 13:15:43 +0200, Igor Mammedov wrote: > On Wed, 20 Apr 2022 13:02:12 +0200 > Peter Krempa wrote: > > > Few minor changes in qemu since the last update: > > - PIIX4_PM gained 'x-not-migrate-acpi-index' property > > do you do this for just for every new property? >

Re: Network disks and replacing qemu-block-curl|ssh with nbdkit

2022-04-20 Thread Peter Krempa
On Wed, Apr 20, 2022 at 09:52:34 +0100, Richard W.M. Jones wrote: > On Wed, Apr 20, 2022 at 09:36:29AM +0200, Peter Krempa wrote: > > I'll post patches to address that, but the question is whether we want > > to bother with actually supporting the password authentication or not, > > because the

Re: [PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Ani Sinha
On Wed, Apr 20, 2022 at 4:46 PM Igor Mammedov wrote: > > On Wed, 20 Apr 2022 13:02:12 +0200 > Peter Krempa wrote: > > > Few minor changes in qemu since the last update: > > - PIIX4_PM gained 'x-not-migrate-acpi-index' property > > do you do this for just for every new property? > (nothing

Re: [PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Daniel P . Berrangé
On Wed, Apr 20, 2022 at 01:15:43PM +0200, Igor Mammedov wrote: > On Wed, 20 Apr 2022 13:02:12 +0200 > Peter Krempa wrote: > > > Few minor changes in qemu since the last update: > > - PIIX4_PM gained 'x-not-migrate-acpi-index' property > > do you do this for just for every new property? >

Re: [PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Igor Mammedov
On Wed, 20 Apr 2022 13:02:12 +0200 Peter Krempa wrote: > Few minor changes in qemu since the last update: > - PIIX4_PM gained 'x-not-migrate-acpi-index' property do you do this for just for every new property? (nothing outside of QEMU needs to know about x-not-migrate-acpi-index, unless one

[PATCH] tests: qemucapabilities: Update qemu caps dump for the qemu-7.0.0 release on x86_64

2022-04-20 Thread Peter Krempa
Few minor changes in qemu since the last update: - PIIX4_PM gained 'x-not-migrate-acpi-index' property - 'cocoa' display and corresponding props (not present in this build) Changes in build: - dbus display driver re-enabled - gtk display support re-disabled - xen support

Re: [PATCH] apparmor: Allow swtpm to use its own apparmor profile

2022-04-20 Thread Christian Ehrhardt
On Tue, Apr 19, 2022 at 7:28 PM Lena Voytek wrote: Hi Lena, the code is fine - I can confirm that this works well in Ubuntu 22.04 already. But we should add a non-empty commit message here. Just outline that this is needed when swtpm itself runs under a profile called "swtpm". And maybe

Re: [RFC PATCH v1 0/5] Add virDomainGetSevAttestationReport API

2022-04-20 Thread Daniel P . Berrangé
On Thu, Apr 14, 2022 at 02:46:38PM -0400, Tyler Fanelli wrote: > On 4/11/22 10:57 AM, Cole Robinson wrote: > > On 3/23/22 3:36 PM, Tyler Fanelli wrote: > > > This an RFC discussing a new API, virDomainGetSevAttestationReport (along > > > with a > > > virsh command "domgetsevreport"), with initial

Re: [PATCH v2 32/34] syms: admin: Add sections to match when API was introduced

2022-04-20 Thread Daniel P . Berrangé
On Tue, Apr 19, 2022 at 03:26:45PM +0200, Peter Krempa wrote: > On Thu, Apr 14, 2022 at 22:47:43 +0200, Victor Toso wrote: > > Discover this mismatch with the docstring work. > > scripts/apibuild.py complained. > > > > Signed-off-by: Victor Toso > > --- > > src/admin/libvirt_admin_public.syms |

Re: Network disks and replacing qemu-block-curl|ssh with nbdkit

2022-04-20 Thread Richard W.M. Jones
On Wed, Apr 20, 2022 at 09:36:29AM +0200, Peter Krempa wrote: > I'll post patches to address that, but the question is whether we want > to bother with actually supporting the password authentication or not, > because the simpler approach to fixing the bug is to simply allow it. Did you mean:

Re: Network disks and replacing qemu-block-curl|ssh with nbdkit

2022-04-20 Thread Peter Krempa
On Tue, Apr 19, 2022 at 15:00:58 -0500, Jonathon Jongsma wrote: > On 4/19/22 12:31 PM, Richard W.M. Jones wrote: > > On Tue, Apr 19, 2022 at 11:40:49AM -0500, Jonathon Jongsma wrote: > > > Well, As far as I can tell, there is no valid XML for exercising > > > http auth. The schema for http(s)

Re: Network disks and replacing qemu-block-curl|ssh with nbdkit

2022-04-20 Thread Peter Krempa
On Tue, Apr 19, 2022 at 22:30:51 +0100, Richard W.M. Jones wrote: > On Tue, Apr 19, 2022 at 03:00:58PM -0500, Jonathon Jongsma wrote: > > On 4/19/22 12:31 PM, Richard W.M. Jones wrote: [..] > > >Now actual support for protocol='ssh' (as in, the main drive, not only > > >in the backing chain),