Revisiting parallel save/restore

2024-04-17 Thread Jim Fehlig via Devel
Hi All, While Fabiano has been working on improving save/restore performance in qemu, I've been tinkering with the same in libvirt. The end goal is to introduce a new VIR_DOMAIN_SAVE_PARALLEL flag for save/restore, along with a VIR_DOMAIN_SAVE_PARAM_PARALLEL_CONNECTIONS parameter to specify

Re: [PATCH v2 2/5] qemu: Introduce shared_filesystems configuration option

2024-04-17 Thread Stefan Berger
On 4/17/24 09:29, Andrea Bolognani wrote: As explained in the comment, this can help in scenarios where a shared filesystem can't be detected as such by libvirt, by giving the admin the opportunity to provide this information manually. Signed-off-by: Andrea Bolognani ---

Re: [PATCH v2 1/5] security: Fix alignment

2024-04-17 Thread Stefan Berger
On 4/17/24 09:29, Andrea Bolognani wrote: Signed-off-by: Andrea Bolognani Reviewed-by: Stefan Berger --- src/security/security_selinux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index

Re: [PATCH 09/10] qemu: Always set labels for TPM state

2024-04-17 Thread Andrea Bolognani
On Wed, Mar 20, 2024 at 09:10:48AM -0700, Andrea Bolognani wrote: > On Wed, Mar 20, 2024 at 10:18:39AM -0400, Stefan Berger wrote: > > On 3/20/24 08:23, Peter Krempa wrote: > > > Did you consider the case when the migration fails and the VM will be > > > restored to run on the source host again?

[PATCH v4 3/3] conf: nodedev: Fill active_config at XML parse time

2024-04-17 Thread Cole Robinson
Commit v10.0.0-265-ge67bca23e4 added a `active_config` and `defined_config` to nodedev mdev internal XML handling. `defined_config` can be filled at XML parse time, but `active_config` must be filled in by nodedev driver. This wasn't implemented for the test driver however, which caused

[PATCH v4 1/3] test: make parsed nodedevs active and persistent

2024-04-17 Thread Cole Robinson
This was the implied default before nodedevs gained a notion of being inactive and transient. It also matches the implied default when parsing other object types Signed-off-by: Cole Robinson --- src/test/test_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/test_driver.c

[PATCH v4 2/3] test: Sync GetXML INACTIVE behavior with live driver

2024-04-17 Thread Cole Robinson
- Error if INACTIVE requested for transient object - Force dumping INACTIVE XML when object is inactive Signed-off-by: Cole Robinson --- src/test/test_driver.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c

[PATCH v4 0/3] test: fix nodedev mdev XML regression

2024-04-17 Thread Cole Robinson
See last patch for explanation. First two patches are related bugfixes/improvements v4 changes: - 3 patches pushed - mark parsed devices as persistent too - add GetXML fix patch Cole Robinson (3): test: make parsed nodedevs active and persistent test: Sync GetXML INACTIVE behavior with

Re: [PATCH v3 4/5] test: make nodedevs active by default

2024-04-17 Thread Cole Robinson
On 4/17/24 10:04 AM, Cole Robinson wrote: > On 4/9/24 11:19 AM, Boris Fiuczynski wrote: >> On 4/9/24 16:56, Cole Robinson wrote: >>> This was the implied default before nodedevs gained a notion of >>> being inactive, and matches how we handle parsing other objects >>> >>> Signed-off-by: Cole

Re: [PATCH v3 5/5] conf: nodedev: Fill active_config at XML parse time

2024-04-17 Thread Daniel P . Berrangé
On Wed, Apr 17, 2024 at 09:58:10AM -0400, Cole Robinson wrote: > On 4/9/24 11:20 AM, Boris Fiuczynski wrote: > > On 4/9/24 16:56, Cole Robinson wrote: > >> Commit v10.0.0-265-ge67bca23e4 added a `active_config` and > >> `defined_config` to nodedev mdev internal XML handling. > >> `defined_config`

