Re: [PATCH 02/17] NEWS: Mention fix for internal snapshot reversion regression

2025-05-15 Thread Jim Fehlig via Devel
On 5/15/25 09:28, Peter Krempa via Devel wrote: From: Peter Krempa Signed-off-by: Peter Krempa --- NEWS.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index ad8910da4c..6cf2a47d3d 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -21,6 +21,16 @@ v11.4.0 (unrel

Re: [PATCH 01/17] qemuProcessStartWithMemoryState: Don't setup qemu for incoming migration when reverting internal snapshot

2025-05-15 Thread Jim Fehlig via Devel
On 5/15/25 09:28, Peter Krempa via Devel wrote: From: Peter Krempa The memory/device state of the VM for an internal snapshot is restored by qemu itself via a QMP command and is taken from the qcow2 image, thus we don't actually do any form of incoming migration. Commit 5b324c0a739fe00 which r

[RFC PATCH 1/5] conf: Support multiple smmuv3Dev IOMMU devices

2025-05-15 Thread Nathan Chen via Devel
Add support for "smmuv3Dev" IOMMU model, and add support for parsing multiple IOMMU devices from the VM definition when "smmuv3Dev" is the IOMMU model. Enable plugging smmuv3Dev into pcie-root and pcie-expander-bus. Signed-off-by: Nathan Chen --- docs/formatdomain.rst | 5 +- src/c

[RFC PATCH 5/5] qemu: Add test case for specifying iommufd

2025-05-15 Thread Nathan Chen via Devel
Implement a sub-test in qemuxmlconftest that takes an iommufd attribute from the iommu device stanza, and iommufdId and iommufdFd hostdev attributes in a VM definition. Translate the VM definition to a qemu command line that associates the hostdev withan iommufd object, as well as a fd for external

[RFC PATCH 4/5] qemu: Update Cgroup and namespace for qemu to access iommufd paths

2025-05-15 Thread Nathan Chen via Devel
Allow access to /dev/iommu and /dev/vfio/devices/vfio* when launching a qemu VM with iommufd feature enabled. Signed-off-by: Nathan Chen --- src/qemu/qemu_cgroup.c| 47 +++ src/qemu/qemu_cgroup.h| 1 + src/qemu/qemu_namespace.c | 36 ++

[RFC PATCH 3/5] qemu: Implement support for associating iommufd to hostdev

2025-05-15 Thread Nathan Chen via Devel
Implement "iommufdId" and "iommufdFd" attributes for "hostdev" devices that can be used to specify associated iommufd object and fd for externally opening the /dev/iommu and VFIO cdev, when launching a qemu VM. Signed-off-by: Nathan Chen --- src/conf/domain_conf.c| 31 +++

[RFC PATCH 2/5] conf: Add an iommufd member struct to virDomainIOMMUDef

2025-05-15 Thread Nathan Chen via Devel
Add support for an "iommufd" virDomainIOMMUDef member that will be translated to a qemu "-object iommufd" command line argument. This iommufd struct has an "id" member to specify the iommufd object id that can be associated with a passthrough device, and an "fd" member to specify the fd for externa

[RFC PATCH 0/5] qemu: Implement support for iommufd and multiple vSMMUs

2025-05-15 Thread Nathan Chen via Devel
Hi, This is a follow up to the first RFC patchset [0] for supporting multiple vSMMU instances in a qemu VM. This patchset also introduces support for using iommufd to propagate DMA mappings to kernel for assigned devices. This patchset implements support for specifying multiple devices within th

[PATCH 3/3] qemu: capabilities: report supported console types

2025-05-15 Thread Roman Bogorodskiy
Extend domain capabilities with information about the supported console device types. Signed-off-by: Roman Bogorodskiy --- src/qemu/qemu_capabilities.c | 32 +++ src/qemu/qemu_capabilities.h | 3 ++ .../qemu_10.0.0-q35.x86_64+amdsev.xml

[PATCH 2/3] bhyve: capabilities: report NMDM console

2025-05-15 Thread Roman Bogorodskiy
Extend domain capabilities to report the NMDM console support. Signed-off-by: Roman Bogorodskiy --- src/bhyve/bhyve_capabilities.c | 5 + tests/domaincapsdata/bhyve_basic.x86_64.xml | 5 + tests/domaincapsdata/bhyve_fbuf.x86_64.xml | 5 + tests/domaincapsdata/bhyve_uefi

[PATCH 0/3] domain_capabilities: add console capabilities

2025-05-15 Thread Roman Bogorodskiy
Motivation behind this series is to give management software possibility to check whether the 'pty' console could be used, or it should use something else, e.g. 'nmdm' for bhyve. Because of the complex relationships between 'serial' and 'console', I wasn't entirely sure whether I should report 'co

[PATCH 1/3] domain_capabilities: add console capabilities

2025-05-15 Thread Roman Bogorodskiy
Currently, domain capabilities do not include information about the supported console device types. While most of the drivers support 'pty' console type, it's not the case for bhyve. Without this information, management software cannot always generate compatible domain configuration. To address th

[PATCH 05/17] qemuBuildCommandLine: Drop 'snapshot' argument

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa After recent refactors that removed legacy way to revert snapshots we no longer need to know the snapshot state during commandline build. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 5 ++--- src/qemu/qemu_command.h | 1 - src/qemu/qemu_process.c | 3 +-- 3 file

[PATCH 01/17] qemuProcessStartWithMemoryState: Don't setup qemu for incoming migration when reverting internal snapshot

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa The memory/device state of the VM for an internal snapshot is restored by qemu itself via a QMP command and is taken from the qcow2 image, thus we don't actually do any form of incoming migration. Commit 5b324c0a739fe00 which refactored the setup of the incoming migration stat

[PATCH 10/17] qemuCheckpointDiscardAllMetadata: Remove 'driver' argument

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa The function can extract it from @vm. Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 5 ++--- src/qemu/qemu_checkpoint.h | 3 +-- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_driver.c | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git

[PATCH 15/17] qemuProcessReconnect: Modernize local variable setup

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa Assign local variables directly and use autofree for temproary ones. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 50c7b47256..3

[PATCH 17/17] qemuDomainRemoveInactive: Remove 'driver' argument

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa The function can fetch it from @vm. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c| 5 ++--- src/qemu/qemu_domain.h| 3 +-- src/qemu/qemu_driver.c| 20 ++-- src/qemu/qemu_migration.c | 12 ++-- src/qemu/qemu_process.c | 4 ++--

[PATCH 16/17] qemuProcessReconnectData: Drop 'driver' struct and clean up

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa Nobody reads the struct member any more. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 3bad805d3d..9d53768fed 100644 --- a/src/qemu/q

[PATCH 13/17] qemuProcessStop: Drop 'driver' argument

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa For now it's extracted as a temporary variable but in long term it ought to be eliminated. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c| 22 -- src/qemu/qemu_migration.c | 8 src/qemu/qemu_process.c | 21 +++-- sr

[PATCH 14/17] qemuDomainRemoveInactiveLocked: Remove 'driver' argument

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa The function can extract the value from @vm's private data. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 5 ++--- src/qemu/qemu_domain.h | 3 +-- src/qemu/qemu_process.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain

[PATCH 12/17] qemuDomainRemoveInactiveCommon: Remove 'driver' argument

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa The function can fetch it from @vm. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index fa1615ceba..8ad7a57a85 100644 --- a/src/qemu/qemu_dom

[PATCH 11/17] qemuSnapshotDiscardAllMetadata: Remove 'driver' argument

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa The function can extract it from @vm. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_snapshot.c | 5 ++--- src/qemu/qemu_snapshot.h | 3 +-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/qe

[PATCH 09/17] qemuExtDevicesCleanupHost: Use 'virQEMUDriverConfig' instead of 'virQEMUDriver'

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa Refactor the function and all callees to use the driver config instead. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c| 2 +- src/qemu/qemu_extdevice.c | 18 ++ src/qemu/qemu_extdevice.h | 4 ++-- src/qemu/qemu_process.c | 2 +- src/qemu/qemu

[PATCH 07/17] qemuProcessStart: Rename 'snapshot' to 'internalSnapshotRevert'

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa Make it obvious that the variable is used for internal snapshot reversion by renaming it. This is necessary mainly as the function parameters are not documented, but makes it obvious also if they were. We can also report the name of the sanpshot rather than a pointer that says

[PATCH 08/17] qemuProcessStartWithMemoryState: Rename 'snapshot' to 'internalSnapshotRevert'

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa Make it obvious that the variable is used for internal snapshot reversion by renaming it. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.

[PATCH 06/17] qemuProcessLaunch: Rename 'snapshot' to 'internalSnapshotRevert'

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa Make it obvious that the variable is used for internal snapshot reversion by renaming it. This is necessary mainly as the function parameters are not documented, but makes it obvious also if they were. We can also report the name of the sanpshot rather than a pointer that says

[PATCH 04/17] qemuSnapshotRevertInactive: Ensure all error paths handle transient domains properly

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa Only the internal snapshot code paths were able to handle transient domains properly in case when startup of the process failed. Unify the error paths on an 'error' label with proper handling. Signed-off-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 31 ---

[PATCH 03/17] qemuSnapshotRevertActive: Remove transient domain on failure

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa Code paths which deal with stopping of the qemu process need extra handling for transient definitions as they need to be removed from the domain list when we'd be leaving them inactive. In case of snapshot code it's on failure to revert a snapshot as we stop the qemu process b

[PATCH 02/17] NEWS: Mention fix for internal snapshot reversion regression

2025-05-15 Thread Peter Krempa via Devel
From: Peter Krempa Signed-off-by: Peter Krempa --- NEWS.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index ad8910da4c..6cf2a47d3d 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -21,6 +21,16 @@ v11.4.0 (unreleased) * **Bug fixes** + * qemu: Fix failure whe

[PATCH 00/17] qemu: Fix regresion when loading internal snapshots and few cleanups

2025-05-15 Thread Peter Krempa via Devel
This series: 1) Fixes the regression in loading internal snapshots: https://gitlab.com/libvirt/libvirt/-/issues/771 2) Fixes bugs in cleanup paths of snapshot reversion where we'd keep an inactive transient VM definition in the domain list (Noticed when debugging the former issue) 3) Cl

