* [Qemu-devel] [PULL 0/2] migration queue
2019-04-05 15:49 [Qemu-devel] [PULL 0/2] migration queue Dr. David Alan Gilbert (git)
@ 2019-04-05 15:49 ` Dr. David Alan Gilbert (git)
2019-04-05 15:49 ` [Qemu-devel] [PULL 1/2] migration/ram.c: Fix codes conflict about bitmap_mutex Dr. David Alan Gilbert (git)
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-04-05 15:49 UTC (permalink / raw)
To: qemu-devel, chen.zhang, quintela, peterx
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
The following changes since commit 10546e09e174e0bb185b66a4c397aa845efcd36e:
Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.0-rc3-v2' into staging (2019-04-05 04:50:30 +0100)
are available in the Git repository at:
git://github.com/dagrh/qemu.git tags/pull-migration-20190405a
for you to fetch changes up to d013283a46e1f197594e76ed320f867067ab80b3:
migration: Fix migrate_set_parameter (2019-04-05 15:32:13 +0100)
----------------------------------------------------------------
Migration fixes pull for 4.0
A couple of fixes for crashes in colo and
migration parameters.
----------------------------------------------------------------
Juan Quintela (1):
migration: Fix migrate_set_parameter
Zhang Chen (1):
migration/ram.c: Fix codes conflict about bitmap_mutex
hmp.c | 6 ++++--
migration/ram.c | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PULL 1/2] migration/ram.c: Fix codes conflict about bitmap_mutex
2019-04-05 15:49 [Qemu-devel] [PULL 0/2] migration queue Dr. David Alan Gilbert (git)
2019-04-05 15:49 ` Dr. David Alan Gilbert (git)
@ 2019-04-05 15:49 ` Dr. David Alan Gilbert (git)
2019-04-05 15:49 ` Dr. David Alan Gilbert (git)
2019-04-05 15:49 ` [Qemu-devel] [PULL 2/2] migration: Fix migrate_set_parameter Dr. David Alan Gilbert (git)
2019-04-07 13:54 ` [Qemu-devel] [PULL 0/2] migration queue Peter Maydell
3 siblings, 1 reply; 8+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-04-05 15:49 UTC (permalink / raw)
To: qemu-devel, chen.zhang, quintela, peterx
From: Zhang Chen <chen.zhang@intel.com>
I found upstream codes conflict with COLO and lead to crash,
and I located to this patch:
commit 386a907b37a9321bc5d699bc37104d6ffba1b34d
Author: Wei Wang <wei.w.wang@intel.com>
Date: Tue Dec 11 16:24:49 2018 +0800
migration: use bitmap_mutex in migration_bitmap_clear_dirty
My colleague Wei's patch add bitmap_mutex in migration_bitmap_clear_dirty,
but COLO didn't initialize the bitmap_mutex. So we always get an error
when COLO start up. like that:
qemu-system-x86_64: util/qemu-thread-posix.c:64: qemu_mutex_lock_impl: Assertion `mutex->initialized' failed.
This patch add the bitmap_mutex initialize and destroy in COLO
lifecycle.
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20190329222951.28945-1-chen.zhang@intel.com>
Reviewed-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/ram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index d7f8fe45a8..f68beeeeff 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3918,6 +3918,7 @@ int colo_init_ram_cache(void)
}
ram_state = g_new0(RAMState, 1);
ram_state->migration_dirty_pages = 0;
+ qemu_mutex_init(&ram_state->bitmap_mutex);
memory_global_dirty_log_start();
return 0;
@@ -3956,6 +3957,7 @@ void colo_release_ram_cache(void)
}
rcu_read_unlock();
+ qemu_mutex_destroy(&ram_state->bitmap_mutex);
g_free(ram_state);
ram_state = NULL;
}
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PULL 1/2] migration/ram.c: Fix codes conflict about bitmap_mutex
2019-04-05 15:49 ` [Qemu-devel] [PULL 1/2] migration/ram.c: Fix codes conflict about bitmap_mutex Dr. David Alan Gilbert (git)
@ 2019-04-05 15:49 ` Dr. David Alan Gilbert (git)
0 siblings, 0 replies; 8+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-04-05 15:49 UTC (permalink / raw)
To: qemu-devel, chen.zhang, quintela, peterx
From: Zhang Chen <chen.zhang@intel.com>
I found upstream codes conflict with COLO and lead to crash,
and I located to this patch:
commit 386a907b37a9321bc5d699bc37104d6ffba1b34d
Author: Wei Wang <wei.w.wang@intel.com>
Date: Tue Dec 11 16:24:49 2018 +0800
migration: use bitmap_mutex in migration_bitmap_clear_dirty
My colleague Wei's patch add bitmap_mutex in migration_bitmap_clear_dirty,
but COLO didn't initialize the bitmap_mutex. So we always get an error
when COLO start up. like that:
qemu-system-x86_64: util/qemu-thread-posix.c:64: qemu_mutex_lock_impl: Assertion `mutex->initialized' failed.
This patch add the bitmap_mutex initialize and destroy in COLO
lifecycle.
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20190329222951.28945-1-chen.zhang@intel.com>
Reviewed-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/ram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index d7f8fe45a8..f68beeeeff 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3918,6 +3918,7 @@ int colo_init_ram_cache(void)
}
ram_state = g_new0(RAMState, 1);
ram_state->migration_dirty_pages = 0;
+ qemu_mutex_init(&ram_state->bitmap_mutex);
memory_global_dirty_log_start();
return 0;
@@ -3956,6 +3957,7 @@ void colo_release_ram_cache(void)
}
rcu_read_unlock();
+ qemu_mutex_destroy(&ram_state->bitmap_mutex);
g_free(ram_state);
ram_state = NULL;
}
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PULL 2/2] migration: Fix migrate_set_parameter
2019-04-05 15:49 [Qemu-devel] [PULL 0/2] migration queue Dr. David Alan Gilbert (git)
2019-04-05 15:49 ` Dr. David Alan Gilbert (git)
2019-04-05 15:49 ` [Qemu-devel] [PULL 1/2] migration/ram.c: Fix codes conflict about bitmap_mutex Dr. David Alan Gilbert (git)
@ 2019-04-05 15:49 ` Dr. David Alan Gilbert (git)
2019-04-05 15:49 ` Dr. David Alan Gilbert (git)
2019-04-07 13:54 ` [Qemu-devel] [PULL 0/2] migration queue Peter Maydell
3 siblings, 1 reply; 8+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-04-05 15:49 UTC (permalink / raw)
To: qemu-devel, chen.zhang, quintela, peterx
From: Juan Quintela <quintela@redhat.com>
Otherwise we are setting err twice, what is wrong and causes an abort.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20190403114958.3705-2-quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
hmp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hmp.c b/hmp.c
index 92941142af..8eec768088 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1825,8 +1825,10 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
case MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE:
p->has_xbzrle_cache_size = true;
visit_type_size(v, param, &cache_size, &err);
- if (err || cache_size > INT64_MAX
- || (size_t)cache_size != cache_size) {
+ if (err) {
+ break;
+ }
+ if (cache_size > INT64_MAX || (size_t)cache_size != cache_size) {
error_setg(&err, "Invalid size %s", valuestr);
break;
}
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PULL 2/2] migration: Fix migrate_set_parameter
2019-04-05 15:49 ` [Qemu-devel] [PULL 2/2] migration: Fix migrate_set_parameter Dr. David Alan Gilbert (git)
@ 2019-04-05 15:49 ` Dr. David Alan Gilbert (git)
0 siblings, 0 replies; 8+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-04-05 15:49 UTC (permalink / raw)
To: qemu-devel, chen.zhang, quintela, peterx
From: Juan Quintela <quintela@redhat.com>
Otherwise we are setting err twice, what is wrong and causes an abort.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20190403114958.3705-2-quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
hmp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hmp.c b/hmp.c
index 92941142af..8eec768088 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1825,8 +1825,10 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
case MIGRATION_PARAMETER_XBZRLE_CACHE_SIZE:
p->has_xbzrle_cache_size = true;
visit_type_size(v, param, &cache_size, &err);
- if (err || cache_size > INT64_MAX
- || (size_t)cache_size != cache_size) {
+ if (err) {
+ break;
+ }
+ if (cache_size > INT64_MAX || (size_t)cache_size != cache_size) {
error_setg(&err, "Invalid size %s", valuestr);
break;
}
--
2.21.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] migration queue
2019-04-05 15:49 [Qemu-devel] [PULL 0/2] migration queue Dr. David Alan Gilbert (git)
` (2 preceding siblings ...)
2019-04-05 15:49 ` [Qemu-devel] [PULL 2/2] migration: Fix migrate_set_parameter Dr. David Alan Gilbert (git)
@ 2019-04-07 13:54 ` Peter Maydell
2019-04-07 13:54 ` Peter Maydell
3 siblings, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2019-04-07 13:54 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git)
Cc: QEMU Developers, Zhang Chen, Juan Quintela, Peter Xu
On Fri, 5 Apr 2019 at 16:51, Dr. David Alan Gilbert (git)
<dgilbert@redhat.com> wrote:
>
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> The following changes since commit 10546e09e174e0bb185b66a4c397aa845efcd36e:
>
> Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.0-rc3-v2' into staging (2019-04-05 04:50:30 +0100)
>
> are available in the Git repository at:
>
> git://github.com/dagrh/qemu.git tags/pull-migration-20190405a
>
> for you to fetch changes up to d013283a46e1f197594e76ed320f867067ab80b3:
>
> migration: Fix migrate_set_parameter (2019-04-05 15:32:13 +0100)
>
> ----------------------------------------------------------------
> Migration fixes pull for 4.0
>
> A couple of fixes for crashes in colo and
> migration parameters.
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] migration queue
2019-04-07 13:54 ` [Qemu-devel] [PULL 0/2] migration queue Peter Maydell
@ 2019-04-07 13:54 ` Peter Maydell
0 siblings, 0 replies; 8+ messages in thread
From: Peter Maydell @ 2019-04-07 13:54 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git)
Cc: Zhang Chen, QEMU Developers, Peter Xu, Juan Quintela
On Fri, 5 Apr 2019 at 16:51, Dr. David Alan Gilbert (git)
<dgilbert@redhat.com> wrote:
>
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> The following changes since commit 10546e09e174e0bb185b66a4c397aa845efcd36e:
>
> Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.0-rc3-v2' into staging (2019-04-05 04:50:30 +0100)
>
> are available in the Git repository at:
>
> git://github.com/dagrh/qemu.git tags/pull-migration-20190405a
>
> for you to fetch changes up to d013283a46e1f197594e76ed320f867067ab80b3:
>
> migration: Fix migrate_set_parameter (2019-04-05 15:32:13 +0100)
>
> ----------------------------------------------------------------
> Migration fixes pull for 4.0
>
> A couple of fixes for crashes in colo and
> migration parameters.
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread