Re: [libvirt][PATCH v11 3/4] conf: Introduce SGX EPC element into device memory xml

2022-05-12 Thread Yang, Lin A
On 5/11/22, 8:13 AM, "Han Han" wrote: > On Wed, May 11, 2022 at 2:12 PM Lin Yang > mailto:lin.a.y...@intel.com>> wrote: > @@ -7844,7 +7849,9 @@ Example: usage of the memory devices > 1.2.14` Provide ``nvdimm`` model that adds a Non-Volatile DIMM module. > :since:`Since 3.2.0` Provide

Re: [libvirt][PATCH v11 3/4] conf: Introduce SGX EPC element into device memory xml

2022-05-12 Thread Yang, Lin A
On 5/11/22, 11:51 PM, "Peter Krempa" wrote: > On Tue, May 10, 2022 at 23:11:11 -0700, Lin Yang wrote: > > diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c > > index 58ee29cd33..51f805dcab 100644 > > --- a/tests/qemuxml2xmltest.c > > +++ b/tests/qemuxml2xmltest.c > > @@ -1468,6

Re: [PATCH 1/4] network: firewalld: convert to policies

2022-05-12 Thread Eric Garver
I'm adding this text here in hopes that Mimecast no longer thinks this email is s-p-a-m. My replies are inline below. :) On Thu, May 12, 2022 at 07:35:03PM +0100, Daniel P. Berrangé wrote: > On Wed, May 11, 2022 at 11:41:52AM -0400, Eric Garver wrote: > > Convert the existing behavior into

Re: [PATCH 0/4] network: firewalld: fix routed network

2022-05-12 Thread Eric Garver
On Thu, May 12, 2022 at 08:04:28PM +0100, Daniel P. Berrangé wrote: > On Thu, May 12, 2022 at 07:00:09PM +0100, Daniel P. Berrangé wrote: > > On Wed, May 11, 2022 at 11:41:51AM -0400, Eric Garver wrote: > > > This series fixes routed networks when a newer firewalld (>= 1.0.0) is > > > present [1].

Re: [PATCH 3/4] network: firewalld: add policy for routed networks

2022-05-12 Thread Eric Garver
On Thu, May 12, 2022 at 07:37:30PM +0100, Daniel P. Berrangé wrote: > On Wed, May 11, 2022 at 11:41:55AM -0400, Eric Garver wrote: > > Signed-off-by: Eric Garver > > --- > > src/network/libvirt-routed-out.policy | 12 > > src/network/meson.build | 5 + > > 2 files

Re: [PATCH 1/4] network: firewalld: convert to policies

2022-05-12 Thread Eric Garver
On Thu, May 12, 2022 at 01:53:00PM -0400, Laine Stump wrote: > On 5/12/22 12:53 PM, Eric Garver wrote: > > On Wed, May 11, 2022 at 05:15:25PM +0100, Daniel P. Berrangé wrote: > > > On Wed, May 11, 2022 at 11:41:52AM -0400, Eric Garver wrote: > > > > Convert the existing behavior into policies. > >

Re: [PATCH 00/37] qemu: Improve 'qemuFDPass' usability and refactor interface code to use it

2022-05-12 Thread Jonathon Jongsma
On 5/10/22 10:19 AM, Peter Krempa wrote: This series modifies qemuFDPass to be a bit more convenient to use by e.g. remembering the maximum fd set index currently used across libvirtd restarts so that we can avoid having to pass the FDs before actually constructing the device properties. Along

Re: [PATCH 34/37] qemu: slirp: Pass FDs to qemu via qemuFDPass in the network private data

2022-05-12 Thread Jonathon Jongsma
On 5/10/22 10:20 AM, Peter Krempa wrote: Populate the 'slirpfd' qemuFDPass structure inside the private data for passing the fd to qemu rather than using out-of-band variables. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 27 +-- src/qemu/qemu_command.h

Re: [PATCH 0/4] network: firewalld: fix routed network

2022-05-12 Thread Daniel P . Berrangé
On Thu, May 12, 2022 at 07:00:09PM +0100, Daniel P. Berrangé wrote: > On Wed, May 11, 2022 at 11:41:51AM -0400, Eric Garver wrote: > > This series fixes routed networks when a newer firewalld (>= 1.0.0) is > > present [1]. Firewalld 1.0.0 included a change that disallows implicit > > forwarding

Re: [PATCH 3/4] network: firewalld: add policies for routed networks

2022-05-12 Thread Eric Garver
On Thu, May 12, 2022 at 07:42:43PM +0100, Daniel P. Berrangé wrote: > On Wed, May 11, 2022 at 11:41:54AM -0400, Eric Garver wrote: > > Signed-off-by: Eric Garver > > --- > > src/network/libvirt-routed-in.policy | 11 +++ > > src/network/libvirt-routed-out.policy | 12 > >

Re: [libvirt RFCv8 00/27] multifd save restore prototype

2022-05-12 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, May 12, 2022 at 05:58:46PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, May 11, 2022 at 07:31:45PM +0200, Claudio Fontana wrote: > > > > That's great, I love when things are

Re: [PATCH 3/4] network: firewalld: add policies for routed networks

2022-05-12 Thread Daniel P . Berrangé
On Wed, May 11, 2022 at 11:41:54AM -0400, Eric Garver wrote: > Signed-off-by: Eric Garver > --- > src/network/libvirt-routed-in.policy | 11 +++ > src/network/libvirt-routed-out.policy | 12 > src/network/meson.build | 10 ++ > 3 files changed, 33

Re: [PATCH 3/4] network: firewalld: add policy for routed networks

2022-05-12 Thread Daniel P . Berrangé
On Wed, May 11, 2022 at 11:41:55AM -0400, Eric Garver wrote: > Signed-off-by: Eric Garver > --- > src/network/libvirt-routed-out.policy | 12 > src/network/meson.build | 5 + > 2 files changed, 17 insertions(+) > create mode 100644

Re: [PATCH 32/37] qemuSlirpStart: Simplify parameters

2022-05-12 Thread Jonathon Jongsma
On 5/10/22 10:20 AM, Peter Krempa wrote: The 'driver' can be taken from the private data of 'vm' and 'slirp' can be taken from private data of 'net', both of which we need anyways. Additionally by checking whether slirp needs to be started inside the function we don't need to do this logic in

Re: [PATCH 1/4] network: firewalld: convert to policies

2022-05-12 Thread Daniel P . Berrangé
On Wed, May 11, 2022 at 11:41:52AM -0400, Eric Garver wrote: > Convert the existing behavior into policies. > > This commit has no functional changes. > > Signed-off-by: Eric Garver > --- > src/network/libvirt-nat-out.policy | 12 > src/network/libvirt-to-host.policy | 20

Re: [PATCH 0/4] network: firewalld: fix routed network

2022-05-12 Thread Laine Stump
On 5/12/22 2:00 PM, Daniel P. Berrangé wrote: On Wed, May 11, 2022 at 11:41:51AM -0400, Eric Garver wrote: This series fixes routed networks when a newer firewalld (>= 1.0.0) is present [1]. Firewalld 1.0.0 included a change that disallows implicit forwarding between zones [2]. libvirt was

Re: [PATCH 0/4] network: firewalld: fix routed network

2022-05-12 Thread Daniel P . Berrangé
On Wed, May 11, 2022 at 11:41:51AM -0400, Eric Garver wrote: > This series fixes routed networks when a newer firewalld (>= 1.0.0) is > present [1]. Firewalld 1.0.0 included a change that disallows implicit > forwarding between zones [2]. libvirt was relying on this behavior to > allow routed

Re: [PATCH 1/4] network: firewalld: convert to policies

2022-05-12 Thread Laine Stump
On 5/12/22 12:53 PM, Eric Garver wrote: On Wed, May 11, 2022 at 05:15:25PM +0100, Daniel P. Berrangé wrote: On Wed, May 11, 2022 at 11:41:52AM -0400, Eric Garver wrote: Convert the existing behavior into policies. Has this split of .zone vs .policy been something firewalld always supported,

Re: [libvirt RFCv8 00/27] multifd save restore prototype

2022-05-12 Thread Daniel P . Berrangé
On Thu, May 12, 2022 at 05:58:46PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Wed, May 11, 2022 at 07:31:45PM +0200, Claudio Fontana wrote: > > > That's great, I love when things are simple. > > > > > > If indeed we want to remove the copy in

Re: [PATCH 3/3] lib: Require path in virDomainRestoreParams()

2022-05-12 Thread Claudio Fontana
Hello Michal, this seems to be going backwards to special case arguments instead of putting them into typed parameters. I do not understand where this need comes from, but it does not seem a good direction to me. Thanks, Claudio On 5/12/22 5:17 PM, Michal Privoznik wrote: > After seeing

Re: [libvirt RFCv8 00/27] multifd save restore prototype

2022-05-12 Thread Dr. David Alan Gilbert
* Christophe Marie Francois Dupont de Dinechin (cdupo...@redhat.com) wrote: > > > > On 10 May 2022, at 20:38, Daniel P. Berrangé wrote: > > > > On Sat, May 07, 2022 at 03:42:53PM +0200, Claudio Fontana wrote: > >> This is v8 of the multifd save prototype, which fixes a few bugs, > >> adds a

Re: [libvirt RFCv8 00/27] multifd save restore prototype

2022-05-12 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Wed, May 11, 2022 at 07:31:45PM +0200, Claudio Fontana wrote: > > That's great, I love when things are simple. > > > > If indeed we want to remove the copy in libvirt (which will also mean > > explicitly fsyncing elsewhere, as the iohelper

Re: [PATCH 1/4] network: firewalld: convert to policies

2022-05-12 Thread Eric Garver
On Wed, May 11, 2022 at 05:15:25PM +0100, Daniel P. Berrangé wrote: > On Wed, May 11, 2022 at 11:41:52AM -0400, Eric Garver wrote: > > Convert the existing behavior into policies. > > Has this split of .zone vs .policy been something firewalld > always supported, or is it a "new" feature for some

Re: [libvirt PATCH 00/80] Add support for post-copy recovery

2022-05-12 Thread Pavel Hrdina
On Tue, May 10, 2022 at 05:20:21PM +0200, Jiri Denemark wrote: > This series implements a new VIR_MIGRATE_POSTCOPY_RESUME flag (virsh > migrate --resume) for recovering from a failed post-copy migration. > > You can also fetch the series from my gitlab fork: > > git fetch

Re: [libvirt PATCH 61/80] qemu: Refactor qemuMigrationDstPrepareFresh

2022-05-12 Thread Pavel Hrdina
On Tue, May 10, 2022 at 05:21:22PM +0200, Jiri Denemark wrote: > Offline migration jumps over a big part of qemuMigrationDstPrepareFresh. > Let's move that part into a new qemuMigrationDstPrepareActive function > to make the code easier to follow. > > Signed-off-by: Jiri Denemark > --- >

Re: [libvirt PATCH 73/80] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for peer-to-peer migration

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 17:46:34 +0200, Peter Krempa wrote: > On Tue, May 10, 2022 at 17:21:34 +0200, Jiri Denemark wrote: > > Signed-off-by: Jiri Denemark > > --- > > src/qemu/qemu_migration.c | 53 ++- > > 1 file changed, 36 insertions(+), 17 deletions(-) >

Re: [libvirt PATCH 73/80] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for peer-to-peer migration

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:34 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 53 ++- > 1 file changed, 36 insertions(+), 17 deletions(-)

Re: [libvirt PATCH 72/80] qemu: Call qemuDomainCleanupAdd from qemuMigrationJobContinue

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:33 +0200, Jiri Denemark wrote: > Every single call to qemuMigrationJobContinue needs to register a > cleanup callback in case the migrating domain dies between phases or > when migration is paused due to a failure in postcopy mode. > > Let's integrate registering the

Re: [libvirt PATCH 71/80] qemu: Register qemuProcessCleanupMigrationJob after Begin phase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:32 +0200, Jiri Denemark wrote: > The callback will properly cleanup non-p2p migration job in case the > migrating domain dies between Begin and Perform while the client which > controls the migration is not cooperating (normally the API for the next > migration phase

Re: [libvirt PATCH 70/80] qemu: Create completed jobData in qemuMigrationSrcComplete

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:31 +0200, Jiri Denemark wrote: > Normally the structure is created once the source reports completed > migration, but with post-copy migration we can get here even after > libvirt daemon was restarted. It doesn't make sense to preserve the > structure in our status

Re: [PATCH 3/3] lib: Require path in virDomainRestoreParams()

2022-05-12 Thread Michal Prívozník
On 5/12/22 17:22, Daniel P. Berrangé wrote: > On Thu, May 12, 2022 at 05:17:37PM +0200, Michal Privoznik wrote: >> After seeing previous commit one might think that >> virDomainRestoreParams() would get the similar treatment. Well, >> it can't. The problem here is: without any indication what

Re: [PATCH 3/3] lib: Require path in virDomainRestoreParams()

2022-05-12 Thread Daniel P . Berrangé
On Thu, May 12, 2022 at 05:17:37PM +0200, Michal Privoznik wrote: > After seeing previous commit one might think that > virDomainRestoreParams() would get the similar treatment. Well, > it can't. The problem here is: without any indication what domain > to restore we don't really know what domain

Re: [libvirt PATCH 69/80] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for Finish phase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:30 +0200, Jiri Denemark wrote: > Everything was already done in the normal Finish phase and vCPUs are > running. We just need to wait for all remaining data to be transferred. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 46

[PATCH 1/3] qemu: Separate out save code from qemuDomainManagedSave()

2022-05-12 Thread Michal Privoznik
The code that actually does managed save within qemuDomainManagedSave() is going to be reused shortly. Move it out into a separate helper. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 82 -- 1 file changed, 48 insertions(+), 34

[PATCH 3/3] lib: Require path in virDomainRestoreParams()

2022-05-12 Thread Michal Privoznik
After seeing previous commit one might think that virDomainRestoreParams() would get the similar treatment. Well, it can't. The problem here is: without any indication what domain to restore we don't really know what domain to restore (shocking, right?). Therefore, we have to require path to

[PATCH 2/3] lib: Repurpose virDomainSaveParams() with no VIR_DOMAIN_SAVE_PARAM_FILE

2022-05-12 Thread Michal Privoznik
When no VIR_DOMAIN_SAVE_PARAM_FILE typed param is set when calling virDomainSaveParams() then in turn virQEMUFileOpenAs() tries to open a NULL path. We have two options now: 1) require the typed param, which in turn may be promoted to a regular argument, or 2) use this opportunity to make the

[PATCH 0/3] virDomain{Save,Restore}Params: More fixes

2022-05-12 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (3): qemu: Separate out save code from qemuDomainManagedSave() lib: Repurpose virDomainSaveParams() with no VIR_DOMAIN_SAVE_PARAM_FILE lib: Require path in virDomainRestoreParams() include/libvirt/libvirt-domain.h | 1 + src/driver-hypervisor.h

Re: [libvirt PATCH 68/80] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for Prepare phase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:29 +0200, Jiri Denemark wrote: > The QEMU process is already running, all we need to do is to call > migrate-recover QMP command. Except for some checks and cookie handling, > of course. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 99

Re: [libvirt PATCH 68/80] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for Prepare phase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:29 +0200, Jiri Denemark wrote: > The QEMU process is already running, all we need to do is to call > migrate-recover QMP command. Except for some checks and cookie handling, > of course. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 99

Re: [libvirt PATCH 67/80] qemu: Start a migration phase in qemuMigrationAnyConnectionClosed

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:28 +0200, Jiri Denemark wrote: > Non-postcopy case talks to QEMU monitor and thus needs to create a > nested job. Since qemuMigrationAnyConnectionClosed is called in case > there's no thread processing a migration API, we need to make the > current thread a temporary

Re: [libvirt PATCH 66/80] qemu: Handle incoming migration in qemuMigrationAnyConnectionClosed

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:27 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c > index c0ab59f688..c1a60c90ef

Re: [libvirt PATCH 20/80] qemu: Use switch in qemuDomainGetJobInfoMigrationStats

2022-05-12 Thread Jiri Denemark
On Wed, May 11, 2022 at 15:19:33 +0200, Peter Krempa wrote: > On Tue, May 10, 2022 at 17:20:41 +0200, Jiri Denemark wrote: > > To make sure all job states are properly handled. > > > > Signed-off-by: Jiri Denemark > > --- > > src/qemu/qemu_driver.c | 20 > > 1 file changed,

Re: [libvirt PATCH 04/80] qemu: Enable migration events only when disabled

2022-05-12 Thread Jiri Denemark
On Wed, May 11, 2022 at 10:37:25 +0200, Peter Krempa wrote: > On Tue, May 10, 2022 at 17:20:25 +0200, Jiri Denemark wrote: > > When connecting to a QEMU monitor, we always try to enable migration > > events, but this is an invalid operation during migration. Thus > > reconnecting to a domain with

Re: [libvirt PATCH 65/80] qemu: Refactor qemuMigrationAnyConnectionClosed

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:26 +0200, Jiri Denemark wrote: > To prepare the code for handling incoming migration too. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 72 +-- > 1 file changed, 39 insertions(+), 33 deletions(-)

Re: [libvirt PATCH 03/80] qemu: Return state from qemuMonitorGetMigrationCapabilities

2022-05-12 Thread Jiri Denemark
On Wed, May 11, 2022 at 10:30:24 +0200, Peter Krempa wrote: > On Tue, May 10, 2022 at 17:20:24 +0200, Jiri Denemark wrote: > > The function can now optionally return a bitmap describing the current > > state of each migration capability. > > > > Signed-off-by: Jiri Denemark > > --- > >

Re: [libvirt PATCH 64/80] qemu: Rename qemuMigrationSrcCleanup

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:25 +0200, Jiri Denemark wrote: > The function is now called qemuMigrationAnyConnectionClosed to make it > clear it is supposed to handle broken connection during migration. It > will soon be used on both sides of migration so the "Src" part was changed > to "Any" to

Re: [libvirt PATCH 63/80] qemu: Add support for migrate-recover QMP command

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:24 +0200, Jiri Denemark wrote: > This command tells QEMU to start listening for an incoming post-copy > recovery connection. Just like migrate-incoming is used for starting > fresh migration on the destination host. > > Signed-off-by: Jiri Denemark > --- >

Re: [libvirt PATCH 62/80] qemu: Simplify cleanup in qemuMigrationDstPrepareFresh

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:23 +0200, Jiri Denemark wrote: > Since most of the cleanup code was moved out of this function, we don't > need to preserve the original error here. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 6 +- > 1 file changed, 1 insertion(+), 5

Re: [libvirt PATCH 61/80] qemu: Refactor qemuMigrationDstPrepareFresh

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:22 +0200, Jiri Denemark wrote: > Offline migration jumps over a big part of qemuMigrationDstPrepareFresh. > Let's move that part into a new qemuMigrationDstPrepareActive function > to make the code easier to follow. > > Signed-off-by: Jiri Denemark > --- >

Re: [libvirt PATCH 60/80] qemu: Introduce qemuMigrationDstPrepareFresh

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:21 +0200, Jiri Denemark wrote: > Moves most of the code from qemuMigrationDstPrepareAny to a new > qemuMigrationDstPrepareFresh so that qemuMigrationDstPrepareAny can be > shared with post-copy resume. > > Signed-off-by: Jiri Denemark > --- >

Re: [libvirt PATCH 54/80] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for Begin phase

2022-05-12 Thread Pavel Hrdina
On Tue, May 10, 2022 at 05:21:15PM +0200, Jiri Denemark wrote: > Mostly we just need to check whether the domain is in a failed post-copy > migration that can be resumed. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 143 ++ > 1 file

Re: [libvirt PATCH 59/80] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for Confirm phase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:20 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 49 +-- > 1 file changed, 32 insertions(+), 17 deletions(-) [...] > > if (qemuMigrationJobStartPhase(vm, phase) < 0) >

Re: [PATCH] qemu: Don't check for qemuDomainManagedSavePath() retval

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 15:59:16 +0200, Michal Privoznik wrote: > The qemuDomainManagedSavePath() function does no more than a > g_strdup_printf() and as such can't return NULL really. > Therefore, don't check for its return value. > > Signed-off-by: Michal Privoznik > --- >

[PATCH] qemu: Don't check for qemuDomainManagedSavePath() retval

2022-05-12 Thread Michal Privoznik
The qemuDomainManagedSavePath() function does no more than a g_strdup_printf() and as such can't return NULL really. Therefore, don't check for its return value. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 25 ++--- 1 file changed, 6 insertions(+), 19

Re: [libvirt RFCv8 00/27] multifd save restore prototype

2022-05-12 Thread Claudio Fontana
On 5/11/22 7:46 PM, Daniel P. Berrangé wrote: > On Wed, May 11, 2022 at 07:31:45PM +0200, Claudio Fontana wrote: >> That's great, I love when things are simple. >> >> If indeed we want to remove the copy in libvirt (which will also mean >> explicitly fsyncing elsewhere, as the iohelper would not

Re: [PATCH] Allow VM to read sysfs PCI config, revision files

2022-05-12 Thread Max Goodhart
Oops, I didn't intend for the commit author email to be git...@chromakode.com here. Would you please use c...@chromakode.com as the author of the patch? On Wed, May 11, 2022, 6:09 PM Max Goodhart wrote: > From: Max Goodhart > > This fixes a blank screen when viewing a VM with virtio graphics

[PATCH] Allow VM to read sysfs PCI config, revision files

2022-05-12 Thread Max Goodhart
From: Max Goodhart This fixes a blank screen when viewing a VM with virtio graphics and gl-accelerated Spice display on Ubuntu 22.04 / libvirt 8.0.0 / qemu 6.2. Without these AppArmor permissions, the libvirt error log contains repetitions of: qemu_spice_gl_scanout_texture: failed to get fd

libvirt patch in master, [PATCH] Send event on persistent config modification

2022-05-12 Thread Efim Shevrin
>From 32dbfbf9857ea72b69ea175ea7f8b21210f4e5d2 Mon Sep 17 00:00:00 2001 From: Efim Shevrin Date: Tue, 10 May 2022 17:03:11 +0300 Subject: [PATCH] Send event on persistent config modification Libvirt is not sending events in case of a device update, thus any services listening to events are

Re: [libvirt PATCH 74/80] qemu: Enable support for VIR_MIGRATE_POSTCOPY_RESUME

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:35 +0200, Jiri Denemark wrote: > Since all parts of post-copy recovery have been implemented now, it's > time to enable the corresponding flag. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.h | 1 + > 1 file changed, 1 insertion(+) Reviewed-by:

Re: [libvirt PATCH 80/80] NEWS: Add support for post-copy recovery

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:41 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > NEWS.rst | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/NEWS.rst b/NEWS.rst > index 7903449f9b..bafc70ba90 100644 > --- a/NEWS.rst > +++ b/NEWS.rst > @@ -17,6 +17,11 @@ v8.4.0

Re: [libvirt PATCH 79/80] virsh: Add --postcopy option for domjobabort command

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:40 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > docs/manpages/virsh.rst | 8 +++- > tools/virsh-domain.c| 16 +++- > 2 files changed, 22 insertions(+), 2 deletions(-) Reviewed-by: Peter Krempa

Re: [libvirt PATCH 78/80] qemu: Implement VIR_DOMAIN_ABORT_JOB_POSTCOPY flag

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 14:52:11 +0200, Peter Krempa wrote: > On Tue, May 10, 2022 at 17:21:39 +0200, Jiri Denemark wrote: > > Signed-off-by: Jiri Denemark > > --- > > src/qemu/qemu_driver.c | 43 +--- > > src/qemu/qemu_monitor.c | 9 > >

Re: [libvirt PATCH 78/80] qemu: Implement VIR_DOMAIN_ABORT_JOB_POSTCOPY flag

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:39 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_driver.c | 43 +--- > src/qemu/qemu_monitor.c | 9 > src/qemu/qemu_monitor.h | 3 +++ > src/qemu/qemu_monitor_json.c | 22

Re: [libvirt PATCH 77/80] Add VIR_DOMAIN_ABORT_JOB_POSTCOPY flag for virDomainAbortJobFlags

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:38 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > include/libvirt/libvirt-domain.h | 16 > src/libvirt-domain.c | 10 ++ Reviewed-by: Peter Krempa

Re: [libvirt PATCH 76/80] qemu: Implement virDomainAbortJobFlags

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:37 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_driver.c | 16 ++-- > 1 file changed, 14 insertions(+), 2 deletions(-) Reviewed-by: Peter Krempa

Re: [libvirt PATCH 75/80] Add virDomainAbortJobFlags public API

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:36 +0200, Jiri Denemark wrote: > The original virDomainAbortJob did not support flags. > > Signed-off-by: Jiri Denemark > --- > include/libvirt/libvirt-domain.h | 3 +++ > src/driver-hypervisor.h | 5 > src/libvirt-domain.c | 45

Re: [libvirt PATCH 58/80] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for Perform phase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:19 +0200, Jiri Denemark wrote: > It just calls migrate QMP command with resume=true without having to > worry about migration capabilities or parameters, storage migration, > etc. since everything has already been done in the normal Perform phase. > > Signed-off-by:

Re: [libvirt PATCH 57/80] qemu: Add support for 'resume' parameter of migrate QMP command

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:18 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c| 8 ++-- > src/qemu/qemu_monitor.h | 1 + > src/qemu/qemu_monitor_json.c | 2 ++ > 3 files changed, 9 insertions(+), 2 deletions(-) [...] > diff --git

Re: [libvirt PATCH 56/80] qemu: Separate starting migration from qemuMigrationSrcRun

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:17 +0200, Jiri Denemark wrote: > qemuMigrationSrcRun does a lot of thing before and after telling QEMU to > start the migration. Let's make the core reusable by moving it to a new > qemuMigrationSrcStart function. > > Signed-off-by: Jiri Denemark > --- >

Re: [libvirt PATCH 55/80] qmeu: Refactor qemuMigrationSrcPerformPhase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:16 +0200, Jiri Denemark wrote: > To make the code flow a bit more sensible. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 26 -- > 1 file changed, 12 insertions(+), 14 deletions(-) > > diff --git

Re: [libvirt PATCH 4/4] qemu: Enable migration events only for fresh QEMU process

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 14:07:10 +0200, Jiri Denemark wrote: > On Thu, May 12, 2022 at 13:32:38 +0200, Peter Krempa wrote: > > On Thu, May 12, 2022 at 13:30:57 +0200, Jiri Denemark wrote: [] > > > I guess the migration would just hang waiting for an event that never > > > comes. But I guess

Re: [PATCH 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-12 Thread Markus Armbruster
Thomas Huth writes: > The "-display sdl" option still uses a hand-crafted parser for its > parameters since some of them used underscores which is forbidden > in QAPI. Kind of. QAPI indeed requires lower-case-with-hyphens for such names, but there is an exception mechanism for names with upper

Re: [libvirt PATCH 54/80] qemu: Implement VIR_MIGRATE_POSTCOPY_RESUME for Begin phase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:15 +0200, Jiri Denemark wrote: > Mostly we just need to check whether the domain is in a failed post-copy > migration that can be resumed. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_migration.c | 143 ++ > 1 file

Re: [libvirt PATCH 4/4] qemu: Enable migration events only for fresh QEMU process

2022-05-12 Thread Jiri Denemark
On Thu, May 12, 2022 at 13:32:38 +0200, Peter Krempa wrote: > On Thu, May 12, 2022 at 13:30:57 +0200, Jiri Denemark wrote: > > On Thu, May 12, 2022 at 12:41:57 +0200, Peter Krempa wrote: > > > On Thu, May 12, 2022 at 12:40:54 +0200, Peter Krempa wrote: > > > > On Thu, May 12, 2022 at 10:55:47

Re: [libvirt PATCH 53/80] qemu: Don't set VIR_MIGRATE_PAUSED for post-copy resume

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:14 +0200, Jiri Denemark wrote: > For historical reasons we automatically enabled VIR_MIGRATE_PAUSED flag > when a migration was started for a paused domain. However, when resuming > failed post-copy migration the domain on the source host will always be > paused (as

Re: [libvirt PATCH 51/80] Introduce VIR_MIGRATE_POSTCOPY_RESUME flag

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:12 +0200, Jiri Denemark wrote: > This flag can be used to restart post-copy migration once it failed > because of a broken connection. > > Signed-off-by: Jiri Denemark > --- > include/libvirt/libvirt-domain.h | 5 + > src/libvirt-domain.c | 6 ++

Re: [libvirt PATCH 52/80] virsh: Add --postcopy-resume option for migrate command

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:13 +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > docs/manpages/virsh.rst | 9 +++-- > tools/virsh-domain.c| 8 > 2 files changed, 15 insertions(+), 2 deletions(-) Reviewed-by: Peter Krempa

Re: [libvirt PATCH 50/80] qemu: Use QEMU_MIGRATION_PHASE_POSTCOPY_FAILED

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:11 +0200, Jiri Denemark wrote: > This phase marks a migration protocol as broken in a post-copy phase. > Libvirt is no longer actively watching the migration in this phase as > the migration API that started the migration failed. > > This may either happen when

Re: [libvirt PATCH 4/4] qemu: Enable migration events only for fresh QEMU process

2022-05-12 Thread Daniel P . Berrangé
On Thu, May 12, 2022 at 10:55:47AM +0200, Jiri Denemark wrote: > Every running QEMU process we are willing to reconnect (i.e., at least > 3.1.0) supports migration events and we can assume the capability is > already enabled since last time libvirt daemon connected to its monitor. > > Well, it's

Re: [libvirt PATCH 4/4] qemu: Enable migration events only for fresh QEMU process

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 13:30:57 +0200, Jiri Denemark wrote: > On Thu, May 12, 2022 at 12:41:57 +0200, Peter Krempa wrote: > > On Thu, May 12, 2022 at 12:40:54 +0200, Peter Krempa wrote: > > > On Thu, May 12, 2022 at 10:55:47 +0200, Jiri Denemark wrote: > > > > Every running QEMU process we are

Re: [libvirt PATCH 4/4] qemu: Enable migration events only for fresh QEMU process

2022-05-12 Thread Jiri Denemark
On Thu, May 12, 2022 at 12:41:57 +0200, Peter Krempa wrote: > On Thu, May 12, 2022 at 12:40:54 +0200, Peter Krempa wrote: > > On Thu, May 12, 2022 at 10:55:47 +0200, Jiri Denemark wrote: > > > Every running QEMU process we are willing to reconnect (i.e., at least > > > 3.1.0) supports migration

Re: [libvirt PATCH 49/80] qemu: Do not set job owner in qemuMigrationJobSetPhase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:10 +0200, Jiri Denemark wrote: > Both qemuMigrationJobSetPhase and qemuMigrationJobStartPhase were doing > the same thing, which made little sense. Let's follow the difference > between qemuDomainObjSetJobPhase and qemuDomainObjStartJobPhase and > change job owner

Re: [libvirt PATCH 48/80] qemu: Refactor qemuDomainObjSetJobPhase

2022-05-12 Thread Peter Krempa
On Tue, May 10, 2022 at 17:21:09 +0200, Jiri Denemark wrote: > We will want to update migration phase without affecting job ownership. > Either in the thread that already owns the job or from an event handler > which only changes the phase (of a job no-one owns) without assuming it. > > Let's

Re: [libvirt PATCH 4/4] qemu: Enable migration events only for fresh QEMU process

2022-05-12 Thread Jiri Denemark
On Thu, May 12, 2022 at 12:40:54 +0200, Peter Krempa wrote: > On Thu, May 12, 2022 at 10:55:47 +0200, Jiri Denemark wrote: > > Every running QEMU process we are willing to reconnect (i.e., at least > > 3.1.0) supports migration events and we can assume the capability is > > already enabled since

Re: [libvirt PATCH 3/4] qemu: Make migration events mandatory

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 10:55:46 +0200, Jiri Denemark wrote: > All QEMU versions we care about support migration events and we should > be able to enable the associated capability when connecting to the > monitor. Failure to do so is thus considered fatal now. > > Signed-off-by: Jiri Denemark >

Re: [libvirt PATCH 4/4] qemu: Enable migration events only for fresh QEMU process

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 12:40:54 +0200, Peter Krempa wrote: > On Thu, May 12, 2022 at 10:55:47 +0200, Jiri Denemark wrote: > > Every running QEMU process we are willing to reconnect (i.e., at least > > 3.1.0) supports migration events and we can assume the capability is > > already enabled since

Re: [libvirt PATCH 4/4] qemu: Enable migration events only for fresh QEMU process

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 10:55:47 +0200, Jiri Denemark wrote: > Every running QEMU process we are willing to reconnect (i.e., at least > 3.1.0) supports migration events and we can assume the capability is > already enabled since last time libvirt daemon connected to its monitor. > > Well, it's

Re: [libvirt PATCH 2/4] qemu: Refactor qemuDomainGetJobInfoMigrationStats

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 10:55:45 +0200, Jiri Denemark wrote: > The code was a bit too complicated, especially after removing the check > for QEMU_CAPS_MIGRATION_EVENT. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_driver.c | 32 +++- > 1 file changed, 19

Re: [libvirt PATCH 1/4] qemu: Drop QEMU_CAPS_MIGRATION_EVENT

2022-05-12 Thread Peter Krempa
On Thu, May 12, 2022 at 10:55:44 +0200, Jiri Denemark wrote: > All QEMU versions we care about already support migration events. > > Signed-off-by: Jiri Denemark > --- Reviewed-by: Peter Krempa

Re: [libvirt PATCH v2 3/5] ci: Introduce a template for upstream QEMU build

2022-05-12 Thread Erik Skultety
On Thu, May 12, 2022 at 10:04:07AM +0100, Daniel P. Berrangé wrote: > On Thu, May 12, 2022 at 10:50:57AM +0200, Erik Skultety wrote: > > This was heavily inspired by QEMU's upstream CI buildtest-template.yml. > > Rather than referencing QEMU's template directly (which GitLab can do), > > this

Re: [libvirt PATCH v2 3/5] ci: Introduce a template for upstream QEMU build

2022-05-12 Thread Daniel P . Berrangé
On Thu, May 12, 2022 at 10:50:57AM +0200, Erik Skultety wrote: > This was heavily inspired by QEMU's upstream CI buildtest-template.yml. > Rather than referencing QEMU's template directly (which GitLab can do), > this patch resorts to hard-coding the build steps ourselves, solely > because there's

Re: [PATCH] lib: Rename VIR_SAVE_PARAM_* to VIR_DOMAIN_SAVE_PARAM_*

2022-05-12 Thread Daniel P . Berrangé
On Thu, May 12, 2022 at 10:31:10AM +0200, Michal Privoznik wrote: > A few commits ago new APIs were introduced (virDomainSaveParams() > and virDomainRestoreParams()) and with them new typed parameters: > VIR_SAVE_PARAM_FILE and VIR_SAVE_PARAM_DXML. But their name does > not suggest they apply to

[libvirt PATCH 0/4] qemu: Drop QEMU_CAPS_MIGRATION_EVENT

2022-05-12 Thread Jiri Denemark
All QEMU versions we care about already support migration events. Jiri Denemark (4): qemu: Drop QEMU_CAPS_MIGRATION_EVENT qemu: Refactor qemuDomainGetJobInfoMigrationStats qemu: Make migration events mandatory qemu: Enable migration events only for fresh QEMU process

[libvirt PATCH 2/4] qemu: Refactor qemuDomainGetJobInfoMigrationStats

2022-05-12 Thread Jiri Denemark
The code was a bit too complicated, especially after removing the check for QEMU_CAPS_MIGRATION_EVENT. Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt PATCH 1/4] qemu: Drop QEMU_CAPS_MIGRATION_EVENT

2022-05-12 Thread Jiri Denemark
All QEMU versions we care about already support migration events. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 3 +- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_driver.c| 6 +-- src/qemu/qemu_migration.c

[libvirt PATCH 3/4] qemu: Make migration events mandatory

2022-05-12 Thread Jiri Denemark
All QEMU versions we care about support migration events and we should be able to enable the associated capability when connecting to the monitor. Failure to do so is thus considered fatal now. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_params.c | 6 ++ 1 file changed, 2

[libvirt PATCH 4/4] qemu: Enable migration events only for fresh QEMU process

2022-05-12 Thread Jiri Denemark
Every running QEMU process we are willing to reconnect (i.e., at least 3.1.0) supports migration events and we can assume the capability is already enabled since last time libvirt daemon connected to its monitor. Well, it's not guaranteed though. If libvirt 1.2.17 or older was used to start QEMU

[libvirt PATCH v2 5/5] ci: Add a Fedora integration test job utilizing upstream QEMU

2022-05-12 Thread Erik Skultety
Signed-off-by: Erik Skultety Reviewed-by: Michal Privoznik Reviewed-by: Daniel P. Berrangé --- ci/integration.yml | 16 1 file changed, 16 insertions(+) diff --git a/ci/integration.yml b/ci/integration.yml index a71df41694..4978d3cf02 100644 --- a/ci/integration.yml +++

[libvirt PATCH v2 4/5] ci: Add a new integration job template for the upstream QEMU scenario

2022-05-12 Thread Erik Skultety
YAML anchors don't work with Shell condition structures, so we cannot simply reference the QEMU build template YAML anchor conditionally and hence have everything as part of a single job template. Instead, we have to "subclass" the .integration_tests template and inject the QEMU building bits

[libvirt PATCH v2 3/5] ci: Introduce a template for upstream QEMU build

2022-05-12 Thread Erik Skultety
This was heavily inspired by QEMU's upstream CI buildtest-template.yml. Rather than referencing QEMU's template directly (which GitLab can do), this patch resorts to hard-coding the build steps ourselves, solely because there's no guarantee QEMU will keep either the template file name or the

  1   2   >