[PATCH v3 1/3] qemu: Add capability for PCI high memory MMIO size

2025-05-15 Thread Matthew R. Ochs via Devel
Add QEMU capability for PCI high memory MMIO size configuration: - Add QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE capability - Add capability to virt machine properties - Add highmem-mmio-size virt machine property to aarch64 qemu 10.0.0 capabilities This allows detecting support for the highm

[PATCH v3 3/3] tests: Add pcihole64 test for virt machine

2025-05-15 Thread Matthew R. Ochs via Devel
Add a pcihole64 test for the aarch64 virt machine that verifies the value is propagated to the highmem-mmio-size virt machine parameter. Signed-off-by: Matthew R. Ochs Reviewed-by: Daniel P. Berrangé --- .../pcihole64-virt.aarch64-latest.args| 31 +++ .../pcihole64-virt.

[PATCH v3 2/3] qemu: Add command line support for PCI high memory MMIO size

2025-05-15 Thread Matthew R. Ochs via Devel
Add support for generating QEMU command line with PCI high memory MMIO size: - Add highmem-mmio-size to machine command line generation using size conveyed through pcihole64 - Add validation for aarch64/virt machine type requirement - Add capability check for QEMU support This en

[PATCH v3 0/3] Add virt machine support for configuring PCI high memory MMIO size

