Re: [PATCH 0/5] qemu: Fixes to firmware selection

2025-08-04 Thread Jim Fehlig via Devel
On 8/4/25 05:31, Andrea Bolognani wrote: On Fri, Aug 01, 2025 at 11:39:45AM -0600, Jim Fehlig via Devel wrote: With this addition, the correct firmware is detected, but it's not properly provided to qemu internal error: QEMU unexpectedly closed the monitor (vm='sles15sp7-snp')

Re: [PATCH 0/5] qemu: Fixes to firmware selection

2025-08-01 Thread Jim Fehlig via Devel
On 8/1/25 03:14, Andrea Bolognani wrote: On Fri, Aug 01, 2025 at 02:06:44AM -0700, Andrea Bolognani wrote: On Thu, Jul 31, 2025 at 11:33:08AM -0600, Jim Fehlig wrote: Apologies for not having time to look at this in more detail today, but I quickly tried these patches and now see operation fai

Re: [PATCH 0/5] qemu: Fixes to firmware selection

2025-07-31 Thread Jim Fehlig via Devel
On 7/31/25 09:45, Andrea Bolognani via Devel wrote: See [1] for the discussion motivating these changes. [1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/U33UEJEXZGZEWOLGVAA5UWPLYY4WHEHT/ Andrea Bolognani (5): tests: Tweak descriptor for combined firmware tests:

Re: Question about SEV* guests and automatic firmware selection

2025-07-29 Thread Jim Fehlig via Devel
On 5/13/25 14:25, Jim Fehlig wrote: On 4/24/25 14:18, Jim Fehlig wrote: On 4/24/25 04:59, Daniel P. Berrangé wrote: On Mon, Apr 21, 2025 at 01:38:35PM -0600, Jim Fehlig via Devel wrote: Hi All, While investigating an internal bug report, we noticed that a minimal firmware auto-selection

Re: [libvirt PATCH] docs: hacking: Define policy forbidding use of AI code generators

2025-07-10 Thread Jim Fehlig via Devel
On 7/10/25 03:43, Pavel Hrdina via Devel wrote: This policy is a copy of what QEMU project is using [1] as there is no reason to use different policy, only modification is changing the project name and link to DCO. [1]

Re: [PATCH] NEWS: Mention switch to virtio-scsi on ARM

2025-07-10 Thread Jim Fehlig via Devel
On 7/10/25 03:20, Andrea Bolognani wrote: On Mon, Jul 07, 2025 at 05:05:05PM -0600, Jim Fehlig via Devel wrote: * **Improvements** + * qemu: Change default SCSI controller model to ``virtio-scsi`` for ARM + +The previous default of ``lsilogic`` is unsupported by modern operating

[PATCH] NEWS: Mention switch to virtio-scsi on ARM

2025-07-07 Thread Jim Fehlig via Devel
From: Jim Fehlig Signed-off-by: Jim Fehlig --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index d8bd2559f4..59494cb380 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -19,6 +19,12 @@ v11.6.0 (unreleased) * **Improvements** + * qemu: Change default SCSI

Re: [PATCH] qemu: Switch to virtio-scsi on ARM

2025-07-07 Thread Jim Fehlig via Devel
On 7/3/25 04:35, Daniel P. Berrangé wrote: On Thu, Jul 03, 2025 at 06:02:38AM -0400, Andrea Bolognani via Devel wrote: On Wed, Jul 02, 2025 at 02:01:07PM -0600, Jim Fehlig wrote: On 7/2/25 10:11, Andrea Bolognani wrote: On Thu, Jun 26, 2025 at 03:29:58PM -0600, Jim Fehlig via Devel wrote

Re: [PATCH] qemu: Switch to virtio-scsi on ARM

2025-07-02 Thread Jim Fehlig via Devel
On 7/2/25 10:11, Andrea Bolognani wrote: On Thu, Jun 26, 2025 at 03:29:58PM -0600, Jim Fehlig via Devel wrote: Similar to x86, the default SCSI controller model for ARM is lsilogic. But unlike x86, the ARM virt machine type prefers virtio devices. Switch the default controller model for ARM

[PATCH] qemu: Switch to virtio-scsi on ARM

2025-06-26 Thread Jim Fehlig via Devel
From: Jim Fehlig Similar to x86, the default SCSI controller model for ARM is lsilogic. But unlike x86, the ARM virt machine type prefers virtio devices. Switch the default controller model for ARM from lsilogic to virtio-scsi. Signed-off-by: Jim Fehlig --- IMO, the lsilogic SCSI controller is

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

Re: Question about SEV* guests and automatic firmware selection

2025-05-13 Thread Jim Fehlig via Devel
On 4/24/25 14:18, Jim Fehlig wrote: On 4/24/25 04:59, Daniel P. Berrangé wrote: On Mon, Apr 21, 2025 at 01:38:35PM -0600, Jim Fehlig via Devel wrote: Hi All, While investigating an internal bug report, we noticed that a minimal firmware auto-selection configuration along with SEV* fails to

Re: Question about SEV* guests and automatic firmware selection

2025-04-24 Thread Jim Fehlig via Devel
On 4/24/25 04:59, Daniel P. Berrangé wrote: On Mon, Apr 21, 2025 at 01:38:35PM -0600, Jim Fehlig via Devel wrote: Hi All, While investigating an internal bug report, we noticed that a minimal firmware auto-selection configuration along with SEV* fails to find a match. E.g. the following config

Question about SEV* guests and automatic firmware selection

2025-04-21 Thread Jim Fehlig via Devel
Hi All, While investigating an internal bug report, we noticed that a minimal firmware auto-selection configuration along with SEV* fails to find a match. E.g. the following config hvm 0x07 ... Fails with "Unable to find 'efi' firmware that is compatible with the c

Re: [PATCH V4 01/18] lib: virDomain{Save,Restore}Params: Ensure absolute path

2025-04-05 Thread Jim Fehlig via Devel
On 3/19/25 05:54, Daniel P. Berrangé wrote: On Wed, Mar 05, 2025 at 03:48:10PM -0700, Jim Fehlig via Devel wrote: When invoking virDomainSaveParams with a relative path, the image is saved to the daemon's CWD. Similarly, when providing virDomainRestoreParams with a relative path, it attemp

Re: [PATCH V4 00/18] qemu: support mapped-ram+directio+mulitfd

2025-04-05 Thread Jim Fehlig via Devel
On 3/20/25 11:55, Daniel P. Berrangé wrote: Hi Jim, There are a couple of CI failures after this, one on 32-bit and one with CLang Yep, received mail from gitlab as well. Will take a look... Regards, Jim On Wed, Mar 05, 2025 at 03:48:09PM -0700, Jim Fehlig via Devel wrote: V4 series

Re: [libvirt PATCH 0/6] cleanup and fixes of the mapped-ram feature

2025-04-04 Thread Jim Fehlig via Devel
On 3/21/25 04:21, Martin Kletzander wrote: On Fri, Mar 21, 2025 at 08:29:30AM +, Daniel P. Berrangé via Devel wrote: On Thu, Mar 20, 2025 at 09:36:15PM -0600, Jim Fehlig via Devel wrote: On 3/20/25 17:07, Pavel Hrdina via Devel wrote: > Pavel Hrdina (6): >    tools: remove --paralle

Re: [PATCH rfcv4 06/13] qemu: Add command line and validation for TDX type

2025-04-04 Thread Jim Fehlig via Devel
On 5/24/24 00:21, Zhenzhong Duan wrote: QEMU will provides 'tdx-guest' object which is used to launch encrypted VMs on Intel platform using TDX feature. Command line looks like: $QEMU ... \ -object '{"qom-type":"tdx-guest","id":"lsec0","debug":true,"sept-ve-disable":false,"mrconfigid":"xxx",

Re: [PATCH v2 2/2] Add NEWS item for flags with Xen

2025-04-03 Thread Jim Fehlig via Devel
On 3/25/25 00:24, Will wrote: Signed-off-by: Will --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 1fc80e2496..075fbd2d6c 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -67,6 +67,11 @@ v11.2.0 (unreleased) restore. Using multiple channels can redu

Re: [PATCH v2 1/2] libxl_conf: Implement hyperv domain flags for Xen

2025-04-03 Thread Jim Fehlig via Devel
On 3/25/25 00:24, Will wrote: Adds support for configuring flags for domains running under Xen. The following flags, making use of QEMU's existing flags, are now configurable for Xen: vapic, synic, stimer, frequencies, tlbflush and ipi Tests have been added validating translation to libxl's vi

Re: [PATCH rfcv4 04/13] conf: expose TDX feature in domain capabilities

2025-03-31 Thread Jim Fehlig via Devel
On 5/24/24 00:21, Zhenzhong Duan wrote: Extend qemu TDX capability to domain capabilities. Signed-off-by: Chenyi Qiang Signed-off-by: Zhenzhong Duan --- docs/formatdomaincaps.rst | 1 + src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 1 + src/conf/schemas

[PATCH] NEWS: Mention support for mapped-ram

2025-03-26 Thread Jim Fehlig via Devel
Add a 'New features' entry for mapped-ram itself, and another for the parallel save/restore feature built on top. Signed-off-by: Jim Fehlig --- NEWS.rst | 15 +++ 1 file changed, 15 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 484333e55a..76f7ea65b1 100644 --- a/NEWS.rst +++

Re: [PATCH V4 01/18] lib: virDomain{Save,Restore}Params: Ensure absolute path

2025-03-25 Thread Jim Fehlig via Devel
On 3/25/25 06:49, Martin Kletzander wrote: On Tue, Mar 25, 2025 at 10:15:12AM +, Daniel P. Berrangé wrote: On Tue, Mar 25, 2025 at 10:49:49AM +0100, Martin Kletzander wrote: On Wed, Mar 19, 2025 at 05:43:20PM -0600, Jim Fehlig via Devel wrote: > On 3/19/25 05:54, Daniel P. Berrangé wr

Re: [libvirt PATCH] qemu_driver: Fix virDomainSaveImageDefineXML

2025-03-25 Thread Jim Fehlig via Devel
On 3/24/25 13:20, Pavel Hrdina via Devel wrote: From: Pavel Hrdina Commit 28a06215280b99708ed8dc2d183f62ba7b34ccf8 added support to restore sparse images but changed the boolean that controls if we open the file as read-only or read-write. Editing XML in the save image resulted in following err

Re: [libvirt PATCH 0/6] cleanup and fixes of the mapped-ram feature

2025-03-23 Thread Jim Fehlig via Devel
On 3/21/25 04:21, Martin Kletzander wrote: On Fri, Mar 21, 2025 at 08:29:30AM +, Daniel P. Berrangé via Devel wrote: On Thu, Mar 20, 2025 at 09:36:15PM -0600, Jim Fehlig via Devel wrote: On 3/20/25 17:07, Pavel Hrdina via Devel wrote: > Pavel Hrdina (6): >    tools: remove --paralle

Re: [libvirt PATCH 0/6] cleanup and fixes of the mapped-ram feature

2025-03-20 Thread Jim Fehlig via Devel
On 3/20/25 17:07, Pavel Hrdina via Devel wrote: Pavel Hrdina (6): tools: remove --parallel from virsh restore command tools: remote --parallel from virsh save command qemu: remove VIR_DOMAIN_SAVE_PARALLEL flag Heh, I'm having one of those "why did I not realize that" moments :-).

[PATCH 1/2] qemu: Fix CLang build

2025-03-20 Thread Jim Fehlig via Devel
Commit f0169f4d caused a build failure with CLang due to potentially uninitialized variable ../src/qemu/qemu_migration_params.c:825:17: error: variable 'nchannels' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized] 825 | if (params && virTypedP

[PATCH 2/2] qemu: Fix build on 32-bit platforms

2025-03-20 Thread Jim Fehlig via Devel
Commits c2518f7bc7 and 28a0621528 introduced build failures on 32-bit platforms by using incorrect format specifiers with g_strdup_printf. In one case, an 'unsigned long' format specifier is used with a 'long long int' variable. Fix by changing the format specifier to 'uintmax_t', and casting the

[PATCH 0/2] qemu: Build fixes following merge of mapped-ram

2025-03-20 Thread Jim Fehlig via Devel
Patches to fix the recent build failures caused by merging the mapped-ram series. They get a green light from a CI run in my fork https://gitlab.com/jfehlig/libvirt/-/pipelines/1727301916 I would push them as build-breakers, but the first one does raise a question that should be answered beforeha

Re: [PATCH V4 11/18] qemu: Apply migration parameters in qemuMigrationDstRun

2025-03-19 Thread Jim Fehlig via Devel
On 3/19/25 09:45, Daniel P. Berrangé wrote: On Wed, Mar 05, 2025 at 03:48:20PM -0700, Jim Fehlig via Devel wrote: Similar to qemuMigrationSrcRun, apply migration parameters in qemuMigrationDstRun. This allows callers to create customized migration parameters, but delegates their application to

Re: [PATCH V4 08/18] qemu: Add helper function for creating save image fd

2025-03-19 Thread Jim Fehlig via Devel
On 3/19/25 06:49, Daniel P. Berrangé wrote: On Wed, Mar 05, 2025 at 03:48:17PM -0700, Jim Fehlig via Devel wrote: Move the code in qemuSaveImageCreate that opens, labels, and wraps the save image fd to a helper function, providing more flexibility for upcoming mapped-ram support. Signed-off-by

Re: [PATCH V4 00/18] qemu: support mapped-ram+directio+mulitfd

2025-03-13 Thread Jim Fehlig via Devel
Hi All, Does anyone have time to review this series? QEMU has supported mapped-ram for a few releases now. Adding support in libvirt allows us to build parallel save/restore on top. Would be a nice feature for the next release :-). Regards, Jim On 3/5/25 15:48, Jim Fehlig wrote: V4 series a

