[libvirt PATCH 2/4] conf: use virXMLFormatElementDirect

2025-03-06 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 4 ++-- src/conf/node_device_conf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f42b7075ad..94f456a362 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/

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

2025-03-06 Thread Alexander Shursha
Martin Kletzander writes: > I understand you are switching to libpciaccess APIs from our manual > handling of PCI devices. That does have the added benefit of working on > FreeBSD, but adds a new dependency where it might not have been. That > is probably fine, but some more explanation and rea

Re: [libvirt] [PATCH] Fix python error reporting for some storage operations

2025-03-06 Thread Sunniva Balkonkraftwerk
Ein Balkonkraftwerk komplettset kaufen ist die beste Wahl für alle, die eine einfache und schnelle Installation bevorzugen. Diese Sets enthalten alle notwendigen Komponenten und sind oft preislich attraktiv. Mit einem Balkonkraftwerk komplettset sparen Sie Zeit und Mühe. https://vendomnia.com/ba

[PATCH 1/5] conf: Introduce os/shim element

2025-03-06 Thread Michal Privoznik
For secure boot environments where is signed, it may be unfeasible to keep the binary up to date (esp. when revoking certificates contained within). To address that, QEMU introduced '-shim' cmd line option which side loads another UEFI binary which can then contain new certification authorities or

[PATCH 0/5] Introduce UEFI shim support

2025-03-06 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (5): conf: Introduce os/shim element qemu_capabilities: Introduce QEMU_CAPS_MACHINE_SHIM qemu_validate: Check whether UEFI shim is supported qemu_command: Generate cmd line for UEFI shim security: Set seclabels on UEFI shim docs/formatdomain.rst

[PATCH 5/5] security: Set seclabels on UEFI shim

2025-03-06 Thread Michal Privoznik
Again, trivial. Just copy what is done for kernel and initrd. Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 10 ++ src/security/security_selinux.c | 9 + src/security/virt-aa-helper.c | 4 3 files changed, 23 insertions(+) diff --git a/src/securi

[PATCH 2/5] qemu_capabilities: Introduce QEMU_CAPS_MACHINE_SHIM

2025-03-06 Thread Michal Privoznik
In its commit v9.2.0-323-ga5bd044b15 QEMU introduced another command line option: -shim. It's used to load kernel. Track presence of it via QEMU_CAPS_MACHINE_SHIM. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

[PATCH 2/2] ch: preserve last error before stop fix

2025-03-06 Thread Kirill Shchetiniuk
Add last meaningful error preservation to virCHProcessStop. Signed-off-by: Kirill Shchetiniuk --- src/ch/ch_process.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index 9a85f7869e..38d466eaeb 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_

[PATCH 0/2] ch: minor fixes - segfault fix and error preserving

2025-03-06 Thread Kirill Shchetiniuk
*** BLURB HERE *** Kirill Shchetiniuk (2): ch: memory (segmentation fault) fix ch: preserve last error before stop fix src/ch/ch_events.c | 6 +++--- src/ch/ch_process.c | 6 ++ 2 files changed, 9 insertions(+), 3 deletions(-) -- 2.48.1

[PATCH 1/2] ch: memory (segmentation fault) fix

2025-03-06 Thread Kirill Shchetiniuk
Move monitor object unreference from virCHStartEventHandler to virCHEventHandlerLoop. Put VM unreference after debug print in virCHEventHandlerLoop. Signed-off-by: Kirill Shchetiniuk --- src/ch/ch_events.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ch/ch_events

[libvirt PATCH 07/16] domain_conf: graphics: extract Desktop formatting to separate function

2025-03-06 Thread Pavel Hrdina
virDomainGraphicsDefFormat function was way too long so split it into separate functions for each graphics type. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_

Re: [PATCH 16/19] src: add constants for domain stats 'memory.' parameters

2025-03-06 Thread Peter Krempa
On Tue, Mar 04, 2025 at 14:04:11 +, Daniel P. Berrangé wrote: > Contrary to most APIs returning typed parameters, there are no constants > defined for the domain stats data keys. This is was because many of the > keys needs to be dynamically constructed using one or more array index > values. >

Re: [PATCH 17/19] src: add constants for domain stats 'dirtyrate.' parameters

2025-03-06 Thread Peter Krempa
On Tue, Mar 04, 2025 at 14:04:12 +, Daniel P. Berrangé wrote: > Contrary to most APIs returning typed parameters, there are no constants > defined for the domain stats data keys. This is was because many of the > keys needs to be dynamically constructed using one or more array index > values. >

[PATCH pushed] domain_caps: Don't leak 'cpu0_id' in 'virSEVCapabilitiesFree'

2025-03-06 Thread Peter Krempa
Freeing the 'virSEVCapability' object leaked the 'cpu0_id' field since its introduction. Fixes: 0236e6154c46603bc443eda2f05c8ce511c55b08 Signed-off-by: Peter Krempa --- Trivial and fixed build. src/conf/domain_capabilities.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/domain_c

Re: [PATCH 18/19] src: add constants for domain stats 'dirtyrate.' parameters