2025-05-15 Thread Matthew R. Ochs via Devel
This patch series adds support for configuring the PCI high memory MMIO window size for aarch64 virt machine types using the highmem-mmio-size feature introduced in QEMU v10.0.0 [1]. It allows users to configure the size of the high memory MMIO window above 4GB, which can be required to support PCI

Re: [PATCH v1 0/2] Disable Deprecated Features by Default on s390 CPU Models

2025-05-15 Thread Collin Walling
On 5/1/25 4:17 PM, Collin Walling wrote: Ping. > The intention of reporting deprecated features and modifying the guest > CPU model was to alleviate the user from the burden of preparing a guest > with the necessary amendments to assure migration to newer hardware. > While that goal was met by wa

Re: [PATCH v3 0/6] qemu: acpi-generic-initiator support

2025-05-15 Thread Andrea Righi via Devel
Hi Michal, On Fri, May 09, 2025 at 03:30:21PM +0200, Michal Prívozník wrote: > On 4/2/25 10:25, Andrea Righi via Devel wrote: > > = Overview = > > > > This patch set introduces support for acpi-generic-initiator devices, > > supported by QEMU [1]. > > > > The acpi-generic-initiator object is req

Re: [PATCH v2 2/3] qemu: Add command line support for PCI high memory MMIO size

