[PATCH 2/7] qemuxmlconftest: x86_64: Drop explicit use of '2.12' machine type

2025-07-04 Thread Peter Krempa via Devel
From: Peter Krempa New qemu will be deprecating them. Drop the use from test files not depending on the actual machine type. Signed-off-by: Peter Krempa --- .../qemuxmlconfdata/tpm-emulator-crb-profile.x86_64-latest.args | 2 +- tests/qemuxmlconfdata/tpm-emulator-crb-profile.xml |

[PATCH 0/7] qemu-10.1 test data and dropped machine type cleanups

2025-07-04 Thread Peter Krempa via Devel
Peter Krempa (7): qemuxmlconftest: x86_64: Drop explicit use of '2.10' machine type qemuxmlconftest: x86_64: Drop explicit use of '2.12' machine type qemuxmlconftest: x86_64: Drop explicit use of '2.5' machine type qemuxmlconftest: x86_64: Drop explicit use of '2.9' machine type qemuxmlco

[PATCH 1/7] qemuxmlconftest: x86_64: Drop explicit use of '2.10' machine type

2025-07-04 Thread Peter Krempa via Devel
From: Peter Krempa New qemu will be deprecating them. Drop the use from test files not depending on the actual machine type. Signed-off-by: Peter Krempa --- tests/qemuxmlconfdata/tseg-explicit-size.x86_64-latest.args | 2 +- tests/qemuxmlconfdata/tseg-explicit-size.x86_64-latest.xml | 2 +- t

[PATCH 3/7] qemuxmlconftest: x86_64: Drop explicit use of '2.5' machine type

2025-07-04 Thread Peter Krempa via Devel
From: Peter Krempa New qemu will be deprecating them. Drop the use from test files not depending on the actual machine type. Signed-off-by: Peter Krempa --- .../pc-i440fx-acpi-root-hotplug-disable.x86_64-latest.args | 2 +- tests/qemuxmlconfdata/pc-i440fx-acpi-root-hotplug-disable.xml |

[PATCH 4/7] qemuxmlconftest: x86_64: Drop explicit use of '2.9' machine type

2025-07-04 Thread Peter Krempa via Devel
From: Peter Krempa New qemu will be deprecating them. Drop the use from test files not depending on the actual machine type. Signed-off-by: Peter Krempa --- tests/qemuxmlconfdata/vhost-vsock-auto.x86_64-latest.args | 2 +- tests/qemuxmlconfdata/vhost-vsock-auto.x86_64-latest.xml | 2 +- tests

[PATCH 5/7] qemuxmlconftest: x86_64: Bump 'firmware*' test cases to 'pc-i440fx-10.0'

2025-07-04 Thread Peter Krempa via Devel
From: Peter Krempa New qemu is deprecating 'pc-i440fx-4.0-machine', update to the latest released machine type. Apart from the previous cases where we could use the aliased machine type, the firmware auto-selection doesn't work properly for the unexpanded 'pc' alias and thus we need to use a rea

[PATCH 6/7] qemuxmlconftest: x86_64: Bump 'firmware*' test cases to 'pc-q35-10.0'

2025-07-04 Thread Peter Krempa via Devel
From: Peter Krempa New qemu is deprecating 'pc-q35-4.0-machine', update to the latest released machine type. Apart from the previous cases where we could use the aliased machine type, the firmware auto-selection doesn't work properly for the unexpanded 'q35' alias and thus we need to use a real

[PATCH 7/6] NEWS: Mention virConnectHypervisorBaselineCPU improvements

2025-07-04 Thread Jiri Denemark via Devel
From: Jiri Denemark Signed-off-by: Jiri Denemark --- NEWS.rst | 12 1 file changed, 12 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index d8bd2559f4..4fd12d94f4 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,8 +17,20 @@ v11.6.0 (unreleased) * **New features** + * Introduce VI

Re: [PATCH 0/6] Make virConnectBaselineHypervisorCPU a bit more sane

