[PATCH 0/2] A couple of migration blocker query patches

2022-07-20 Thread Laine Stump
Five minutes after pushing eperezma's patches that query QEMU for migration blockers, I realized that the query would be called during "offline migration" (when there is no QEMU process running). So the 1st patch moves the query down so it will only be called during live migration. The 2nd patch t

[PATCH 1/2] qemu: don't try to query QEMU about migration blockers during offline migration

2022-07-20 Thread Laine Stump
The new code that queries QEMU about migration blockers was put at the top of qemuMigrationSrcIsAllowed(), but that function can also be called in the case of offline migration (ie when the domain is inactive / QEMU isn't running). This check should have been put inside the "if (!(flags & VIR_MIGRA

[PATCH 2/2] qemu: skip hardcoded hostdev migration check if QEMU can do it for us

2022-07-20 Thread Laine Stump
libvirt currently will block migration for any vfio-assigned device unless it is a network device that is associated with a virtio-net failover device (ie. if the hostdev object has a teaming->type == VIR_DOMAIN_NET_TEAMING_TYPE_TRANSIENT). In the future there will be other vfio devices that can b

Re: [libvirt PATCH v4 0/4] Ask qemu about migration blockers

2022-07-20 Thread Eugenio Perez Martin
On Thu, Jul 21, 2022 at 7:02 AM Laine Stump wrote: > > This all looks good except a couple small nits that I've noted in > separate messages for the individual patches. > > I've already made these minor changes locally and pushed them here: > >https://gitlab.com/lainestump/libvirt/-/commits/RE

Re: [libvirt PATCH v4 2/4] qemu_monitor: add support for get qemu migration blockers

2022-07-20 Thread Laine Stump
On 7/20/22 12:05 PM, Eugenio Pérez wrote: since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemu monitor to send

Re: [libvirt PATCH v4 4/4] qemu_migration: Do not forbid vDPA devices if can query blockers

2022-07-20 Thread Laine Stump
On 7/20/22 12:05 PM, Eugenio Pérez wrote: vDPA devices will be migratable soon. Since they are not migratable before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking for migration blockers, let it hardcoded in that case. Otherwise, ask qemu about the explicit blocker. I reworded

Re: [libvirt PATCH v4 3/4] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Laine Stump
On 7/20/22 12:05 PM, Eugenio Pérez wrote: since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemuMigrationSrcIsAl

Re: [libvirt PATCH v4 0/4] Ask qemu about migration blockers

2022-07-20 Thread Laine Stump
This all looks good except a couple small nits that I've noted in separate messages for the individual patches. I've already made these minor changes locally and pushed them here: https://gitlab.com/lainestump/libvirt/-/commits/REVIEW If it all looks okay to you, I'll push it as soon as I ge

RE: [libvirt][PATCH v13 1/6] Define SGX capabilities structs

2022-07-20 Thread Huang, Haibin
> -Original Message- > From: Michal Prívozník > Sent: Wednesday, July 20, 2022 7:27 PM > To: Yang, Lin A ; libvir-list@redhat.com; Huang, Haibin > ; Ding, Jian-feng > Subject: Re: [libvirt][PATCH v13 1/6] Define SGX capabilities structs > > On 7/1/22 21:14, Lin Yang wrote: > > From: Ha

RE: [libvirt][PATCH v13 0/6] Support query and use SGX

2022-07-20 Thread Yang, Lin A
> This version is a bit better than the previous one. But we're at version > 13 and I am still unable to even start a guest. Please, make sure that this > basic functionality works in v14, because this is plain waste of precious > review bandwidth. > > Anyway, as usual, I've uploaded my suggested

[libvirt PATCH v4 3/4] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Eugenio Pérez
since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemuMigrationSrcIsAllowed to query it. Signed-off-by: Eugenio P

[libvirt PATCH v4 1/4] qemu: introduce capability QEMU_CAPS_MIGRATION_BLOCKED_REASONS

2022-07-20 Thread Eugenio Pérez
From: Jonathon Jongsma since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Signed-off-by: Jonathon Jongsma Signed-off-by

[libvirt PATCH v4 0/4] Ask qemu about migration blockers

2022-07-20 Thread Eugenio Pérez
There are some hardcoded migration blockers in libvirt, like having a net vhost-vdpa device. While it's true that they cannot be migrated at the moment, there are plans to be able to migrate them soon. They'll put a migration blockers in the cases where you cannot migrate them. Ask qemu about then

[libvirt PATCH v4 4/4] qemu_migration: Do not forbid vDPA devices if can query blockers

2022-07-20 Thread Eugenio Pérez
vDPA devices will be migratable soon. Since they are not migratable before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking for migration blockers, let it hardcoded in that case. Otherwise, ask qemu about the explicit blocker. Signed-off-by: Eugenio Pérez Reviewed-by: Jiri Denemar

[libvirt PATCH v4 2/4] qemu_monitor: add support for get qemu migration blockers

2022-07-20 Thread Eugenio Pérez
since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemu monitor to send this query. This will allow qemuMigrationS

Re: [libvirt PATCH v3 3/4] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 4:48 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 16:29:45 +0200, Eugenio Perez Martin wrote: > > On Wed, Jul 20, 2022 at 4:01 PM Jiri Denemark wrote: > > > > > > On Wed, Jul 20, 2022 at 14:15:57 +0200, Eugenio Pérez wrote: > > > > since qemu 6.0, if migration is bl

RE: Persistent Failed to attach device following transient Failed to read product/vendor ID

2022-07-20 Thread Pighin, Anthony (Nokia - CA/Ottawa)
Correct, PCIe link bounce/flap. The attached PCIe device entered a failed state where it was repeatedly resetting, and therefore the link itself was going up and down. -Original Message- From: Michal Prívozník Sent: Wednesday, July 20, 2022 11:07 AM To: Pighin, Anthony (Nokia - CA/Otta

Re: Persistent Failed to attach device following transient Failed to read product/vendor ID

2022-07-20 Thread Michal Prívozník
On 7/11/22 20:14, Pighin, Anthony (Nokia - CA/Ottawa) wrote: > I'm attempting to solve the issue reported here: > > https://gitlab.com/libvirt/libvirt/-/issues/345 > > Hoping the originator of virHostdevDeleteMissingPCIDevices() will be able to > comment, as I am still trying to reproduce the is

Re: [PATCH] qemu: support hotplug cdrom with usb/scsi bus

2022-07-20 Thread Michal Prívozník
On 7/6/22 11:57, minglei.liu wrote: > Qemu support hotplug cdrom device with usb or scsi bus, > just unblock these devices in qemuDomainAttachDeviceDiskLiveInternal > and qemuDomainDetachPrepDisk. > > Fixes: #261 We like the full URL as it's easily clickable when viewing git log. > > Signed-off

Re: [libvirt PATCH v3 3/4] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 16:29:45 +0200, Eugenio Perez Martin wrote: > On Wed, Jul 20, 2022 at 4:01 PM Jiri Denemark wrote: > > > > On Wed, Jul 20, 2022 at 14:15:57 +0200, Eugenio Pérez wrote: > > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > > > will return an array

Re: [PATCH 5/9] domain_conf: replace switch with if in virDomainChrDefFree()

2022-07-20 Thread Michal Prívozník
On 7/20/22 15:44, Peter Krempa wrote: > On Wed, Jul 20, 2022 at 15:11:08 +0200, Kristina Hanicova wrote: >> Switch is used for just one case, so I replaced it with a simple >> if condition. >> >> Signed-off-by: Kristina Hanicova >> --- >> src/conf/domain_conf.c | 7 +-- >> 1 file changed, 1 i

Re: [libvirt PATCH v3 3/4] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 4:01 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 14:15:57 +0200, Eugenio Pérez wrote: > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > > will return an array of error strings describing the migration blockers. > > This can be used to ch

Re: [PATCH 9/9] domain_conf: rewrite variable setting to ternary operator

2022-07-20 Thread Michal Prívozník
On 7/20/22 15:40, Peter Krempa wrote: > On Wed, Jul 20, 2022 at 15:11:12 +0200, Kristina Hanicova wrote: >> Signed-off-by: Kristina Hanicova >> --- >> src/conf/domain_conf.c | 8 ++-- >> 1 file changed, 2 insertions(+), 6 deletions(-) >> >> diff --git a/src/conf/domain_conf.c b/src/conf/domai

Re: [libvirt PATCH v3 2/4] qemu_monitor: add support for get qemu migration blockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 3:58 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 14:15:56 +0200, Eugenio Pérez wrote: > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > > will return an array of error strings describing the migration blockers. > > This can be used to ch

Re: [libvirt PATCH v3 4/4] qemu_migration: Do not forbid vDPA devices if can query blockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 4:02 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 14:15:58 +0200, Eugenio Pérez wrote: > > vDPA devices will be migratable soon. Since they are not migratable > > before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking > > for migration blockers, let i

Re: [PATCH 9/9] domain_conf: rewrite variable setting to ternary operator

2022-07-20 Thread Kristina Hanicova
On Wed, Jul 20, 2022 at 3:41 PM Peter Krempa wrote: > On Wed, Jul 20, 2022 at 15:11:12 +0200, Kristina Hanicova wrote: > > Signed-off-by: Kristina Hanicova > > --- > > src/conf/domain_conf.c | 8 ++-- > > 1 file changed, 2 insertions(+), 6 deletions(-) > > > > diff --git a/src/conf/domain_c

Re: [libvirt PATCH v3 4/4] qemu_migration: Do not forbid vDPA devices if can query blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 14:15:58 +0200, Eugenio Pérez wrote: > vDPA devices will be migratable soon. Since they are not migratable > before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking > for migration blockers, let it hardcoded in that case. > > Otherwise, ask qemu about the exp

Re: [libvirt PATCH v3 3/4] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 14:15:57 +0200, Eugenio Pérez wrote: > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > will return an array of error strings describing the migration blockers. > This can be used to check whether there are any devices blocking > migration, etc. >

Re: [PATCH] domain_conf: remove else after return / goto

2022-07-20 Thread Kristina Hanicova
On Wed, Jul 20, 2022 at 3:34 PM Daniel P. Berrangé wrote: > > What's the reasoning for making this change ? > I stumbled upon this and decided to rewrite code in src/conf/ that could be easily improved. > > On Wed, Jul 20, 2022 at 02:59:58PM +0200, Kristina Hanicova wrote: > > Signed-off-by: K

Re: [libvirt PATCH v3 2/4] qemu_monitor: add support for get qemu migration blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 14:15:56 +0200, Eugenio Pérez wrote: > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > will return an array of error strings describing the migration blockers. > This can be used to check whether there are any devices blocking > migration, etc. >

Re: [libvirt PATCH v3 1/4] qemu: introduce capability QEMU_CAPS_MIGRATION_BLOCKED_REASONS

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 14:15:55 +0200, Eugenio Pérez wrote: > From: Jonathon Jongsma > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > will return an array of error strings describing the migration blockers. > This can be used to check whether there are any devices b

Re: [PATCH 5/9] domain_conf: replace switch with if in virDomainChrDefFree()

2022-07-20 Thread Peter Krempa
On Wed, Jul 20, 2022 at 15:11:08 +0200, Kristina Hanicova wrote: > Switch is used for just one case, so I replaced it with a simple > if condition. > > Signed-off-by: Kristina Hanicova > --- > src/conf/domain_conf.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/

Re: [PATCH 9/9] domain_conf: rewrite variable setting to ternary operator

2022-07-20 Thread Peter Krempa
On Wed, Jul 20, 2022 at 15:11:12 +0200, Kristina Hanicova wrote: > Signed-off-by: Kristina Hanicova > --- > src/conf/domain_conf.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index e52f39c809..b600bfec31 10064

Re: [PATCH 6/9] domain_conf: rewrite virDomainSoundCodecDefFree()

2022-07-20 Thread Daniel P . Berrangé
On Wed, Jul 20, 2022 at 03:11:09PM +0200, Kristina Hanicova wrote: > Signed-off-by: Kristina Hanicova > --- > src/conf/domain_conf.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index f51476c968..88d50d27f5 10064

Re: [PATCH] domain_conf: remove else after return / goto

2022-07-20 Thread Daniel P . Berrangé
What's the reasoning for making this change ? On Wed, Jul 20, 2022 at 02:59:58PM +0200, Kristina Hanicova wrote: > Signed-off-by: Kristina Hanicova > --- > src/conf/domain_conf.c | 55 -- > 1 file changed, 31 insertions(+), 24 deletions(-) > > diff --gi

[PATCH 2/9] domain_capabilities: reformat virDomainCapsFeatureSEVFormat()

2022-07-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/domain_capabilities.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index bb36a956db..6e8f957657 100644 --- a/src/conf/domain_capabilities.c +++ b/src

Re: [PATCH] qemu: domainjob: remove async variable from qemuDomainObjBeginJobInternal()

2022-07-20 Thread Michal Prívozník
On 7/19/22 14:47, Kristina Hanicova wrote: > This patch removes variable 'async', which is used only once, and > replaces it with direct comparison with an enum member. > > Signed-off-by: Kristina Hanicova > --- > src/qemu/qemu_domainjob.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions

[PATCH 8/9] domain_conf: rewrite conditions in virDomainObjWaitUntil()

2022-07-20 Thread Kristina Hanicova
This patch rewrites conditions to make the code easier and less structured. Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1c29a2d929..e52f39c80

[PATCH 1/9] domain_capabilities: use early return in virDomainCapsFeatureSEVFormat()

2022-07-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/domain_capabilities.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 33570a51db..bb36a956db 100644 --- a/src/conf/domain_cap

[PATCH 6/9] domain_conf: rewrite virDomainSoundCodecDefFree()

2022-07-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f51476c968..88d50d27f5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2955,10 +2955,8 @

[PATCH 3/9] domain_capabilities: reformat virDomainCapsCPUCustomFormat()

2022-07-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/domain_capabilities.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 6e8f957657..653123f293 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/dom

[PATCH 5/9] domain_conf: replace switch with if in virDomainChrDefFree()

2022-07-20 Thread Kristina Hanicova
Switch is used for just one case, so I replaced it with a simple if condition. Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b903dac1cb..f51476c968 100644

[PATCH 4/9] domain_conf: remove breaks after return in virDomainChrSourceDefIsEqual()

2022-07-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 26a241db38..b903dac1cb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2844,21 +

[PATCH 7/9] domain_conf: use early return in virDomainObjAssignDef()

2022-07-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 88d50d27f5..1c29a2d929 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain

[PATCH 0/9] domain_conf & domain_capabilities: small refactoring

2022-07-20 Thread Kristina Hanicova
*** BLURB HERE *** Kristina Hanicova (9): domain_capabilities: use early return in virDomainCapsFeatureSEVFormat() domain_capabilities: reformat virDomainCapsFeatureSEVFormat() domain_capabilities: reformat virDomainCapsCPUCustomFormat() domain_conf: remove breaks after return in v

[PATCH 9/9] domain_conf: rewrite variable setting to ternary operator

2022-07-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e52f39c809..b600bfec31 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4206,12 +4206,8

Re: [PATCH] schemas: Update ref acpi for devices

2022-07-20 Thread Michal Prívozník
On 7/19/22 09:02, Han Han wrote: > According to a9fe9569ab, the is only for PCI > devices. Remove the ref acpi from devices channel, smartcard, tpm, > redirdev, panic, hub because none of them has PCI address. And add the > ref acpi to iommu device. > > Fixes: a9fe9569ab > > Signed-off-by: Han H

[PATCH] domain_conf: remove else after return / goto

2022-07-20 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 55 -- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 44a01ab628..bc4b74c1c8 100644 --- a/src/conf/domain_conf.c +++ b/src/c

Re: [PATCH] domain_conf: rewrite if else condition

2022-07-20 Thread Michal Prívozník
On 7/20/22 14:42, Kristina Hanicova wrote: > This patch prevents nesting of if conditions and makes the code > cleaner. > > Signed-off-by: Kristina Hanicova > --- > src/conf/domain_conf.c | 50 +- > 1 file changed, 25 insertions(+), 25 deletions(-) > > di

Re: [PATCH 0/5] hypervisor: move job object into hypervisor

2022-07-20 Thread Michal Prívozník
On 7/19/22 15:48, Kristina Hanicova wrote: > This series moves generalized qemu job object into hypervisor/ and > replaces all other hypervisor-specific job objects. > > Kristina Hanicova (5): > qemu & hypervisor: move job object into hypervisor > hypervisor: domain_job: rename members in >

Re: [PATCH] hypervisor: domain_job: add and edit description

2022-07-20 Thread Michal Prívozník
On 7/19/22 14:52, Kristina Hanicova wrote: > Signed-off-by: Kristina Hanicova > --- > src/hypervisor/domain_job.c | 2 ++ > src/hypervisor/domain_job.h | 5 - > 2 files changed, 6 insertions(+), 1 deletion(-) > Reviewed-by: Michal Privoznik Michal

[PATCH] domain_conf: rewrite if else condition

2022-07-20 Thread Kristina Hanicova
This patch prevents nesting of if conditions and makes the code cleaner. Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c in

Re: [libvirt PATCH] nodedev: support 'mtty' device for testing

2022-07-20 Thread Michal Prívozník
On 7/19/22 18:33, Jonathon Jongsma wrote: > It would be nice to be able to test the mediated device capabilities > without having physical hardware which supports it. The 'mtty' kernel > module presents a virtual parent device which is capable of creating > 'fake' mediated devices, and as such it w

[libvirt PATCH v3 3/4] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Eugenio Pérez
since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemuMigrationSrcIsAllowed to query it. Signed-off-by: Eugenio P

[libvirt PATCH v3 0/4] Ask qemu about migration blockers

2022-07-20 Thread Eugenio Pérez
There are some hardcoded migration blockers in libvirt, like having a net vhost-vdpa device. While it's true that they cannot be migrated at the moment, there are plans to be able to migrate them soon. They'll put a migration blockers in the cases where you cannot migrate them. Ask qemu about then

[libvirt PATCH v3 1/4] qemu: introduce capability QEMU_CAPS_MIGRATION_BLOCKED_REASONS

2022-07-20 Thread Eugenio Pérez
From: Jonathon Jongsma since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Signed-off-by: Jonathon Jongsma Signed-off-by

[libvirt PATCH v3 2/4] qemu_monitor: add support for get qemu migration blockers

2022-07-20 Thread Eugenio Pérez
since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemu monitor to send this query. This will allow qemuMigrationS

[libvirt PATCH v3 4/4] qemu_migration: Do not forbid vDPA devices if can query blockers

2022-07-20 Thread Eugenio Pérez
vDPA devices will be migratable soon. Since they are not migratable before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking for migration blockers, let it hardcoded in that case. Otherwise, ask qemu about the explicit blocker. Signed-off-by: Eugenio Pérez --- v3: Fix indentation -

Re: [libvirt PATCH v2 4/5] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 13:25:45 +0200, Eugenio Perez Martin wrote: > On Wed, Jul 20, 2022 at 12:31 PM Jiri Denemark wrote: > > > > On Wed, Jul 20, 2022 at 11:11:53 +0200, Eugenio Pérez wrote: > > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > > > will return an array

Re: [libvirt][PATCH v13 2/6] Get SGX capabilities form QMP

2022-07-20 Thread Michal Prívozník
On 7/1/22 21:14, Lin Yang wrote: > From: Haibin Huang > > Generate the QMP command for query-sgx-capabilities and the command > return sgx capabilities from QMP. > > {"execute":"query-sgx-capabilities"} > > the right reply: > {"return": > { > "sgx": true, > "section-size": 197

Re: [libvirt][PATCH v13 1/6] Define SGX capabilities structs

2022-07-20 Thread Michal Prívozník
On 7/1/22 21:14, Lin Yang wrote: > From: Haibin Huang > > Signed-off-by: Michal Privoznik > Signed-off-by: Haibin Huang > --- > src/conf/domain_capabilities.c | 10 ++ > src/conf/domain_capabilities.h | 24 > src/libvirt_private.syms | 1 + > 3 files cha

Re: [libvirt][PATCH v13 3/6] Convert QMP capabilities to domain capabilities

2022-07-20 Thread Michal Prívozník
On 7/1/22 21:14, Lin Yang wrote: > From: Haibin Huang > > the QMP capabilities: > {"return": > { > "sgx": true, > "section-size": 1024, > "flc": true > } > } > > the domain capabilities: > > yes > 1 > > > Signed-off-by: Michal Privoznik > Signed-off-

Re: [libvirt][PATCH v13 4/6] conf: expose SGX feature in domain capabilities

2022-07-20 Thread Michal Prívozník
On 7/1/22 21:14, Lin Yang wrote: > From: Haibin Huang > > Extend hypervisor capabilities to include sgx feature. When available, > the hypervisor supports launching an VM with SGX on Intel platfrom. > The SGX feature tag privides additional details like section size and > sgx1 or sgx2. > > Signe

Re: [libvirt][PATCH v13 5/6] conf: Introduce SGX EPC element into device memory xml

2022-07-20 Thread Michal Prívozník
On 7/1/22 21:14, Lin Yang wrote: > With NUMA config: > > > ... > > > 0-1 > > > 512 > 0 > > > ... > > > Without NUMA config: > > > ... > > > 512 > > > ... > > > Signed-off-by: Lin Yang > Signed-off-by: Michal Privozni

Re: [libvirt][PATCH v13 6/6] qemu: Add command-line to generate SGX EPC memory backend

2022-07-20 Thread Michal Prívozník
On 7/1/22 21:14, Lin Yang wrote: > According to the result parsing from xml, add the argument of > SGX EPC memory backend into QEMU command line. > > With NUMA config: > > #qemu-system-x86_64 \ > .. \ > -object > '{"qom-type":"memory-backend-epc","id":"memepc0","prealloc"

Re: [libvirt][PATCH v13 0/6] Support query and use SGX

2022-07-20 Thread Michal Prívozník
On 7/1/22 21:14, Lin Yang wrote: > This patch series provides support for enabling Intel's Software Guard > Extensions (SGX) feature in guest VM. > This version is a bit better than the previous one. But we're at version 13 and I am still unable to even start a guest. Please, make sure that this

Re: [libvirt PATCH v2 4/5] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 12:31 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 11:11:53 +0200, Eugenio Pérez wrote: > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > > will return an array of error strings describing the migration blockers. > > This can be used to c

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 13:11:57 +0200, Eugenio Perez Martin wrote: > On Wed, Jul 20, 2022 at 12:36 PM Jiri Denemark wrote: > > > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > > vDPA devices will be migratable soon. Since they are not migratable > > > before qemu 6.0, and qemu

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 1:13 PM Peter Krempa wrote: > > On Wed, Jul 20, 2022 at 13:11:57 +0200, Eugenio Perez Martin wrote: > > On Wed, Jul 20, 2022 at 12:36 PM Jiri Denemark wrote: > > > > > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > > > vDPA devices will be migratable so

Re: [libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 1:13 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 12:43:44 +0200, Eugenio Perez Martin wrote: > > On Wed, Jul 20, 2022 at 12:14 PM Jiri Denemark wrote: > > > > > > On Wed, Jul 20, 2022 at 11:11:51 +0200, Eugenio Pérez wrote: > > > > This will allow qemuMigrationSrcI

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Peter Krempa
On Wed, Jul 20, 2022 at 13:11:57 +0200, Eugenio Perez Martin wrote: > On Wed, Jul 20, 2022 at 12:36 PM Jiri Denemark wrote: > > > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > > vDPA devices will be migratable soon. Since they are not migratable > > > before qemu 6.0, and qemu

Re: [libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 12:43:44 +0200, Eugenio Perez Martin wrote: > On Wed, Jul 20, 2022 at 12:14 PM Jiri Denemark wrote: > > > > On Wed, Jul 20, 2022 at 11:11:51 +0200, Eugenio Pérez wrote: > > > This will allow qemuMigrationSrcIsAllowed to dynamically ask for > > > migration blockers, reducing

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 12:36 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > vDPA devices will be migratable soon. Since they are not migratable > > before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking > > for migration blockers, let

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 12:37 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 12:36:16 +0200, Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > > vDPA devices will be migratable soon. Since they are not migratable > > > before qemu 6.0, and qemu pre-6.0

Re: [libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Eugenio Perez Martin
On Wed, Jul 20, 2022 at 12:14 PM Jiri Denemark wrote: > > On Wed, Jul 20, 2022 at 11:11:51 +0200, Eugenio Pérez wrote: > > This will allow qemuMigrationSrcIsAllowed to dynamically ask for > > migration blockers, reducing duplication. > > > > Signed-off-by: Eugenio Pérez > > --- > > src/qemu/qemu

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 12:36:16 +0200, Jiri Denemark wrote: > On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > > vDPA devices will be migratable soon. Since they are not migratable > > before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking > > for migration blockers,

Re: [libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:54 +0200, Eugenio Pérez wrote: > vDPA devices will be migratable soon. Since they are not migratable > before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking > for migration blockers, let it hardcoded in that case. > > Otherwise, ask qemu about the exp

Re: [libvirt PATCH v2 4/5] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:53 +0200, Eugenio Pérez wrote: > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > will return an array of error strings describing the migration blockers. > This can be used to check whether there are any devices blocking > migration, etc. >

Re: [libvirt PATCH v2 3/5] qemu_monitor: add support for get qemu migration blockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:52 +0200, Eugenio Pérez wrote: > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > will return an array of error strings describing the migration blockers. > This can be used to check whether there are any devices blocking > migration, etc. >

Re: [libvirt PATCH v2 1/5] qemu: introduce capability QEMU_MIGRATION_BLOCKED_REASONS

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:50 +0200, Eugenio Pérez wrote: > From: Jonathon Jongsma > > since qemu 6.0, if migration is blocked for some reason, 'query-migrate' > will return an array of error strings describing the migration blockers. > This can be used to check whether there are any devices b

Re: [libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Jiri Denemark
On Wed, Jul 20, 2022 at 11:11:51 +0200, Eugenio Pérez wrote: > This will allow qemuMigrationSrcIsAllowed to dynamically ask for > migration blockers, reducing duplication. > > Signed-off-by: Eugenio Pérez > --- > src/qemu/qemu_monitor_json.c | 35 +++ > src/qemu/q

Re: [PATCH 2/2] schemas: Drop from capabilities schemas

2022-07-20 Thread Michal Prívozník
On 7/20/22 10:42, Daniel P. Berrangé wrote: > On Wed, Jul 20, 2022 at 08:36:29AM +0200, Michal Privoznik wrote: >> Currently, we have two types of output only XMLs: capabilities >> and domaincapabilities. Neither of these is ever parsed. >> Moreover, the order of elements inside these two documents

[libvirt PATCH v2 4/5] qemu_migration: get migration blockers before hardcoded checks

2022-07-20 Thread Eugenio Pérez
since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemuMigrationSrcIsAllowed to query it. Signed-off-by: Eugenio P

[libvirt PATCH v2 2/5] qemu_monitor_json: Add qemuMonitorJSONGetMigrationBlockers

2022-07-20 Thread Eugenio Pérez
This will allow qemuMigrationSrcIsAllowed to dynamically ask for migration blockers, reducing duplication. Signed-off-by: Eugenio Pérez --- src/qemu/qemu_monitor_json.c | 35 +++ src/qemu/qemu_monitor_json.h | 3 +++ 2 files changed, 38 insertions(+) diff --git

[libvirt PATCH v2 5/5] qemu_migrate: Do not forbif vDPA devices if can query blockers

2022-07-20 Thread Eugenio Pérez
vDPA devices will be migratable soon. Since they are not migratable before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking for migration blockers, let it hardcoded in that case. Otherwise, ask qemu about the explicit blocker. Signed-off-by: Eugenio Pérez --- src/qemu/qemu_migrat

[libvirt PATCH v2 3/5] qemu_monitor: add support for get qemu migration blockers

2022-07-20 Thread Eugenio Pérez
since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Enable qemu monitor to send this query. Signed-off-by: Eugenio Pérez

[libvirt PATCH v2 0/5] Ask qemu about migration blockers

2022-07-20 Thread Eugenio Pérez
There are some hardcoded migration blockers in libvirt, like having a net vhost-vdpa device. While it's true that they cannot be migrated at the moment, there are plans to be able to migrate them soon. They'll put a migration blockers in the cases where you cannot migrate them. Ask qemu about then

[libvirt PATCH v2 1/5] qemu: introduce capability QEMU_MIGRATION_BLOCKED_REASONS

2022-07-20 Thread Eugenio Pérez
From: Jonathon Jongsma since qemu 6.0, if migration is blocked for some reason, 'query-migrate' will return an array of error strings describing the migration blockers. This can be used to check whether there are any devices blocking migration, etc. Signed-off-by: Jonathon Jongsma Signed-off-by

[PATCH] remote: Make remote_daemon depend on qemu_protocol.h

2022-07-20 Thread He Zhe
We sometimes meet the following parallel compililation issue, since remote_daemon depends on remote_protocol.h qemu_protocol.h and lxc_protocol.h, which are usually generated due to remote_driver . | FAILED: src/virtnetworkd.p/remote_remote_daemon_dispatch.c.o | x86_64-wrs-linux-gcc ... | In file

Re: [PATCH 2/2] schemas: Drop from capabilities schemas

2022-07-20 Thread Daniel P . Berrangé
On Wed, Jul 20, 2022 at 08:36:29AM +0200, Michal Privoznik wrote: > Currently, we have two types of output only XMLs: capabilities > and domaincapabilities. Neither of these is ever parsed. > Moreover, the order of elements inside these two documents is > well defined by their respective format fun

Re: [PATCH] spec: Restart sockets even when libvirtd is inactive

2022-07-20 Thread Martin Kletzander
On Tue, Jul 19, 2022 at 05:51:57PM -0600, Jim Fehlig wrote: By default libvirtd will terminate itself after 120 seconds, so it is likely that the daemon will not be running at package upgrade. Try restarting sockets even if the daemon is inactive. Signed-off-by: Jim Fehlig --- Assuming sockets