Re: [PATCH] NEWS: Mention new 'image_format' parameter for virDomainSaveParams

2025-03-13 Thread Jim Fehlig via Devel
Hi All, Any comments on this addition to NEWS? Regards, Jim On 3/3/25 11:34, Jim Fehlig wrote: Signed-off-by: Jim Fehlig --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 9c940b1a81..d08a18dc02 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +

Re: [PATCH] libxl_conf: Implement hyperv domain flags for Xen

2025-03-13 Thread Jim Fehlig via Devel
Hi Will, Thanks for the patch! Looks good. I only have some minor comments. On 3/4/25 02:11, Will wrote: Adds support for configuring flags for domains running under Xen. The following flags, making use of QEMU's existing flags, are now configurable for Xen: vapic, synic, stimer, frequencies,

[PATCH V4 18/18] tools: add parallel parameter to virsh restore command

2025-03-05 Thread Jim Fehlig via Devel
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Jim Fehlig --- docs/manpages/virsh.rst | 9 +++-- tools/virsh-domain.c| 39 +++ 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpag

[PATCH V4 16/18] qemu: Add support for parallel save and restore

2025-03-05 Thread Jim Fehlig via Devel
Add support for parallel save and restore by mapping libvirt's "parallel-channels" parameter to QEMU's "multifd-channels" migration parameter. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c | 32 +--- src/qemu/qemu_migration_params.c | 31 +