2025-07-04 Thread Michal Prívozník via Devel
On 7/4/25 15:52, Jiri Denemark via Devel wrote: > See 2/6 for description of the issue this series is trying to deal with. > > Jiri Denemark (6): > cpu: Show input CPU model names in debug log > Clarify documentation of virConnectBaselineHypervisorCPU > Change documentation style of virConne

Re: [PATCH 10/10] virDomainDriverAutoShutdown: Refactor selection logic for VMs

2025-07-04 Thread Peter Krempa via Devel
On Fri, Jul 04, 2025 at 15:05:10 +0200, Pavel Hrdina wrote: > On Thu, Jul 03, 2025 at 02:50:33PM +0200, Peter Krempa via Devel wrote: > > From: Peter Krempa > > > > Decide separately and record what shutdown modes are to be applied on > > given VM object rather than spreading out the logic throug

Re: [PATCH 0/3] qemu: Improve handling of architecture-specific defaults (SCSI)

2025-07-04 Thread Michal Prívozník via Devel
On 7/4/25 14:36, Andrea Bolognani via Devel wrote: > I was working on this last year, then sort of lost track. Jim's > recent patch[1] caused me to remember about this work and look into > picking it up again. > > This is only half of the original series, which itself was reduced in > scope compar

[RFC 2/4] conf: Introduce autoiface attribute for vhostuser interface

2025-07-04 Thread yong . huang
From: Hyman Huang This implements XML support for automatically attaching a vhostuser port to an Open vSwitch bridge. Here is an example of the config for a vhostuser interface that attached to bridge automatically:

[RFC 1/4] qemu_passt: Make logFile backend-specific

2025-07-04 Thread yong . huang
From: Hyman Huang The 'logFile' field within the virDomainNetBackend struct is backend-specific. Refactor the code by introducing a union struct to encapsulate backend-specific fields, rather than using a plain field. This refactoring is also a prerequisite for implementing the 'openvswitch' bac

[RFC 0/4] Implement automatic attachment of the vhostuser port

2025-07-04 Thread yong . huang
From: Hyman Huang This series offer an automated method to configure a vhostuser interface in server mode, simplifying integration with DPDK-enabled Open vSwitch bridges. To ensure simplicity and forward compatibility, we introduce openvswitch backend support for vhostuser interfaces in XML conf

[RFC 3/4] util: Add iface argument to virNetDevOpenvswitchAddPort

2025-07-04 Thread yong . huang
From: Hyman Huang Introduce the virNetDevVhostUserIface struct to encapsulate the necessary configuration for attaching a vhostuser port to a bridge. Update the virNetDevOpenvswitchAddPort signature to accept an additional iface argument. Extend the implementation of virNetDevOpenvswitchAddPort

[RFC 4/4] qemu: Implement automatic attachment of the vhostuser port

2025-07-04 Thread yong . huang
From: Hyman Huang Add logic for automatic attachment and detachment of the vhostuser port within the vhostuser interface lifecycle. --- src/qemu/qemu_command.c | 3 +++ src/qemu/qemu_hotplug.c | 4 src/qemu/qemu_interface.c | 46 +++ src/qemu/qemu_i

[PATCH 2/3] qemu: Clean up qemuDomainDefaultSCSIControllerModel()

2025-07-04 Thread Andrea Bolognani via Devel
Use a better order for sections, improve comments, tweak formatting. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c408fb8c88..a6c0b581

[PATCH 1/3] qemu: Improve qemuDomainDefaultSCSIControllerModel()

2025-07-04 Thread Andrea Bolognani via Devel
Make the helper stateless. This requires the caller to check whether it needs to be called in the first place instead of adding this check inside the function, which makes for more readable, if a little more verbose, code. We also update callers to check the return value against VIR_DOMAIN_CONTROL

[PATCH 0/3] qemu: Improve handling of architecture-specific defaults (SCSI)

