Re: [PATCH 7/8] ch: support restore with net devices

2024-06-28 Thread Purna Pavan Chandra Aekkaladevi
On Fri, Jun 28, 2024 at 09:59:29AM -0500, Praveen K Paladugu wrote: > > > On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: > > Cloud-hypervisor now supports restoring with new net fds. > > Ref: https://github.com/cloud-hypervisor/cloud-hypervisor/pull/6402 > > So, pass new tap fds via SCM_RIGHTS

Re: [PATCH 7/8] ch: support restore with net devices

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: Cloud-hypervisor now supports restoring with new net fds. Ref: https://github.com/cloud-hypervisor/cloud-hypervisor/pull/6402 So, pass new tap fds via SCM_RIGHTS to CH's restore api. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_driver.c

Re: [PATCH 8/8] qemu_domain: Set 'passt' net backend if 'default' is unsupported

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 15:12:37 +0200, Michal Privoznik wrote: > It may happen that QEMU is compiled without SLIRP but with > support for passt. In such case it is acceptable to alter user > provided configuration and switch backend to passt as it offers > all the features as SLIRP. > > Resolves:

Re: [PATCH 7/8] qemu_validate: Use domaincaps to validate supported net backend type

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 15:12:36 +0200, Michal Privoznik wrote: > Now that the logic for detecting supported net backend types has > been moved to domain capabilities generation, we can just use it > when validating net backend type. Just like we do for device > models and so on. > > Signed-off-by

Re: [PATCH 6/8] conf: Accept 'default' backend type for

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 15:12:35 +0200, Michal Privoznik wrote: > After previous commits, domain capabilities XML reports basically > two possible values for backend type: 'default' and 'passt'. > Despite its misleading name, 'default' really means 'use > hypervisor's builtin SLIRP'. Since it's rep

Re: [PATCH 5/8] qemu_capabilities: Fill supported net backend types

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 15:12:34 +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- Reviewed-by: Peter Krempa

Re: [PATCH 4/8] domain_capabilities: Introduce netdev capabilities

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 15:12:33 +0200, Michal Privoznik wrote: > If mgmt apps on top of libvirt want to make a decision on the > backend type for (e.g. whether past is > supported) we currently offer them no way to learn this fact. > Domain capabilities were invented exactly for this reason. Repo

Re: [PATCH 3/8] qemu_validate: Validate net backends against QEMU caps

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 15:12:32 +0200, Michal Privoznik wrote: > Now that we have a capability for each domain net backend we can > start validating user's selection against QEMU capabilities. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_validate.c | 26 +- >

Re: [PATCH 2/8] qemu_capabilities: Introduce QEMU_CAPS_NETDEV_USER

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 15:12:31 +0200, Michal Privoznik wrote: > Since -netdev user can be disabled during QEMU compilation, we > can't blindly expect it to just be there. We need a capability > that tracks its presence. > > For qemu-4.2.0 we are not able to detect the capability so do the > next

Re: [PATCH 1/8] libvirt_private.syms: Export virDomainNetBackendType enum handlers

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 15:12:30 +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/libvirt_private.syms | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Peter Krempa

Re: [PATCH] qemuDomainChangeNet: forbid changing portgroup

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 15:07:26 +0200, Adam Julis wrote: > While changing the portgroup attribute causes incorrect > behavior, this option is disabled for hot-plug. > > Resolves: https://issues.redhat.com/browse/RHEL-7299 > Signed-off-by: Adam Julis > --- > src/qemu/qemu_hotplug.c | 7 +++ >

Re: [PATCH 5/8] ch: use monitor socket fd to send restore request

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: This change will later help in passing new net fds to CH during restore operation. Please consider rewording this commit message to contain a 'what' and a 'why'. Something to the effect of: Instead of curl, use low-level socket connections t

[PATCH 8/8] qemu_domain: Set 'passt' net backend if 'default' is unsupported

2024-06-28 Thread Michal Privoznik
It may happen that QEMU is compiled without SLIRP but with support for passt. In such case it is acceptable to alter user provided configuration and switch backend to passt as it offers all the features as SLIRP. Resolves: https://issues.redhat.com/browse/RHEL-45518 Signed-off-by: Michal Privoznik

[PATCH 7/8] qemu_validate: Use domaincaps to validate supported net backend type

2024-06-28 Thread Michal Privoznik
Now that the logic for detecting supported net backend types has been moved to domain capabilities generation, we can just use it when validating net backend type. Just like we do for device models and so on. Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 28 +

[PATCH 5/8] qemu_capabilities: Fill supported net backend types