2025-03-06 Thread Peter Krempa
On Tue, Mar 04, 2025 at 14:04:13 +, Daniel P. Berrangé wrote: > Contrary to most APIs returning typed parameters, there are no constants > defined for the domain stats data keys. This is was because many of the > keys needs to be dynamically constructed using one or more array index > values. >

Re: [PATCH 19/19] src: document that no constants are provided for custom VM stats

2025-03-06 Thread Peter Krempa
On Tue, Mar 04, 2025 at 14:04:14 +, Daniel P. Berrangé wrote: > Contrary to most APIs returning typed parameters, there are no constants > defined for the domain stats data keys. This is was because many of the > keys needs to be dynamically constructed using one or more array index > values. >

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

2025-03-06 Thread Anthony Harivel
Hi, The enhancement in this new version based on last feedback are: * add more documentation on limitation of the feature * no more double check of the vmsr socket, once is enough * virQEMUBuildBufferEscapeComma() is used for user input Path Because there is no garantie at the moment that the he

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

2025-03-06 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 11/19] src: add constants for domain stats 'vcpu.' parameters

2025-03-06 Thread Peter Krempa
On Tue, Mar 04, 2025 at 14:04:06 +, Daniel P. Berrangé wrote: > Contrary to most APIs returning typed parameters, there are no constants > defined for the domain stats data keys. This is was because many of the > keys needs to be dynamically constructed using one or more array index > values. >

Re: [PATCH 12/19] src: add constants for domain stats 'net.' parameters

2025-03-06 Thread Peter Krempa
On Tue, Mar 04, 2025 at 14:04:07 +, Daniel P. Berrangé wrote: > Contrary to most APIs returning typed parameters, there are no constants > defined for the domain stats data keys. This is was because many of the > keys needs to be dynamically constructed using one or more array index > values. >

Re: [PATCH] Fix a typo in docs/formatdomain.rst

2025-03-06 Thread Laine Stump
On 3/5/25 9:11 PM, Yalan Zhang wrote: Hi Laine, The setting will be ignored after  "virsh define" or when you save after "virsh edit". Do you think it is a bug? Yes, that is a bug. I'll look into it in a bit. Thanks for pointing it out (I could have sworn I included that in the tests, but

[libvirt PATCH 03/16] domain_conf: modernize graphics formatting

2025-03-06 Thread Pavel Hrdina
Use separate buffers for attributes and children elements to make the code cleaner and to use the virXMLFormatElement() function. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 235 - 1 file changed, 92 insertions(+), 143 deletions(-) diff --git

[libvirt PATCH 04/16] domain_conf: graphics: extract VNC formatting to separate function

2025-03-06 Thread Pavel Hrdina
virDomainGraphicsDefFormat function was way too long so split it into separate functions for each graphics type. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 131 ++--- 1 file changed, 71 insertions(+), 60 deletions(-) diff --git a/src/conf/domain

[libvirt PATCH 02/16] domain_conf: graphics: use a function to format audio element

2025-03-06 Thread Pavel Hrdina
Removes code duplication. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 850fe7e90b..a0e68d6046 100644 --- a/src/conf/domain_conf.c +++ b/src/conf

[libvirt PATCH 06/16] domain_conf: graphics: extract RDP formatting to separate function

2025-03-06 Thread Pavel Hrdina
virDomainGraphicsDefFormat function was way too long so split it into separate functions for each graphics type. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 42 +- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/src/conf/domain

Re: [PATCH 13/19] src: add constants for domain stats 'block.' parameters

2025-03-06 Thread Peter Krempa
On Tue, Mar 04, 2025 at 14:04:08 +, Daniel P. Berrangé wrote: > Contrary to most APIs returning typed parameters, there are no constants > defined for the domain stats data keys. This is was because many of the > keys needs to be dynamically constructed using one or more array index > values. >

Re: [PATCH 12/19] src: add constants for domain stats 'net.' parameters

2025-03-06 Thread Daniel P . Berrangé
On Thu, Mar 06, 2025 at 03:47:00PM +0100, Peter Krempa wrote: > On Tue, Mar 04, 2025 at 14:04:07 +, Daniel P. Berrangé wrote: > > Contrary to most APIs returning typed parameters, there are no constants > > defined for the domain stats data keys. This is was because many of the > > keys needs t

Re: [PATCH 15/19] src: add constants for domain stats 'iothread.' parameters

2025-03-06 Thread Peter Krempa
On Tue, Mar 04, 2025 at 14:04:10 +, Daniel P. Berrangé wrote: > Contrary to most APIs returning typed parameters, there are no constants > defined for the domain stats data keys. This is was because many of the > keys needs to be dynamically constructed using one or more array index > values. >

Re: [PATCH 2/2] ch: preserve last error before stop fix

2025-03-06 Thread Peter Krempa
On Thu, Mar 06, 2025 at 11:27:08 +0100, Kirill Shchetiniuk wrote: > Add last meaningful error preservation to virCHProcessStop. > > Signed-off-by: Kirill Shchetiniuk > --- > src/ch/ch_process.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/ch/ch_process.c b/src/ch/ch_proces