2025-07-04 Thread Andrea Bolognani via Devel
I was working on this last year, then sort of lost track. Jim's recent patch[1] caused me to remember about this work and look into picking it up again. This is only half of the original series, which itself was reduced in scope compared to the first revision. I'll try to get around to everything,

Re: [PATCH 06/10] cgroup: Plumb the 'daemonDomainShutdown' parameter of 'virSystemdCreateMachine' to drivers

2025-07-04 Thread Pavel Hrdina via Devel
On Thu, Jul 03, 2025 at 02:50:29PM +0200, Peter Krempa via Devel wrote: > From: Peter Krempa > > Plumb the new argument across the cgroup helpers up to the domain driver > code. > > Signed-off-by: Peter Krempa > --- > src/ch/ch_process.c| 2 ++ > src/hypervisor/domain_cgroup.c | 4

Re: [PATCH 07/10] qemu: Fix auto-shutdown of qemu VMs by the qemu driver

2025-07-04 Thread Pavel Hrdina via Devel
On Thu, Jul 03, 2025 at 02:50:30PM +0200, Peter Krempa via Devel wrote: > From: Peter Krempa > > When auto-shutdown via the qemu driver is requested (rather than via > libvirt guests) we need to start the VMs in a way that they will be kept > around for libvirt to terminate them. This involves in

[PATCH 3/3] qemu: Use virtio-scsi by default on RISC-V

2025-07-04 Thread Andrea Bolognani via Devel
Using lsilogic on RISC-V was never an actual decision, but rather a consequence of that being the default for legacy x86 guests. Using virtio-scsi is a much more sensible choice. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c| 1 + ...virt-default-mod

Re: [PATCH 08/10] hypervisor: Split out individual steps out of virDomainDriverAutoShutdown

2025-07-04 Thread Pavel Hrdina via Devel
On Thu, Jul 03, 2025 at 02:50:31PM +0200, Peter Krempa via Devel wrote: > From: Peter Krempa > > 'virDomainDriverAutoShutdown' grew into an unwieldy function. Extract > the code for each of the save/shutdown/poweroff steps into helpers and > call them. > > Signed-off-by: Peter Krempa > --- > s

Re: [PATCH 10/10] virDomainDriverAutoShutdown: Refactor selection logic for VMs

2025-07-04 Thread Pavel Hrdina via Devel
On Thu, Jul 03, 2025 at 02:50:33PM +0200, Peter Krempa via Devel wrote: > From: Peter Krempa > > Decide separately and record what shutdown modes are to be applied on > given VM object rather than spreading out the logic through the code. > > This centralization simplifies the conditions in the

[PATCH 6/6] nss: Debug print JSON files as they are parsed

2025-07-04 Thread Michal Privoznik via Devel
From: Michal Privoznik It may help in case the NSS plugin ever faces a corrupted JSON Signed-off-by: Michal Privoznik --- tools/nss/libvirt_nss_leases.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/nss/libvirt_nss_leases.c b/tools/nss/libvirt_nss_lease

[PATCH 0/6] nss: Rework debugging

2025-07-04 Thread Michal Privoznik via Devel
I've been debugging a problem with NSS plugin recently [1] and the fact that I had to recompile libvirt just to enable debugging printings for the NSS plugin turned out very inconvenient. Make the debug printings env var dependant and add a few more printings. 1: https://bugzilla.redhat.com/show_b

[PATCH 2/6] nss: Move logging into a separate file and turn it temporarily on

2025-07-04 Thread Michal Privoznik via Devel
From: Michal Privoznik Currently, when somebody wants to debug the NSS plugin, they have to change a line in libvirt_nss.h (to enable debug printings) and recompile the module. This may work for us, developers, but we can not expect this from users. For now, this turns debug printings unconditio

[PATCH 1/6] nss: Promote debug message to proper error when time() fails

2025-07-04 Thread Michal Privoznik via Devel
From: Michal Privoznik The difference between DEBUG() and ERROR() macros is that the latter also prints (stringified) errno. Inside of findLease() there's one line where time() is called which is documented as: On error, ((time_t) -1) is returned, and errno is set to indicate the error. The