2025-05-15 Thread Matt Ochs via Devel
> On May 15, 2025, at 6:54 AM, Daniel P. Berrangé wrote: > On Wed, May 14, 2025 at 05:18:50PM -0700, Matthew R. Ochs wrote: >> Add support for generating QEMU command line with PCI high memory MMIO size: >>- Add highmem-mmio-size to machine command line generation using >> size conveyed t

Re: [PATCH v2 1/3] qemu: Add capability for PCI high memory MMIO size

2025-05-15 Thread Daniel P . Berrangé via Devel
On Wed, May 14, 2025 at 05:18:45PM -0700, Matthew R. Ochs wrote: > Add QEMU capability for PCI high memory MMIO size configuration: > - Add QEMU_CAPS_MACHINE_VIRT_HIGHMEM_MMIO_SIZE capability > - Add capability to virt machine properties > - Add highmem-mmio-size virt machine property to aarch64 qe

Re: [PATCH v2 3/3] tests: Add pcihole64 test for virt machine

2025-05-15 Thread Daniel P . Berrangé via Devel
On Wed, May 14, 2025 at 05:18:54PM -0700, Matthew R. Ochs wrote: > Add a pcihole64 test for the aarch64 virt machine that verifies the > value is propagated to the highmem-mmio-size virt machine parameter. > > Signed-off-by: Matthew R. Ochs > --- > .../pcihole64-virt.aarch64-latest.args|

Re: [PATCH v2 2/3] qemu: Add command line support for PCI high memory MMIO size

2025-05-15 Thread Daniel P . Berrangé via Devel
On Wed, May 14, 2025 at 05:18:50PM -0700, Matthew R. Ochs wrote: > Add support for generating QEMU command line with PCI high memory MMIO size: > - Add highmem-mmio-size to machine command line generation using > size conveyed through pcihole64 > - Add validation for aarch64/virt mach

Re: [PATCH v3 1/1] rpc: Add the {repoll,retry} logic in virNetClientSetTLSSession

2025-05-15 Thread Daniel P . Berrangé via Devel
On Thu, May 15, 2025 at 09:07:41AM +0800, yong.hu...@smartx.com wrote: > From: Hyman Huang > > As advised by the GNU TLS, the caller should attempt again > if the gnutls_record_{recv,send} return EAGAIN or EINTR; > check the following link to view the details: > https://www.gnutls.org/manual/html

RFC: schemas: resolving path type inconsistency in XML schemas

2025-05-15 Thread Kirill Shchetiniuk via Devel
Hello everyone, Sometime ago I sent a patch changing the XML schema to add GTK support for libvirt. As the type for one path argument, I used the type, simply copying the similar approach from another place in the XML schema definition. I was told that it's not the best way to use the type fo

Re: [PATCH 7/7] src: Fix retval of some functions declared to return an int

2025-05-15 Thread Peter Krempa via Devel
On Thu, May 15, 2025 at 10:12:46 +0200, Michal Prívozník wrote: > On 5/14/25 16:57, Peter Krempa wrote: > > On Wed, May 14, 2025 at 16:24:16 +0200, Michal Privoznik via Devel wrote: > >> From: Michal Privoznik > >> > >> There are couple of functions (virCHDomainPrepareHostdevPCI(), > >> qemuDomain

Re: [PATCH 7/7] src: Fix retval of some functions declared to return an int

2025-05-15 Thread Michal Prívozník via Devel
On 5/14/25 16:57, Peter Krempa wrote: > On Wed, May 14, 2025 at 16:24:16 +0200, Michal Privoznik via Devel wrote: >> From: Michal Privoznik >> >> There are couple of functions (virCHDomainPrepareHostdevPCI(), >> qemuDomainPrepareHostdevPCI(), > > I've pushed my patch so this will likely drop from