[libvirt PATCH 01/16] domain_conf: graphics: use a function to format gl element

2025-03-06 Thread Pavel Hrdina
Removes code duplication. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 39 +-- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f42b7075ad..850fe7e90b 100644 --- a/src/conf/domain

Re: [PATCH] qemu: snapshot: Remove dead code in qemuSnapshotDeleteBlockJobFinishing()

2025-03-06 Thread Martin Kletzander
On Wed, Jan 22, 2025 at 05:14:31PM +0300, Alexander Kuznetsov wrote: qemuSnapshotDeleteBlockJobFinishing() returns only 0 and 1. Convert it to bool and remove the dead code handling -1 return in the caller. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Reported-

Re: [PATCH 1/2] ch: memory (segmentation fault) fix

2025-03-06 Thread Peter Krempa
On Thu, Mar 06, 2025 at 11:27:07 +0100, Kirill Shchetiniuk wrote: > Move monitor object unreference from virCHStartEventHandler > to virCHEventHandlerLoop. Put VM unreference after debug > print in virCHEventHandlerLoop. Please use the commit message mainly to describe the problem you're fixiing.

[libvirt PATCH 15/16] domain_conf: graphics: fix error messages when formatting XML

2025-03-06 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 27323ea768..6bb30c6f22 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -26433,7 +26433,7 @@ virD

Re: [PATCH v2 3/7] src: introduce 'raw' and 'rawset' ACPI table types

2025-03-06 Thread Daniel P . Berrangé
CC Marek who did the original libxl integration of 'type=slic' mapping to Xen's 'acpi_firmware' property. Marek, this introduces a new 'rawset' ACPI type for direct passthrough of ACPI table lists, which is intended to match Xen's semantics exactly. The later patch in this series changes the lib

[libvirt PATCH v2] qemu: snapshot: error out early when reverting snapshot for VM with non-file disk

2025-03-06 Thread Pavel Hrdina
Before this patch the code would start the revert process by destroying the VM and preparing to revert where it would fail with following error: error: unsupported configuration: source for disk 'sdb' is not a regular file; refusing to generate external snapshot name and leaving user with of

Re: [PATCH 1/2] ch: memory (segmentation fault) fix

2025-03-06 Thread kshcheti
> > Please use the commit message mainly to describe the problem you're > fixiing. You only described what you changed; not why. > Thank you for your feedback, next time will keep it mind. > > and it is weird because you do unref it here ... > This unref executes in case of any failure during

[libvirt PATCH 16/16] domain_conf: graphics: properly escape user provided strings when formatting XML

2025-03-06 Thread Pavel Hrdina
This was reported on virt-manager issue tracker as it was possible to provide `listen` attribute with properly escaped characters but libvirt would format XML without escaping it. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

Re: [PATCH v1 2/3] qemu_driver: Implement qemuDomainSetVcpuTuneParameters

2025-03-06 Thread Peter Krempa
On Sat, Feb 15, 2025 at 16:35:52 +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > Support hotplug/hotunplug of virtual CPU by wrapping the > existing interface qemuDomainSetVcpu. > > Signed-off-by: Hyman Huang > --- > include/libvirt/libvirt-domain.h | 12 > src/qemu/qe

Re: [PATCH 0/5] Introduce UEFI shim support

2025-03-06 Thread Pavel Hrdina
On Thu, Mar 06, 2025 at 09:36:13AM +0100, Michal Privoznik wrote: > *** BLURB HERE *** > > Michal Prívozník (5): > conf: Introduce os/shim element > qemu_capabilities: Introduce QEMU_CAPS_MACHINE_SHIM > qemu_validate: Check whether UEFI shim is supported > qemu_command: Generate cmd line f

[libvirt PATCH 4/4] util: virxml: unexport virXMLFormatElementInternal

2025-03-06 Thread Pavel Hrdina
It is no longer used anywhere else. Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 - src/util/virxml.c| 2 +- src/util/virxml.h| 7 --- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index e9dde

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

2025-03-06 Thread Collin Walling
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. By default, only models reported as usable by the hypervisor on the host system are printed. User may specify "--all" to also print

[libvirt PATCH 0/4] introduce and use virXMLFormatElementDirect

2025-03-06 Thread Pavel Hrdina
Pavel Hrdina (4): util: virxml: introduce virXMLFormatElementDirect conf: use virXMLFormatElementDirect domain_conf: refactor virDomainLoaderDefFormatNvram util: virxml: unexport virXMLFormatElementInternal src/conf/domain_conf.c | 22 ++ src/conf/node_device_conf

Re: [PATCH RFC] util: pick a better runtime directory when XDG_RUNTIME_DIR isn't set

2025-03-06 Thread Laine Stump
On 2/18/25 12:21 PM, Daniel P. Berrangé wrote: On Tue, Feb 18, 2025 at 02:50:52PM +, Daniel P. Berrangé wrote: On Tue, Feb 18, 2025 at 09:33:43AM -0500, Laine Stump wrote: On 2/18/25 4:26 AM, Daniel P. Berrangé wrote: On Mon, Feb 17, 2025 at 03:11:56PM -0500, Laine Stump wrote: On 2/17/25