[PATCH 3/6] nss: Make logging conditional on an envvar

2025-07-04 Thread Michal Privoznik via Devel
From: Michal Privoznik As promised in previous commit, make NSS modules silent by default and enable debug printings if LIBVIRT_NSS_DEBUG envvar is set. Signed-off-by: Michal Privoznik --- docs/nss.rst| 13 + tools/nss/libvirt_nss_log.c | 4 tools/nss/libvirt_

[PATCH 5/6] nss: Print module name

2025-07-04 Thread Michal Privoznik via Devel
From: Michal Privoznik Signed-off-by: Michal Privoznik --- tools/nss/libvirt_nss.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c index 52b769d760..fe9a6bdb37 100644 --- a/tools/nss/libvirt_nss.c +++ b/tools/nss/libvirt_nss.c @@ -121,

[PATCH 4/6] nss: Include filename in debug printings

2025-07-04 Thread Michal Privoznik via Devel
From: Michal Privoznik Signed-off-by: Michal Privoznik --- tools/nss/libvirt_nss_log.c | 7 ++- tools/nss/libvirt_nss_log.h | 7 --- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/nss/libvirt_nss_log.c b/tools/nss/libvirt_nss_log.c index 9a28a91800..04fc049376 100

Re: [PATCH 09/10] virDomainDriverAutoShutdownDoSave: Don't attempt to save transient VMs

2025-07-04 Thread Pavel Hrdina via Devel
On Thu, Jul 03, 2025 at 02:50:32PM +0200, Peter Krempa via Devel wrote: > From: Peter Krempa > > Commit 84bb136c31e added code that intended to skip the save of > transient domains but did so only in the setup part where we pause the > VMS. The second loop that actually attempts to save the VM wa

[PATCH 0/6] Make virConnectBaselineHypervisorCPU a bit more sane

2025-07-04 Thread Jiri Denemark via Devel
See 2/6 for description of the issue this series is trying to deal with. Jiri Denemark (6): cpu: Show input CPU model names in debug log Clarify documentation of virConnectBaselineHypervisorCPU Change documentation style of virConnectBaselineCPUFlags Introduce VIR_CONNECT_BASELINE_CPU_IGNO

[PATCH 2/6] Clarify documentation of virConnectBaselineHypervisorCPU

2025-07-04 Thread Jiri Denemark via Devel
From: Jiri Denemark The API was apparently never considered for being used on a host that is not represented in the input set of CPU definitions. The result is limited to the set of features and CPU models known to the host's hypervisor. This would likely not be a big issue, but thanks to a side

[PATCH 3/6] Change documentation style of virConnectBaselineCPUFlags

2025-07-04 Thread Jiri Denemark via Devel
From: Jiri Denemark Moving the documentation above each enum item gives us more space for it. Signed-off-by: Jiri Denemark --- include/libvirt/libvirt-host.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.

[PATCH 1/6] cpu: Show input CPU model names in debug log