2024-06-28 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 16 src/qemu/qemu_capabilities.h | 3 +++ tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 5 + tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 5 + tests/do

[PATCH 6/8] conf: Accept 'default' backend type for

2024-06-28 Thread Michal Privoznik
After previous commits, domain capabilities XML reports basically two possible values for backend type: 'default' and 'passt'. Despite its misleading name, 'default' really means 'use hypervisor's builtin SLIRP'. Since it's reported in domain capabilities as a value accepted, make our parser and XM

[PATCH 4/8] domain_capabilities: Introduce netdev capabilities

2024-06-28 Thread Michal Privoznik
If mgmt apps on top of libvirt want to make a decision on the backend type for (e.g. whether past is supported) we currently offer them no way to learn this fact. Domain capabilities were invented exactly for this reason. Report supported net backend types there. Now, because of backwards compati

[PATCH 3/8] qemu_validate: Validate net backends against QEMU caps

2024-06-28 Thread Michal Privoznik
Now that we have a capability for each domain net backend we can start validating user's selection against QEMU capabilities. Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu

[PATCH 2/8] qemu_capabilities: Introduce QEMU_CAPS_NETDEV_USER

2024-06-28 Thread Michal Privoznik
Since -netdev user can be disabled during QEMU compilation, we can't blindly expect it to just be there. We need a capability that tracks its presence. For qemu-4.2.0 we are not able to detect the capability so do the next best thing - assume the capability is there. This is consistent with our cu

[PATCH 1/8] libvirt_private.syms: Export virDomainNetBackendType enum handlers

2024-06-28 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index f7a0a8bc36..3373c5a88c 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -533,6 +533,8 @@ virDomainNet

[PATCH 0/8] Report 'passt' support in domain capabilities

2024-06-28 Thread Michal Privoznik
There are some distributions that consider switching from SLIRP to just passt. While libvirt wires no defaults and leaves this kind of decisions onto upper layers, it can help mgmt apps do the decision by reporting passt support in domain capabilities. Michal Prívozník (8): libvirt_private.syms:

[PATCH] qemuDomainChangeNet: forbid changing portgroup

2024-06-28 Thread Adam Julis
While changing the portgroup attribute causes incorrect behavior, this option is disabled for hot-plug. Resolves: https://issues.redhat.com/browse/RHEL-7299 Signed-off-by: Adam Julis --- src/qemu/qemu_hotplug.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/

Re: [PATCH] NEWS: Mention crash when VM shuts down during migration