[PATCH V4 17/18] tools: add parallel parameter to virsh save command

2025-03-05 Thread Jim Fehlig via Devel
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Jim Fehlig --- docs/manpages/virsh.rst | 12 +++- tools/virsh-domain.c| 42 + 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/m

[PATCH V4 15/18] include: Define constants for parallel save/restore

2025-03-05 Thread Jim Fehlig via Devel
From: Claudio Fontana Add a new VIR_DOMAIN_SAVE_PARALLEL flag to the save and restore APIs, which can be used to specify the use of multiple, parallel channels for saving and restoring a domain. The number of parallel channels can be set using the VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS typed par

[PATCH V4 14/18] qemu: Support O_DIRECT with mapped-ram on restore

2025-03-05 Thread Jim Fehlig via Devel
When using the mapped-ram migration capability, direct IO is enabled by setting the "direct-io" migration parameter to "true" and passing QEMU an additional fd with O_DIRECT set. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration.c | 11 ++- src/qemu/qemu_process.c | 27

[PATCH V4 12/18] qemu: Add support for mapped-ram on restore

2025-03-05 Thread Jim Fehlig via Devel
Add support for the mapped-ram migration capability on restore. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c| 27 +++--- src/qemu/qemu_migration.c | 12 ++-- src/qemu/qemu_process.c | 41 --- src/qemu/qemu_process.h

