[PATCH v4 1/2] virDomainVirtioSerialAddrAssign: Fix virtio console port assignment on vioserial bus

2025-05-22 Thread Aaron M. Brown
This change fixes an issue with virito console port assignment on vioserial buses. Currently, a virtio console device cannot be assigned to a port greater than 0 on vioserial buses. When trying to add more than one virtio console device on a single vioserial bus, you will get a port already exis

[PATCH v4 2/2] domain_addr.c: Update console port reservation comment and allowZero variable for clarity

2025-05-22 Thread Aaron M. Brown
Reviewed-by: Boris Fiuczynski Signed-off-by: Aaron M. Brown --- src/conf/domain_addr.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index bc2b0f50e8..86f5cfc337 100644 --- a/src/conf/domain_addr.c +++ b

[PATCH v4 0/2] Fix virtio console port assignment issue

2025-05-22 Thread Aaron M. Brown
Changelog: --- v4: - Update commit messages --- v3: - Added Reviewed-By - Included CI Results Link --- v2: - Split patch into two commits - Added fixes tag --- This libvirt patch does the following: 1. fixes an issue with virtio console device port assignment on vioserial buses 2. updates co

Re: [PATCH 4/7] libvirt_nss: Use automatic memory freeing

2025-05-22 Thread Peter Krempa via Devel
On Thu, May 22, 2025 at 15:09:24 +0200, Michal Prívozník wrote: > On 5/22/25 15:00, Peter Krempa wrote: > > On Thu, May 22, 2025 at 14:25:14 +0200, Michal Privoznik via Devel wrote: > >> From: Michal Privoznik > >> > >> Signed-off-by: Michal Privoznik > >> --- > >> tools/nss/libvirt_nss.c | 15 +

Re: [PATCH 6/7] libvirt_nss: Allocate buffer in ERROR() dynamically

2025-05-22 Thread Ján Tomko via Devel
On a Thursday in 2025, Michal Privoznik via Devel wrote: From: Michal Privoznik So far, inside of the ERROR() macro there's pretty large buffer allocated on the stack (for use by strerror_r()). Problem is, with our current stack size limit of 2048 bytes we may come pretty close to the limit or

Re: [PATCH 3/7] nss: Declare g_autofree and g_steal_pointer() macros

2025-05-22 Thread Daniel P . Berrangé via Devel
On Thu, May 22, 2025 at 03:19:18PM +0200, Peter Krempa via Devel wrote: > On Thu, May 22, 2025 at 14:25:13 +0200, Michal Privoznik via Devel wrote: > > From: Michal Privoznik > > > > While we do not want the nss plugin to link with anything but > > necessary libs (libc and libjson-c) it can benef

Re: [PATCH 3/7] nss: Declare g_autofree and g_steal_pointer() macros

2025-05-22 Thread Peter Krempa via Devel
On Thu, May 22, 2025 at 15:22:14 +0200, Michal Prívozník wrote: > On 5/22/25 15:19, Peter Krempa wrote: > > On Thu, May 22, 2025 at 14:25:13 +0200, Michal Privoznik via Devel wrote: > >> From: Michal Privoznik > >> > >> While we do not want the nss plugin to link with anything but > >> necessary l

Re: [PATCH 3/7] nss: Declare g_autofree and g_steal_pointer() macros

2025-05-22 Thread Peter Krempa via Devel
On Thu, May 22, 2025 at 14:25:13 +0200, Michal Privoznik via Devel wrote: > From: Michal Privoznik > > While we do not want the nss plugin to link with anything but > necessary libs (libc and libjson-c) it can benefit from automatic > memory freeing. Instead of inventing macros with new name for

Re: [PATCH 3/7] nss: Declare g_autofree and g_steal_pointer() macros

2025-05-22 Thread Michal Prívozník via Devel
On 5/22/25 15:19, Peter Krempa wrote: > On Thu, May 22, 2025 at 14:25:13 +0200, Michal Privoznik via Devel wrote: >> From: Michal Privoznik >> >> While we do not want the nss plugin to link with anything but >> necessary libs (libc and libjson-c) it can benefit from automatic >> memory freeing. In

Re: [PATCH 0/7] nss: Couple of fixes and small improvements