2024-06-28 Thread Jiri Denemark
On Fri, Jun 28, 2024 at 15:00:29 +0200, Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > NEWS.rst | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/NEWS.rst b/NEWS.rst > index 1ea98599db..5557018f33 100644 > --- a/NEWS.rst > +++ b/NEWS.rst > @@ -65,6 +65,11 @@ v10.5.0 (unrel

[PATCH] NEWS: Mention crash when VM shuts down during migration

2024-06-28 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 1ea98599db..5557018f33 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -65,6 +65,11 @@ v10.5.0 (unreleased) have failed as the destination would incorrectly expect those featur

Re: [PATCH 4/8] ch: poll with -1 in chSocketRecv

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: chSocketRecv fn can be used by operations such as restore, which cannot have a specific poll timeout. The runtime of these operations at server side (vmm) cannot be determined or capped as it depends on the guest configuration. Hence, pass -1 as

Re: [PATCH] NEWS: Document features/improvements/bug fixes I've participated in

2024-06-28 Thread Boris Fiuczynski
On 6/28/24 12:48 PM, Jiri Denemark wrote: +argument 'extra' is used to pass VM shutoff reason in the call to release +hook. + + * nodedev: improve DASD detection + +In newer DASD driver versions the ID_TYPE tag is supported. This tag is +missing after a system reboot but when the

Re: [PATCH 3/8] ch: refactor chProcessAddNetworkDevices

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: Move socket connection code to a new function. There could be other functions which might want to perform similar socket connection operation. Hence, move it to a new function. Similarly move http response processing and closing FDs to new funct

Re: [PATCH] NEWS: Mention migration fix with disabled vmx-* CPU features

2024-06-28 Thread Michal Prívozník
On 6/28/24 13:39, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > NEWS.rst | 6 ++ > 1 file changed, 6 insertions(+) > Reviewed-by: Michal Privoznik Michal

[PATCH] NEWS: Mention migration fix with disabled vmx-* CPU features

2024-06-28 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index b0b893b484..1ea98599db 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -59,6 +59,12 @@ v10.5.0 (unreleased) A memory leak was identified when a client started SASL but then s

Re: [PATCH 1/8] ch: report response message instead of just code

2024-06-28 Thread Praveen K Paladugu
On 6/28/2024 2:26 AM, Purna Pavan Chandra wrote: The response message from CH for vm.add-net api will be more helpful in debugging. Hence, log the message instead of just response code. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_process.c | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [PATCH] NEWS: Document features/improvements/bug fixes I've participated in

2024-06-28 Thread Peter Krempa
On Fri, Jun 28, 2024 at 10:54:14 +0200, Michal Privoznik wrote: > There are some features/improvements/bug fixes I've either > contributed or reviewed/merged. Document them for upcoming > release. > > Signed-off-by: Michal Privoznik > --- > NEWS.rst | 30 ++ > 1 file

Re: [PATCH] NEWS: Document features/improvements/bug fixes I've participated in

2024-06-28 Thread Jiri Denemark
On Fri, Jun 28, 2024 at 10:54:14 +0200, Michal Privoznik wrote: > There are some features/improvements/bug fixes I've either > contributed or reviewed/merged. Document them for upcoming > release. > > Signed-off-by: Michal Privoznik > --- > NEWS.rst | 30 ++ > 1 file

[PATCH] NEWS: Document features/improvements/bug fixes I've participated in

2024-06-28 Thread Michal Privoznik
There are some features/improvements/bug fixes I've either contributed or reviewed/merged. Document them for upcoming release. Signed-off-by: Michal Privoznik --- NEWS.rst | 30 ++ 1 file changed, 30 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index bc8acc62d4..d6

[PATCH 8/8] ch: kill CH process if restore fails

2024-06-28 Thread Purna Pavan Chandra
Invoke virCHProcessStop to kill CH process incase of any failures during restore operation. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index cb3539ebe5..acd542b24e 100644 --- a/src/ch/

[PATCH 6/8] ch: refactor virCHMonitorSaveVM

2024-06-28 Thread Purna Pavan Chandra
Remove the unwanted utility function and make api calls directly from virCHMonitorSaveVM fn Signed-off-by: Purna Pavan Chandra --- src/ch/ch_monitor.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index

[PATCH 7/8] ch: support restore with net devices

2024-06-28 Thread Purna Pavan Chandra
Cloud-hypervisor now supports restoring with new net fds. Ref: https://github.com/cloud-hypervisor/cloud-hypervisor/pull/6402 So, pass new tap fds via SCM_RIGHTS to CH's restore api. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_driver.c | 9 +--- src/ch/ch_monitor.c | 21 - src/c

[PATCH 5/8] ch: use monitor socket fd to send restore request

2024-06-28 Thread Purna Pavan Chandra
This change will later help in passing new net fds to CH during restore operation. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_monitor.c | 13 +++-- src/ch/ch_monitor.h | 2 +- src/ch/ch_process.c | 39 +-- 3 files changed, 45 insertions(+), 9 de

[PATCH 4/8] ch: poll with -1 in chSocketRecv

2024-06-28 Thread Purna Pavan Chandra
chSocketRecv fn can be used by operations such as restore, which cannot have a specific poll timeout. The runtime of these operations at server side (vmm) cannot be determined or capped as it depends on the guest configuration. Hence, pass -1 as timeout to poll to make wait until there's a response

[PATCH 2/8] ch: Pass net ids explicitly during vm creation

2024-06-28 Thread Purna Pavan Chandra
Pass "net_" as net id to CH. This is to have better control over the network configs. This id can be further used in performing operations like restore etc. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_monitor.c | 7 ++- src/ch/ch_monitor.h | 4 +++- src/ch/ch_process.c | 2 +- 3 files c

[PATCH 0/8] ch: support restore with network devices

2024-06-28 Thread Purna Pavan Chandra
Current ch driver supports restore only for domains without any network configuration defined. This was because libvirt explicitly passes network fds and CH did not had support to restore with new net FDS. This support has been added recently, https://github.com/cloud-hypervisor/cloud-hypervisor/pu

[PATCH 3/8] ch: refactor chProcessAddNetworkDevices

2024-06-28 Thread Purna Pavan Chandra
Move socket connection code to a new function. There could be other functions which might want to perform similar socket connection operation. Hence, move it to a new function. Similarly move http response processing and closing FDs to new functions. Signed-off-by: Purna Pavan Chandra --- src/ch

[PATCH 1/8] ch: report response message instead of just code

2024-06-28 Thread Purna Pavan Chandra
The response message from CH for vm.add-net api will be more helpful in debugging. Hence, log the message instead of just response code. Signed-off-by: Purna Pavan Chandra --- src/ch/ch_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch/ch_process.c b/src/ch/ch_