[PATCH V4 13/18] qemu: Support O_DIRECT with mapped-ram on save

2025-03-05 Thread Jim Fehlig via Devel
When using the mapped-ram migration capability, direct IO is enabled by setting the "direct-io" migration parameter to "true" and passing QEMU an additional fd with O_DIRECT set. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c | 10 ++ src/qemu/qemu_migration.c| 32

[PATCH V4 11/18] qemu: Apply migration parameters in qemuMigrationDstRun

2025-03-05 Thread Jim Fehlig via Devel
Similar to qemuMigrationSrcRun, apply migration parameters in qemuMigrationDstRun. This allows callers to create customized migration parameters, but delegates their application to the function performing the migration. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration.c | 16 ++-

[PATCH V4 09/18] qemu: Add support for mapped-ram on save

2025-03-05 Thread Jim Fehlig via Devel
Introduce support for QEMU's new mapped-ram stream format [1]. mapped-ram can be enabled by setting the 'save_image_format' setting in qemu.conf to 'sparse'. To use mapped-ram with QEMU: - The 'mapped-ram' migration capability must be set to true - The 'multifd' migration capability must be set to

[PATCH V4 10/18] qemu: Move creation of qemuProcessIncomingDef struct

2025-03-05 Thread Jim Fehlig via Devel
qemuProcessStartWithMemoryState() is the only caller of qemuProcessStart() that uses the qemuProcessIncomingDef struct. Move creation of the struct to qemuProcessStartWithMemoryState(). Signed-off-by: Jim Fehlig --- src/qemu/qemu_process.c | 42 - src/qemu

[PATCH V4 08/18] qemu: Add helper function for creating save image fd

2025-03-05 Thread Jim Fehlig via Devel
Move the code in qemuSaveImageCreate that opens, labels, and wraps the save image fd to a helper function, providing more flexibility for upcoming mapped-ram support. Signed-off-by: Jim Fehlig --- src/qemu/qemu_saveimage.c | 65 +++ 1 file changed, 45 insertio

[PATCH V4 07/18] qemu_saveimage: add "sparse" to supported save image formats

2025-03-05 Thread Jim Fehlig via Devel
Extend the list of formats to include "sparse", which uses QEMU's mapped-ram stream format [1] to write guest memory blocks at fixed offsets in the save image file. [1] https://gitlab.com/qemu-project/qemu/-/blob/master/docs/devel/migration/mapped-ram.rst?ref_type=heads Signed-off-by: Jim Fehlig

[PATCH V4 06/18] qemu: Add function to get migration params for save

2025-03-05 Thread Jim Fehlig via Devel
Introduce qemuMigrationParamsForSave() to create a qemuMigrationParams object initialized with appropriate migration capabilities and parameters for a save operation. Note that mapped-ram capability also requires the multifd capability. For now, the number of multifd channels is set to 1. Future w