2025-05-22 Thread Jiri Denemark via Devel
On Thu, May 22, 2025 at 14:25:10 +0200, Michal Privoznik wrote: > I've noticed most of these after I've turned on debugging for the NSS > plugin: > > diff --git i/tools/nss/libvirt_nss.h w/tools/nss/libvirt_nss.h > index 54a0216013..f9c3136985 100644 > --- i/tools/nss/libvirt_nss.h > +++ w/tools/n

Re: [PATCH 4/7] libvirt_nss: Use automatic memory freeing

2025-05-22 Thread Michal Prívozník via Devel
On 5/22/25 15:00, Peter Krempa wrote: > On Thu, May 22, 2025 at 14:25:14 +0200, Michal Privoznik via Devel wrote: >> From: Michal Privoznik >> >> Signed-off-by: Michal Privoznik >> --- >> tools/nss/libvirt_nss.c | 15 +-- >> 1 file changed, 5 insertions(+), 10 deletions(-) > > IIRC

Re: [PATCH 4/7] libvirt_nss: Use automatic memory freeing

2025-05-22 Thread Peter Krempa via Devel
On Thu, May 22, 2025 at 14:25:14 +0200, Michal Privoznik via Devel wrote: > From: Michal Privoznik > > Signed-off-by: Michal Privoznik > --- > tools/nss/libvirt_nss.c | 15 +-- > 1 file changed, 5 insertions(+), 10 deletions(-) IIRC the nss plugin was meant to be kept free of both

Re: [PATCH] virsh: Do not print warnings with "error:" prefix

2025-05-22 Thread Ján Tomko via Devel
On a Thursday in 2025, Jiri Denemark via Devel wrote: From: Jiri Denemark Both vshWarn and vshError are just wrappers around vshPrintStderr which properly propagates the message level to the log, but fails to honor it when printing on stderr. https://issues.redhat.com/browse/RHEL-79460 Signed

[PATCH 6/7] libvirt_nss: Allocate buffer in ERROR() dynamically

2025-05-22 Thread Michal Privoznik via Devel
From: Michal Privoznik So far, inside of the ERROR() macro there's pretty large buffer allocated on the stack (for use by strerror_r()). Problem is, with our current stack size limit of 2048 bytes we may come pretty close to the limit or even overshoot it, e.g. in aiforaf() where the function its

[PATCH 7/7] libvirt_nss: Allocate buffer in aiforaf() dynamically

2025-05-22 Thread Michal Privoznik via Devel
From: Michal Privoznik While we were trying to decrease stack usage of some functions, in v9.8.0-rc1~217 we introduced a couple of internal blocks to the aiforaf() and declared some variables inside those blocks hoping the compiler will reuse the stack for each block. While in general this might

[PATCH 5/7] libvirt_nss: Drop needless cleanup labels

2025-05-22 Thread Michal Privoznik via Devel
From: Michal Privoznik After previous cleanup, some labels were rendered pointless. Drop them. Signed-off-by: Michal Privoznik --- tools/nss/libvirt_nss.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c ind

[PATCH 4/7] libvirt_nss: Use automatic memory freeing

2025-05-22 Thread Michal Privoznik via Devel
From: Michal Privoznik Signed-off-by: Michal Privoznik --- tools/nss/libvirt_nss.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c index 25e2ec0642..8460b63228 100644 --- a/tools/nss/libvirt_nss.c +++ b/tools

[PATCH 1/7] libvirt_nss_macs: Fix type of @len in findMACsFromJSON()

2025-05-22 Thread Michal Privoznik via Devel
From: Michal Privoznik Inside of findMACsFromJSON(), the retval of json_object_array_length() is stored in a variable that's type of int. But the function is declared to return size_t: /usr/include/json-c/json_object.h:JSON_EXPORT size_t json_object_array_length(const struct json_object *obj)

[PATCH 3/7] nss: Declare g_autofree and g_steal_pointer() macros

2025-05-22 Thread Michal Privoznik via Devel
From: Michal Privoznik While we do not want the nss plugin to link with anything but necessary libs (libc and libjson-c) it can benefit from automatic memory freeing. Instead of inventing macros with new name for them, lets stick with g_autofree and g_steal_pointer() which we are used to from the

[PATCH 2/7] nss: Add missing includes for gai_strerror()