Re: [PATCH v3 4/5] test: make nodedevs active by default

2024-04-17 Thread Cole Robinson
On 4/9/24 11:19 AM, Boris Fiuczynski wrote: > On 4/9/24 16:56, Cole Robinson wrote: >> This was the implied default before nodedevs gained a notion of >> being inactive, and matches how we handle parsing other objects >> >> Signed-off-by: Cole Robinson >> --- >>   src/test/test_driver.c | 1 + >>  

Re: [PATCH v3 5/5] conf: nodedev: Fill active_config at XML parse time

2024-04-17 Thread Cole Robinson
On 4/9/24 11:20 AM, Boris Fiuczynski wrote: > On 4/9/24 16:56, Cole Robinson wrote: >> Commit v10.0.0-265-ge67bca23e4 added a `active_config` and >> `defined_config` to nodedev mdev internal XML handling. >> `defined_config` can be filled at XML parse time, but `active_config` >> must be filled in

Re: [PATCH 06/10] qemu: Introduce shared_filesystems configuration option

2024-04-17 Thread Andrea Bolognani
On Tue, Mar 26, 2024 at 08:54:03AM -0700, Andrea Bolognani wrote: > On Wed, Mar 20, 2024 at 08:43:24AM -0700, Andrea Bolognani wrote: > > On Wed, Mar 20, 2024 at 12:37:37PM +0100, Peter Krempa wrote: > > > On Wed, Mar 20, 2024 at 10:19:11 +0100, Andrea Bolognani wrote: > > > > +# libvirt will

[PATCH v2 3/5] qemu: Propagate shared_filesystems

2024-04-17 Thread Andrea Bolognani
virFileIsSharedFS() is the function that ultimately decides whether a filesystem should be considered shared, but the list of manually configured shared filesystems is part of the QEMU driver's configuration, so we need to pass the information through several layers in order to make use of it.

[PATCH v2 5/5] qemu: Always set labels for TPM state

2024-04-17 Thread Andrea Bolognani
Up until this point, we have avoided setting labels for incoming migration when the TPM state is stored on a shared filesystem. This seems to make sense, because since the underlying storage is shared surely the labels will be as well. There's one problem, though: when a guest is migrated, the

[PATCH v2 2/5] qemu: Introduce shared_filesystems configuration option

2024-04-17 Thread Andrea Bolognani
As explained in the comment, this can help in scenarios where a shared filesystem can't be detected as such by libvirt, by giving the admin the opportunity to provide this information manually. Signed-off-by: Andrea Bolognani --- src/qemu/libvirtd_qemu.aug | 3 +++

[PATCH v2 4/5] utils: Use overrides in virFileIsSharedFS()

2024-04-17 Thread Andrea Bolognani
If the local admin has explicitly declared that a certain filesystem is to be considered shared, we should treat it as such. Signed-off-by: Andrea Bolognani --- src/util/virfile.c | 42 +- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git

[PATCH v2 1/5] security: Fix alignment

2024-04-17 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/security/security_selinux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index aaec34ff8b..a4915dbc89 100644 --- a/src/security/security_selinux.c +++

[PATCH v2 0/5] qemu: Introduce shared_filesystems configuration option

2024-04-17 Thread Andrea Bolognani
The need to have something like this in the first place is driven by KubeVirt (see [1] and [2]). A draft version of this series has been integrated into KubeVirt and it has been confirmed that it was effective in removing the need to use LD_PRELOAD hacks in the storage provider. Changes from

Re: [PATCH v2 4/4] qemu: Change return type of qemuDomainFixupCPUs to void

2024-04-17 Thread Peter Krempa
On Wed, Apr 17, 2024 at 14:36:11 +0200, Jiri Denemark wrote: > The function never fails. > > Signed-off-by: Jiri Denemark > --- Reviewed-by: Peter Krempa ___ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to

Re: [PATCH v2 3/4] qemu: Change return type of qemuDomainUpdateCPU to void