[PATCH V4 05/18] qemu: Add mapped-ram migration capability

2025-03-05 Thread Jim Fehlig via Devel
Add the mapped-ram migration capability introduced in QEMU 9.0. Reviewed-by: Daniel P. Berrangé Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration_params.c | 1 + src/qemu/qemu_migration_params.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qemu/qemu_migration_params.c b/src/qem

[PATCH V4 04/18] qemu: Add function to get bool value from migration params

2025-03-05 Thread Jim Fehlig via Devel
Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_migration_params.c | 18 ++ src/qemu/qemu_migration_params.h | 5 + 2 files changed, 23 insertions(+) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index 252437e5b

[PATCH V4 03/18] qemu: Add function to check capability in migration params

2025-03-05 Thread Jim Fehlig via Devel
Add new function qemuMigrationParamsCapEnabled() to check if a capability is set in the caller-provided migration parameters. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_migration_params.c | 16 src/qemu/qemu_migration_params.h | 4 2 files

[PATCH V4 02/18] qemu: Add function to get FDPass object from monitor

2025-03-05 Thread Jim Fehlig via Devel
Add new function qemuFDPassNewFromMonitor to get an fdset previously passed to qemu, based on the 'prefix' provided when the qemuFDPass object was initially created. Signed-off-by: Jim Fehlig --- src/qemu/qemu_fd.c | 46 ++ src/qemu/qemu_fd.h | 4

[PATCH V4 01/18] lib: virDomain{Save,Restore}Params: Ensure absolute path

2025-03-05 Thread Jim Fehlig via Devel
When invoking virDomainSaveParams with a relative path, the image is saved to the daemon's CWD. Similarly, when providing virDomainRestoreParams with a relative path, it attempts to restore from the daemon's CWD. In most configurations, the daemon's CWD is set to '/'. Ensure a relative path is conv

[PATCH V4 00/18] qemu: support mapped-ram+directio+mulitfd

2025-03-05 Thread Jim Fehlig via Devel
V4 series adding support for QEMU's mapped-ram stream format [1] and migration capability. The use of mapped-ram is controlled by extending save_image_format setting in qemu.conf with a new 'sparse' option. The 'raw' format continues to be the default. Also included are patches that leverage mappe

[PATCH] NEWS: Mention new 'image_format' parameter for virDomainSaveParams

2025-03-03 Thread Jim Fehlig via Devel
Signed-off-by: Jim Fehlig --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 9c940b1a81..d08a18dc02 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,14 @@ v11.2.0 (unreleased) * **New features** + * qemu: Add new 'image_format' parameter to v

Re: [PATCH V2 2/2] qemu: Add support for 'image_format' typed parameter

2025-02-25 Thread Jim Fehlig via Devel
On 2/25/25 07:43, Daniel P. Berrangé wrote: On Thu, Feb 20, 2025 at 05:23:54PM -0700, Jim Fehlig via Devel wrote: Add support for the 'image_format' typed parameter in virDomainSaveParams. The parameter overrides the 'save_image_format' setting in qemu.conf. Signe

Re: [PATCH V2 4/4] qemu: Check for valid save image formats when loading driver config

2025-02-20 Thread Jim Fehlig via Devel
On 2/20/25 17:11, Jim Fehlig wrote: Checking for valid 'foo_image_format' settings in qemu.conf is not done until the settings are used. Move the checks to virQEMUDriverConfigLoadSaveEntry, allowing to report incorrect format settings at driver startup. This change was made easier by also changi

[PATCH V2 2/2] qemu: Add support for 'image_format' typed parameter

2025-02-20 Thread Jim Fehlig via Devel
Add support for the 'image_format' typed parameter in virDomainSaveParams. The parameter overrides the 'save_image_format' setting in qemu.conf. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/qemu

[PATCH V2 1/2] include: Define constant for save image format

2025-02-20 Thread Jim Fehlig via Devel
Add a new VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT typed parameter for specifying the save image format. A format specified via the virDomainSaveParams API overrides the save_image_format setting in qemu.conf. The 'raw' format remains the default. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berran

[PATCH V2 0/2] qemu: Support specifying save image format

2025-02-20 Thread Jim Fehlig via Devel
V2 of https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/ISSWUH6FM4IMWG5HLUMIKCYRJC2XTAZM/ Changes in V2: * Adjusted patch2 after moving verification of save image formats to driver startup in the series this one is based on https://lists.libvirt.org/archives/list/devel@list

[PATCH V2 4/4] qemu: Check for valid save image formats when loading driver config

2025-02-20 Thread Jim Fehlig via Devel
Checking for valid 'foo_image_format' settings in qemu.conf is not done until the settings are used. Move the checks to virQEMUDriverConfigLoadSaveEntry, allowing to report incorrect format settings at driver startup. This change was made easier by also changing the corresponding fields in the vir