2025-05-22 Thread Michal Privoznik via Devel
From: Michal Privoznik There are two places where gai_strerror() is called but neither of them includes all necessary header files as documented in its manpage. Fortunately, both calls occur in ERROR() macro which by default does nothing - hence we don't see any compilation errors. Signed-off-by

[PATCH 0/7] nss: Couple of fixes and small improvements

2025-05-22 Thread Michal Privoznik via Devel
I've noticed most of these after I've turned on debugging for the NSS plugin: diff --git i/tools/nss/libvirt_nss.h w/tools/nss/libvirt_nss.h index 54a0216013..f9c3136985 100644 --- i/tools/nss/libvirt_nss.h +++ w/tools/nss/libvirt_nss.h @@ -35 +35 @@ -#if 0 +#if 1 Michal Prívozník (7): libvirt_

[PATCH] virsh: Do not print warnings with "error:" prefix

2025-05-22 Thread Jiri Denemark via Devel
From: Jiri Denemark Both vshWarn and vshError are just wrappers around vshPrintStderr which properly propagates the message level to the log, but fails to honor it when printing on stderr. https://issues.redhat.com/browse/RHEL-79460 Signed-off-by: Jiri Denemark --- tools/vsh.c | 6 +- 1 f

Re: [PATCH v5 0/5] Adding POWER11 CPU Support

2025-05-22 Thread Ján Tomko via Devel
On a Tuesday in 2025, Narayana Murty N wrote: This patch series introduces the necessary changes to support the POWER11 CPU and POWER11 host in libvirt. Additionally, it updates the QEMU capabilities with the latest QEMU version v10.0.0 to include power11 in the capabilities tests.During testing

Re: [PATCH v3 3/3] qemu: process: disable deprecated features for s390 models by default

2025-05-22 Thread Boris Fiuczynski
Reviewed-by: Boris Fiuczynski On 5/22/25 08:03, Collin Walling wrote: To ease the user with defining a guest with a migratable CPU model, let's disable the deprecated features from the get-go. If these features are still desired, they may be reenabled via the deprecated_features='on' attribute

Re: [PATCH v3 2/3] qemu: process: refactor deprecated features code

2025-05-22 Thread Boris Fiuczynski
Reviewed-by: Boris Fiuczynski On 5/22/25 08:03, Collin Walling wrote: Group up the deprecated features code into a single block to keep things clean; only check if the deprecated_features attribute is present once and then do relevent work. Signed-off-by: Collin Walling --- src/qemu/qemu_pr

Re: [PATCH v3 1/3] qemu: caps: add virCPUFeaturePolicy param to virQEMUCapsUpdateCPUDeprecatedFeatures

2025-05-22 Thread Boris Fiuczynski
Besides the nit below Reviewed-by: Boris Fiuczynski On 5/22/25 08:03, Collin Walling wrote: Currently, virQEMUCapsUpdateCPUDeprecatedFeatures only allows for disabling deprecated features. This locks the deprecated_features attribute to only do something if set to 'off'. Let's add a virCPUFea

Re: [PATCH v5 5/5] cpu_ppc64: Add POWER11 host-model support

2025-05-22 Thread Shivaprasad G Bhat
On 5/13/25 1:13 PM, Narayana Murty N wrote: This patch adds POWER11 CPU host-model support in libvirt's ppc64 CPU driver. With this addition, guests using CPU mode 'host-model' can specify POWER11 as the CPU model and have libvirt handle it correctly. With this change, libvirt can generate corre

Re: [PATCH v5 4/5] cpu_map: Add POWER11 CPU model support

2025-05-22 Thread Shivaprasad G Bhat
On 5/13/25 1:13 PM, Narayana Murty N wrote: Add support for the POWER11 CPU model in libvirt ppc64 CPU map. This allows libvirt to recognize and handle guests that specify POWER11 as the target CPU model when running on recent Power systems supporting this architecture. The addition includes: -

Re: [PATCH] docs: domain: Explain supported options of 'error_policy'

2025-05-22 Thread Ján Tomko via Devel
On a Wednesday in 2025, Peter Krempa via Devel wrote: From: Peter Krempa Explain what the individual settings actually result in. The changes are based on the paraprhase of qemu documentation which in 'qemu-options.hx' states: ``werror=action,rerror=action`` Specify which action to take