2024-04-17 Thread Peter Krempa
On Wed, Apr 17, 2024 at 14:36:10 +0200, Jiri Denemark wrote: > The function never fails. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_domain.c | 12 > src/qemu/qemu_domain.h | 2 +- > src/qemu/qemu_process.c | 8 +++- > 3 files changed, 8 insertions(+), 14

Re: [PATCH v2 1/4] qemu: Fix migration with custom XML

2024-04-17 Thread Peter Krempa
On Wed, Apr 17, 2024 at 14:36:08 +0200, Jiri Denemark wrote: > Ages ago origCPU in domain private data was introduced to provide > backward compatibility when migrating to an old libvirt, which did not > support fetching updated CPU definition from QEMU. Thus origCPU will > contain the original

[PATCH v2 4/4] qemu: Change return type of qemuDomainFixupCPUs to void

2024-04-17 Thread Jiri Denemark
The function never fails. Signed-off-by: Jiri Denemark --- Notes: Version 2: - virCPUDefCopy never returns NULL - do not remove !*origCPU check in qemuDomainFixupCPUs - make sure origCPU is set when reconnecting to running domains src/qemu/qemu_domain.c | 12

[PATCH v2 3/4] qemu: Change return type of qemuDomainUpdateCPU to void

2024-04-17 Thread Jiri Denemark
The function never fails. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 12 src/qemu/qemu_domain.h | 2 +- src/qemu/qemu_process.c | 8 +++- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[PATCH v2 2/4] NEWS: Mention migration bug with custom XML

2024-04-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index c108e66f46..852dadf532 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -21,6 +21,14 @@ v10.3.0 (unreleased) * **Bug fixes** + * qemu: Fix

[PATCH v2 1/4] qemu: Fix migration with custom XML

2024-04-17 Thread Jiri Denemark
Ages ago origCPU in domain private data was introduced to provide backward compatibility when migrating to an old libvirt, which did not support fetching updated CPU definition from QEMU. Thus origCPU will contain the original CPU definition before such update. But only if the update actually

[PATCH v2 0/4] qemu: Fix migration with custom XML

2024-04-17 Thread Jiri Denemark
Version 2: - see patch 1/4 for more details - added two cleanups Jiri Denemark (4): qemu: Fix migration with custom XML NEWS: Mention migration bug with custom XML qemu: Change return type of qemuDomainUpdateCPU to void qemu: Change return type of qemuDomainFixupCPUs to void NEWS.rst

Re: [PATCH 1/2] qemu: Fix migration with custom XML

2024-04-17 Thread Jiri Denemark
On Wed, Apr 17, 2024 at 09:15:39 +0200, Peter Krempa wrote: > On Tue, Apr 16, 2024 at 19:53:25 +0200, Jiri Denemark wrote: > > Ages ago origCPU in domain private data was introduced to provide > > backward compatibility when migrating to an old libvirt, which did not > > support fetching updated

Re: [PATCH] network: ensure nparams is non-negative

2024-04-17 Thread Daniel P . Berrangé
On Wed, Apr 17, 2024 at 02:03:38PM +0200, Ján Tomko wrote: > On a Tuesday in 2024, Daniel P. Berrangé wrote: > > On Tue, Apr 16, 2024 at 12:58:53PM +0200, Ján Tomko wrote: > > > On a Tuesday in 2024, Daniel P. Berrangé wrote: > > > > The typed parameter array must be either 0, or a positive > > >

Re: [PATCH] network: ensure nparams is non-negative

2024-04-17 Thread Ján Tomko
On a Tuesday in 2024, Daniel P. Berrangé wrote: On Tue, Apr 16, 2024 at 12:58:53PM +0200, Ján Tomko wrote: On a Tuesday in 2024, Daniel P. Berrangé wrote: > The typed parameter array must be either 0, or a positive > number. > Does this matter? The API documentation says: * @nparams: pointer

Re: [PATCH] qemu: Deliver shutoff reason with qemu hooks