[PATCH V2 3/4] qemu: Change return value of SaveImageGetCompressionProgram

2025-02-20 Thread Jim Fehlig via Devel
qemuSaveImageGetCompressionProgram is a bit overloaded. Along with getting a compression program, it checks the validity of the image format and returns the integer representation of the format. Change the function to only handle retrieving the specified compression program, returning success or fa

[PATCH V2 2/4] qemu: Don't ignore dump image format errors

2025-02-20 Thread Jim Fehlig via Devel
Long ago, without justification, commit 48cb9f0542 changed qemuGetCompressionProgram (since renamed to qemuSaveImageGetCompressionProgram) to ignore configuration errors for dump operations. Like the other save-related operations, user provided configuration should be verified and an error reported

[PATCH V2 1/4] qemu: Move declaration of virQEMUSaveFormat to header file

2025-02-20 Thread Jim Fehlig via Devel
Allow use of the enum outside of qemu_saveimage. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_saveimage.c | 19 --- src/qemu/qemu_saveimage.h | 19 +++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_s

[PATCH V2 0/4] qemu: Small cleanups to SaveImageGetCompressionProgram

2025-02-20 Thread Jim Fehlig via Devel
V2 of https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/SKVPVQ36ND7GHZN27RTYLUXHP5GCUI4B/ Changes in V2: * V1 moved the special-case handling of invalid dump image format to doCoreDump. V2 removes it, and fails on invalid configuration similar to the other save-related op

Re: [PATCH 0/3] qemu: Small cleanups to SaveImageGetCompressionProgram and callers

2025-02-14 Thread Jim Fehlig via Devel
On 2/14/25 15:48, Jim Fehlig wrote: Even though my work on supporting mapped-ram is the main motivation for this small cleanup series, IMO is useful in its own right. Here's an example of that usefulness https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/ISSWUH6FM4IMWG5HLUM

[PATCH 2/2] qemu: Add support for 'image_format' typed parameter

2025-02-14 Thread Jim Fehlig via Devel
Add support for the 'image_format' typed parameter in virDomainSaveParams. The parameter overrides the 'save_image_format' setting in qemu.conf. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_dr

[PATCH 1/2] include: Define constant for save image format

2025-02-14 Thread Jim Fehlig via Devel
Add a new VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT typed parameter for specifying the save image format. A format specified via the virDomainSaveParams API overrides the save_image_format setting in qemu.conf. The 'raw' format remains the default. Signed-off-by: Jim Fehlig --- include/libvirt/libvirt-

[PATCH 0/2] qemu: Support specifying save image format

2025-02-14 Thread Jim Fehlig via Devel
This series is based on a cleanup of qemuSaveImageGetCompressionProgram [1] and demonstrates the usefulness of that cleanup. Patch1 adds the VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT typed parameter to virDomainSaveParams, allowing to specify the image format on a per-operation basis. The format can still

[PATCH 3/3] qemu: Change return value of SaveImageGetCompressionProgram

2025-02-14 Thread Jim Fehlig via Devel
qemuSaveImageGetCompressionProgram is a bit overloaded. Along with getting a compression program, it checks the validity of the image format and returns the integer representation of the format. Change the function to only handle retrieving the specified compression program, returning success or fa

[PATCH 1/3] qemu: Move declaration of virQEMUSaveFormat to header file

2025-02-14 Thread Jim Fehlig via Devel
Allow use of the enum outside of qemu_saveimage. Signed-off-by: Jim Fehlig --- src/qemu/qemu_saveimage.c | 19 --- src/qemu/qemu_saveimage.h | 19 +++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveim

[PATCH 2/3] qemu: Move special handling of invalid dump format to only caller

2025-02-14 Thread Jim Fehlig via Devel
The 'use_raw_on_fail' logic in qemuSaveImageGetCompressionProgram is only used by doCoreDump in qemu_driver.c. Move the logic to the single call site and remove the parameter from qemuSaveImageGetCompressionProgram. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c| 29 +++

[PATCH 0/3] qemu: Small cleanups to SaveImageGetCompressionProgram and callers

2025-02-14 Thread Jim Fehlig via Devel
Even though my work on supporting mapped-ram is the main motivation for this small cleanup series, IMO is useful in its own right. Jim Fehlig (3): qemu: Move declaration of virQEMUSaveFormat to header file qemu: Move special handling of invalid dump format to only caller qemu: Change return

Re: AppArmor confinement for qemu:///session VMs

2025-02-10 Thread Jim Fehlig via Devel
On 2/5/25 10:22, Andrea Bolognani wrote: An issue was recently reported[1] with running unprivileged VMs configured to use passt on Debian with AppArmor confinement enabled. A long thread that's hard to read 'flat' or 'nested' via the referenced link :-). But yes, SUSE and openSUSE distros wou

[PATCH V3 08/19] qemu: Add helper function for creating save image fd