2025-07-04 Thread Jiri Denemark via Devel
From: Jiri Denemark Signed-off-by: Jiri Denemark --- src/cpu/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 77afb7e9b3..233686485d 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -581,7 +581,7 @@ virCPUBaseline(virArch arch,

[PATCH 6/6] virsh: Add support for VIR_CONNECT_BASELINE_CPU_IGNORE_HOST flag

2025-07-04 Thread Jiri Denemark via Devel
From: Jiri Denemark Signed-off-by: Jiri Denemark --- docs/manpages/virsh.rst | 11 --- tools/virsh-host.c | 8 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 7082ca773a..bcb5495ed9 100644 --- a/docs/

[PATCH 4/6] Introduce VIR_CONNECT_BASELINE_CPU_IGNORE_HOST flag

2025-07-04 Thread Jiri Denemark via Devel
From: Jiri Denemark With this new flag virConnectHypervisorBaselineCPU can be used on any host (rather than being limited to hosts described by individual CPUs passed to the API). Using the flag makes the API behave similarly to the old virConnectBaselineCPU. The main difference is the CPU defini

[PATCH 5/6] qemu: Implement VIR_CONNECT_BASELINE_CPU_IGNORE_HOST

2025-07-04 Thread Jiri Denemark via Devel
From: Jiri Denemark Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2c06e50454..cf7407ce2d 100644 --- a/src/qemu/qemu_driver.c +++ b/

[PATCH] build: prohibit realpath() by syntax-check

2025-07-04 Thread Michal Privoznik via Devel
From: Michal Privoznik We have virFileCanonicalizePath() which calls realpath() but also is present in our mocks (in contrast to realpath()). Introduce a syntax-check rule to enforce use of our wrapper. Signed-off-by: Michal Privoznik --- build-aux/syntax-check.mk | 9 + 1 file changed

Re: [PATCH v3 05/21] qemu: Add TDX capability

2025-07-04 Thread Peter Krempa via Devel
Please mention the capability name 'QEMU_CAPS_TDX_GUEST' in the summary line. On Mon, Jun 30, 2025 at 14:17:16 +0800, Zhenzhong Duan wrote: > QEMU_CAPS_TDX_GUEST set means TDX supported with this QEMU. > > Signed-off-by: Chenyi Qiang > Signed-off-by: Zhenzhong Duan > Reviewed-by: Daniel P. Berr

[libvirt PATCH] qemu: prefer memfd if we have to format system memory

2025-07-04 Thread Ján Tomko via Devel
From: Ján Tomko For any vhost-user device to work, the memory needs to be marked as shared. What we recommend to users (e.g. in the virtiofs quide [0]) is: Technically, only the access mode is needed: But this results in libvirt assuming the file backend. Switch this

Re: [PATCH v3 04/21] qemucapabilitiestest: Add data for the qemu-10.1.0 dev cycle on x86_64 for the '+inteltdx' variant

2025-07-04 Thread Peter Krempa via Devel
On Mon, Jun 30, 2025 at 14:17:15 +0800, Zhenzhong Duan wrote: > Add data based on 'v10.0.0-1724-gf9a3def17b'. > > Signed-off-by: Zhenzhong Duan > --- Looks good. While there are some caps missing as detected from this build, it doesn't matter as they are covered by the default variant. Reviewed

Re: [PATCH V2 1/5] qom: qom-tree-get

2025-07-04 Thread Markus Armbruster via Devel
Steve Sistare writes: > Define the qom-tree-get QAPI command, which fetches an entire tree of > properties and values with a single QAPI call. This is much faster > than using qom-list plus qom-get for every node and property of the > tree. See qom.json for details. > > Signed-off-by: Steve Sis

Re: [PATCH V2 4/5] qom: qom-list-getv

2025-07-04 Thread Markus Armbruster via Devel
Steve Sistare writes: > Define the qom-list-getv command, which fetches all the properties and > values for a list of paths. This is faster than qom-tree-get when > fetching a subset of the QOM tree. See qom.json for details. > > Signed-off-by: Steve Sistare > --- > qapi/qom.json | 34 ++

Re: [PATCH V2 0/5] fast qom tree get

2025-07-04 Thread Markus Armbruster via Devel
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 individual > QOM requests. Some managers fetch the entire tree or a large subset > of it when starting a new VM, and this cost is a

Re: [PATCH 05/10] virSystemdCreateMachine: Add flag to invert machined unit dependencies

2025-07-04 Thread Pavel Hrdina via Devel
On Thu, Jul 03, 2025 at 02:50:28PM +0200, Peter Krempa via Devel wrote: > From: Peter Krempa > > The existing dependency order of the 'machined' unit file for the domain > we're starting ("After libvirtd/virtqemud"->thus shuts down *before* the > daemon) is intended to work with 'libvirt-guests.s