Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Peter Xu
On Fri, Feb 14, 2020 at 03:04:23PM -0500, David Hildenbrand wrote: > > > > Am 14.02.2020 um 20:45 schrieb Peter Xu : > > > > On Fri, Feb 14, 2020 at 07:26:59PM +0100, David Hildenbrand wrote: > >> +if (!postcopy_is_running()) { > >> +Error *err = NULL; > >> + > >> +

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
> Am 14.02.2020 um 20:45 schrieb Peter Xu : > > On Fri, Feb 14, 2020 at 07:26:59PM +0100, David Hildenbrand wrote: >> +if (!postcopy_is_running()) { >> +Error *err = NULL; >> + >> +/* >> + * Precopy code cannot deal with the size of ram blocks

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Peter Xu
On Fri, Feb 14, 2020 at 07:26:59PM +0100, David Hildenbrand wrote: > +if (!postcopy_is_running()) { > +Error *err = NULL; > + > +/* > + * Precopy code cannot deal with the size of ram blocks > changing at > + * random points

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
On 14.02.20 19:11, Peter Xu wrote: > On Fri, Feb 14, 2020 at 06:32:35PM +0100, David Hildenbrand wrote: >> On 14.02.20 18:29, Peter Xu wrote: >>> On Fri, Feb 14, 2020 at 01:02:46PM +0100, David Hildenbrand wrote: From c0049ac2e95d6756037db918852c507fb88297d9 Mon Sep 17 00:00:00 2001

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Peter Xu
On Fri, Feb 14, 2020 at 06:32:35PM +0100, David Hildenbrand wrote: > On 14.02.20 18:29, Peter Xu wrote: > > On Fri, Feb 14, 2020 at 01:02:46PM +0100, David Hildenbrand wrote: > >> From c0049ac2e95d6756037db918852c507fb88297d9 Mon Sep 17 00:00:00 2001 > >> From: David Hildenbrand > >> Date: Fri,

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
On 14.02.20 18:29, Peter Xu wrote: > On Fri, Feb 14, 2020 at 01:02:46PM +0100, David Hildenbrand wrote: >> From c0049ac2e95d6756037db918852c507fb88297d9 Mon Sep 17 00:00:00 2001 >> From: David Hildenbrand >> Date: Fri, 14 Feb 2020 13:01:03 +0100 >> Subject: [PATCH v1] tmp >> >> Signed-off-by:

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Peter Xu
On Fri, Feb 14, 2020 at 01:02:46PM +0100, David Hildenbrand wrote: > From c0049ac2e95d6756037db918852c507fb88297d9 Mon Sep 17 00:00:00 2001 > From: David Hildenbrand > Date: Fri, 14 Feb 2020 13:01:03 +0100 > Subject: [PATCH v1] tmp > > Signed-off-by: David Hildenbrand > --- >

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
>> a) In precopy during the second migration. >> b) In postcopy during the first migration. > > After reading your reply - even the 1st migration of precopy? Say, > when source QEMU resets and found changed FW during the precopy? I think the FW will only change during migration (depends on the

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Peter Xu
On Fri, Feb 14, 2020 at 10:17:07AM +0100, David Hildenbrand wrote: > On 13.02.20 21:56, Peter Xu wrote: > > On Thu, Feb 13, 2020 at 08:42:23PM +0100, David Hildenbrand wrote: > >> On 13.02.20 19:32, Peter Xu wrote: > >>> On Thu, Feb 13, 2020 at 06:20:16PM +0100, David Hildenbrand wrote: >

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > > >> diff --git a/migration/ram.c b/migration/ram.c > >> index ed23ed1c7c..f86f32b453 100644 > >> --- a/migration/ram.c > >> +++ b/migration/ram.c > >> @@ -52,6 +52,7 @@ > >> #include "migration/colo.h" > >> #include "block.h" > >> #include

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
>> diff --git a/migration/ram.c b/migration/ram.c >> index ed23ed1c7c..f86f32b453 100644 >> --- a/migration/ram.c >> +++ b/migration/ram.c >> @@ -52,6 +52,7 @@ >> #include "migration/colo.h" >> #include "block.h" >> #include "sysemu/sysemu.h" >> +#include "sysemu/runstate.h" >> #include

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Juan Quintela
David Hildenbrand wrote: I agree with the removed bits. > diff --git a/migration/ram.c b/migration/ram.c > index ed23ed1c7c..f86f32b453 100644 > --- a/migration/ram.c > +++ b/migration/ram.c > @@ -52,6 +52,7 @@ > #include "migration/colo.h" > #include "block.h" > #include "sysemu/sysemu.h"

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
On 14.02.20 12:08, David Hildenbrand wrote: > On 14.02.20 12:02, Dr. David Alan Gilbert wrote: >> * David Hildenbrand (da...@redhat.com) wrote: >>> On 14.02.20 11:42, Dr. David Alan Gilbert wrote: * David Hildenbrand (da...@redhat.com) wrote: > On 14.02.20 11:25, Dr. David Alan Gilbert

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
On 14.02.20 12:02, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com) wrote: >> On 14.02.20 11:42, Dr. David Alan Gilbert wrote: >>> * David Hildenbrand (da...@redhat.com) wrote: On 14.02.20 11:25, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com)

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 14.02.20 11:42, Dr. David Alan Gilbert wrote: > > * David Hildenbrand (da...@redhat.com) wrote: > >> On 14.02.20 11:25, Dr. David Alan Gilbert wrote: > >>> * David Hildenbrand (da...@redhat.com) wrote: > Resizing while migrating is dangerous

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
On 14.02.20 11:42, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com) wrote: >> On 14.02.20 11:25, Dr. David Alan Gilbert wrote: >>> * David Hildenbrand (da...@redhat.com) wrote: Resizing while migrating is dangerous and does not work as expected. The whole migration

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 14.02.20 11:25, Dr. David Alan Gilbert wrote: > > * David Hildenbrand (da...@redhat.com) wrote: > >> Resizing while migrating is dangerous and does not work as expected. > >> The whole migration code works on the usable_length of ram blocks and

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
On 14.02.20 11:25, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com) wrote: >> Resizing while migrating is dangerous and does not work as expected. >> The whole migration code works on the usable_length of ram blocks and does >> not expect this to change at random points in

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > Resizing while migrating is dangerous and does not work as expected. > The whole migration code works on the usable_length of ram blocks and does > not expect this to change at random points in time. > > Precopy: The ram block size must not change

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
On 13.02.20 21:56, Peter Xu wrote: > On Thu, Feb 13, 2020 at 08:42:23PM +0100, David Hildenbrand wrote: >> On 13.02.20 19:32, Peter Xu wrote: >>> On Thu, Feb 13, 2020 at 06:20:16PM +0100, David Hildenbrand wrote: Resizing while migrating is dangerous and does not work as expected. The

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-13 Thread Peter Xu
On Thu, Feb 13, 2020 at 08:42:23PM +0100, David Hildenbrand wrote: > On 13.02.20 19:32, Peter Xu wrote: > > On Thu, Feb 13, 2020 at 06:20:16PM +0100, David Hildenbrand wrote: > >> Resizing while migrating is dangerous and does not work as expected. > >> The whole migration code works on the

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-13 Thread David Hildenbrand
On 13.02.20 19:32, Peter Xu wrote: > On Thu, Feb 13, 2020 at 06:20:16PM +0100, David Hildenbrand wrote: >> Resizing while migrating is dangerous and does not work as expected. >> The whole migration code works on the usable_length of ram blocks and does >> not expect this to change at random

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-13 Thread David Hildenbrand
On 13.02.20 20:09, Juan Quintela wrote: > David Hildenbrand wrote: >> Resizing while migrating is dangerous and does not work as expected. >> The whole migration code works on the usable_length of ram blocks and does >> not expect this to change at random points in time. >> >> Precopy: The ram

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-13 Thread Juan Quintela
David Hildenbrand wrote: > Resizing while migrating is dangerous and does not work as expected. > The whole migration code works on the usable_length of ram blocks and does > not expect this to change at random points in time. > > Precopy: The ram block size must not change on the source, after >

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-13 Thread Peter Xu
On Thu, Feb 13, 2020 at 06:20:16PM +0100, David Hildenbrand wrote: > Resizing while migrating is dangerous and does not work as expected. > The whole migration code works on the usable_length of ram blocks and does > not expect this to change at random points in time. > > Precopy: The ram block