2024-04-17 Thread Daniel P . Berrangé
On Wed, Apr 17, 2024 at 10:08:24AM +0200, Peter Krempa wrote: > On Wed, Apr 17, 2024 at 13:58:06 +0800, Sun Feng wrote: > > For abnormal shutoff reasons, we can start guest again with qemu hooks. > > Beware that: > > A hook script must not call back into libvirt, as the libvirt daemon is >

Re: [PATCH] qemu: Deliver shutoff reason with qemu hooks

2024-04-17 Thread Peter Krempa
On Wed, Apr 17, 2024 at 13:58:06 +0800, Sun Feng wrote: > For abnormal shutoff reasons, we can start guest again with qemu hooks. Beware that: A hook script must not call back into libvirt, as the libvirt daemon is already waiting for the script to exit. A deadlock is likely to occur.

[PATCH] qemu: Deliver shutoff reason with qemu hooks

2024-04-17 Thread Sun Feng
For abnormal shutoff reasons, we can start guest again with qemu hooks. Signed-off-by: Sun Feng --- docs/hooks.rst | 3 ++- src/qemu/qemu_process.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/hooks.rst b/docs/hooks.rst index 1dbc492bd4..45856e4ca4

Re: [PATCH v3 20/22] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine

2024-04-17 Thread Zhao Liu
On Tue, Apr 16, 2024 at 03:52:49PM +0200, Philippe Mathieu-Daudé wrote: > Date: Tue, 16 Apr 2024 15:52:49 +0200 > From: Philippe Mathieu-Daudé > Subject: [PATCH v3 20/22] hw/i386/pc: Remove deprecated pc-i440fx-2.3 > machine > X-Mailer: git-send-email 2.41.0 > > The pc-i440fx-2.3 machine was

Re: [PATCH v3 01/22] hw/i386/pc: Deprecate 2.4 to 2.7 pc-i440fx machines

2024-04-17 Thread Zhao Liu
On Tue, Apr 16, 2024 at 03:52:30PM +0200, Philippe Mathieu-Daudé wrote: > Date: Tue, 16 Apr 2024 15:52:30 +0200 > From: Philippe Mathieu-Daudé > Subject: [PATCH v3 01/22] hw/i386/pc: Deprecate 2.4 to 2.7 pc-i440fx > machines > X-Mailer: git-send-email 2.41.0 > > Similarly to the commit

Re: [PATCH 2/2] NEWS: Mention migration bug with custom XML

2024-04-17 Thread Jiri Denemark
On Wed, Apr 17, 2024 at 09:17:31 +0200, Peter Krempa wrote: > On Tue, Apr 16, 2024 at 19:53:26 +0200, Jiri Denemark wrote: > > Signed-off-by: Jiri Denemark > > --- > > NEWS.rst | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git a/NEWS.rst b/NEWS.rst > > index

Re: [PATCH 2/2] NEWS: Mention migration bug with custom XML

2024-04-17 Thread Peter Krempa
On Tue, Apr 16, 2024 at 19:53:26 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > NEWS.rst | 8 > 1 file changed, 8 insertions(+) > > diff --git a/NEWS.rst b/NEWS.rst > index c108e66f46..852dadf532 100644 > --- a/NEWS.rst > +++ b/NEWS.rst > @@ -21,6 +21,14 @@ v10.3.0

Re: [PATCH 1/2] qemu: Fix migration with custom XML

2024-04-17 Thread Peter Krempa
On Tue, Apr 16, 2024 at 19:53:25 +0200, Jiri Denemark wrote: > Ages ago origCPU in domain private data was introduced to provide > backward compatibility when migrating to an old libvirt, which did not > support fetching updated CPU definition from QEMU. Thus origCPU will > contain the original

Re: [PATCH 1/2] qemu: Fix migration with custom XML

2024-04-17 Thread Han Han
On Wed, Apr 17, 2024 at 1:54 AM Jiri Denemark wrote: > Ages ago origCPU in domain private data was introduced to provide > backward compatibility when migrating to an old libvirt, which did not > support fetching updated CPU definition from QEMU. Thus origCPU will > contain the original CPU