2025-02-07 Thread Jim Fehlig via Devel
Move the code in qemuSaveImageCreate that opens, labels, and wraps the save image fd to a helper function, providing more flexibility for upcoming mapped-ram support. Signed-off-by: Jim Fehlig --- src/qemu/qemu_saveimage.c | 65 +++ 1 file changed, 45 insertio

[PATCH V3 07/19] qemu_saveimage: add "sparse" to supported save image formats

2025-02-07 Thread Jim Fehlig via Devel
Extend the list of formats to include "sparse", which uses QEMU's mapped-ram stream format [1] to write guest memory blocks at fixed offsets in the save image file. [1] https://gitlab.com/qemu-project/qemu/-/blob/master/docs/devel/migration/mapped-ram.rst?ref_type=heads Signed-off-by: Jim Fehlig

[PATCH V3 11/19] qemu: Move creation of qemuProcessIncomingDef struct

2025-02-07 Thread Jim Fehlig via Devel
qemuProcessStartWithMemoryState() is the only caller of qemuProcessStart() that uses the qemuProcessIncomingDef struct. Move creation of the struct to qemuProcessStartWithMemoryState(). Signed-off-by: Jim Fehlig --- src/qemu/qemu_process.c | 42 - src/qemu

[PATCH V3 13/19] qemu: Add support for mapped-ram on restore

2025-02-07 Thread Jim Fehlig via Devel
Add support for the mapped-ram migration capability on restore. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c| 27 +++--- src/qemu/qemu_migration.c | 12 ++-- src/qemu/qemu_process.c | 41 --- src/qemu/qemu_process.h

[PATCH V3 04/19] qemu: Add function to get bool value from migration params

2025-02-07 Thread Jim Fehlig via Devel
Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_migration_params.c | 18 ++ src/qemu/qemu_migration_params.h | 5 + 2 files changed, 23 insertions(+) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c index 252437e5b

[PATCH V3 19/19] tools: add parallel parameter to virsh restore command

2025-02-07 Thread Jim Fehlig via Devel
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Jim Fehlig --- docs/manpages/virsh.rst | 9 +++-- tools/virsh-domain.c| 39 +++ 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpag

[PATCH V3 18/19] tools: add parallel parameter to virsh save command

2025-02-07 Thread Jim Fehlig via Devel
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Jim Fehlig --- docs/manpages/virsh.rst | 12 +++- tools/virsh-domain.c| 42 + 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/m

[PATCH V3 17/19] qemu: Add support for parallel save and restore

2025-02-07 Thread Jim Fehlig via Devel
Add support for parallel save and restore by mapping libvirt's "parallel-channels" parameter to QEMU's "multifd-channels" migration parameter. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c | 32 +--- src/qemu/qemu_migration_params.c | 31 +

[PATCH V3 16/19] include: Define constants for parallel save/restore

2025-02-07 Thread Jim Fehlig via Devel
From: Claudio Fontana Add a new VIR_DOMAIN_SAVE_PARALLEL flag to the save and restore APIs, which can be used to specify the use of multiple, parallel channels for saving and restoring a domain. The number of parallel channels can be set using the VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS typed par

[PATCH V3 15/19] qemu: Support O_DIRECT with mapped-ram on restore

2025-02-07 Thread Jim Fehlig via Devel
When using the mapped-ram migration capability, direct IO is enabled by setting the "direct-io" migration parameter to "true" and passing QEMU an additional fd with O_DIRECT set. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration.c | 11 ++- src/qemu/qemu_process.c | 27

[PATCH V3 14/19] qemu: Support O_DIRECT with mapped-ram on save

2025-02-07 Thread Jim Fehlig via Devel
When using the mapped-ram migration capability, direct IO is enabled by setting the "direct-io" migration parameter to "true" and passing QEMU an additional fd with O_DIRECT set. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c | 10 ++ src/qemu/qemu_migration.c| 32

[PATCH V3 12/19] qemu: Apply migration parameters in qemuMigrationDstRun

2025-02-07 Thread Jim Fehlig via Devel
Similar to qemuMigrationSrcRun, apply migration parameters in qemuMigrationDstRun. This allows callers to create customized migration parameters, but delegates their application to the function performing the migration. Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration.c | 16 ++-

[PATCH V3 10/19] qemu: Add support for mapped-ram on save

2025-02-07 Thread Jim Fehlig via Devel
Introduce support for QEMU's new mapped-ram stream format [1]. mapped-ram can be enabled by setting the 'save_image_format' setting in qemu.conf to 'sparse'. To use mapped-ram with QEMU: - The 'mapped-ram' migration capability must be set to true - The 'multifd' migration capability must be set to

[PATCH V3 09/19] qemu: Move declaration of virQEMUSaveFormat to header file

2025-02-07 Thread Jim Fehlig via Devel
Allow use of the enum outside of qemu_saveimage. Signed-off-by: Jim Fehlig --- src/qemu/qemu_saveimage.c | 20 src/qemu/qemu_saveimage.h | 20 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_save

[PATCH V3 06/19] qemu: Add function to get migration params for save

2025-02-07 Thread Jim Fehlig via Devel
Introduce qemuMigrationParamsForSave() to create a qemuMigrationParams object initialized with appropriate migration capabilities and parameters for a save operation. Note that mapped-ram capability also requires the multifd capability. For now, the number of multifd channels is set to 1. Future w

[PATCH V3 05/19] qemu: Add mapped-ram migration capability

2025-02-07 Thread Jim Fehlig via Devel
Add the mapped-ram migration capability introduced in QEMU 9.0. Reviewed-by: Daniel P. Berrangé Signed-off-by: Jim Fehlig --- src/qemu/qemu_migration_params.c | 1 + src/qemu/qemu_migration_params.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qemu/qemu_migration_params.c b/src/qem

[PATCH V3 03/19] qemu: Add function to check capability in migration params

2025-02-07 Thread Jim Fehlig via Devel
Add new function qemuMigrationParamsCapEnabled() to check if a capability is set in the caller-provided migration parameters. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_migration_params.c | 16 src/qemu/qemu_migration_params.h | 4 2 files

[PATCH V3 02/19] qemu: Add function to get FDPass object from monitor

2025-02-07 Thread Jim Fehlig via Devel
Add new function qemuFDPassNewFromMonitor to get an fdset previously passed to qemu, based on the 'prefix' provided when the qemuFDPass object was initially created. Signed-off-by: Jim Fehlig --- src/qemu/qemu_fd.c | 46 ++ src/qemu/qemu_fd.h | 4

[PATCH V3 01/19] lib: virDomain{Save,Restore}Params: Ensure absolute path

2025-02-07 Thread Jim Fehlig via Devel
When invoking virDomainSaveParams with a relative path, the image is saved to the daemon's CWD. Similarly, when providing virDomainRestoreParams with a relative path, it attempts to restore from the daemon's CWD. In most configurations, the daemon's CWD is set to '/'. Ensure a relative path is conv

[PATCH V3 00/19] qemu: support mapped-ram+directio+mulitfd

2025-02-07 Thread Jim Fehlig via Devel
V3 series adding support for QEMU's mapped-ram stream format [1] and migration capability. The use of mapped-ram is controlled by extending save_image_format setting in qemu.conf with a new 'sparse' option. The 'raw' format continues to be the default. Also included are patches that leverage mappe

Re: [PATCH 1/2] qemu: Decompose qemuSaveImageOpen

2025-01-30 Thread Jim Fehlig via Devel
On 1/30/25 02:09, Michal Prívozník wrote: On 1/29/25 18:35, Jim Fehlig wrote: I eventually need something like 1/2 for the mapped-ram support. Currently qemuSaveImageOpen does too much IMO. I've been working on an improvement to this series and would like to get opinions on that first. And befo

[PATCH V2 3/3] qemu: Check for valid save image format when verifying image header

2025-01-30 Thread Jim Fehlig via Devel
When attempting to restore a saved image, the check for a valid save image format does not occur until the qemu process is about to be executed. Move the check earlier in the restore process, along with the other checks that verify a valid save image header. Signed-off-by: Jim Fehlig --- src/qem

[PATCH V2 2/3] qemu: Decompose qemuSaveImageOpen

2025-01-30 Thread Jim Fehlig via Devel
Split the reading of libvirt's save image metadata from the opening of the fd that will be passed to QEMU. This allows improved error handling and provides more flexibility users of qemu_saveimage. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c| 31 +++--- src/qemu/qemu_saveimage.c |

[PATCH V2 1/3] qemu: Move unlinking corrupt save image file to caller

2025-01-30 Thread Jim Fehlig via Devel
qemuDomainObjRestore is the only caller of qemuSaveImageOpen that requests an unlink of a corrupted save image. Provide a function to check for a corrupt image and move unlinking it to qemuDomainObjRestore. Signed-off-by: Jim Fehlig --- src/qemu/qemu_driver.c| 23 ++- src/qemu/qe

[PATCH V2 0/3] qemu: Improve opening and verifying save images

2025-01-30 Thread Jim Fehlig via Devel
V2 of https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/DATZFZY6ETRYOQ6ORQ2JIVHBTFGKUBJM/ Changes in V2: * Move unlinking corrupt save images from qemuSaveImageOpen to the only caller using that functionality * Add a function to read save image header * Correctly position

Re: [PATCH 1/2] qemu: Decompose qemuSaveImageOpen

2025-01-29 Thread Jim Fehlig via Devel
On 1/29/25 04:40, Michal Prívozník wrote: On 1/28/25 22:23, Jim Fehlig wrote: On 1/28/25 06:52, Michal Prívozník wrote: On 1/25/25 01:37, Jim Fehlig via Devel wrote: Split the reading of libvirt's save image metadata from the opening of the fd that will be passed to QEMU. This allows imp

  1   2   3   >