Migration fixes pull for 4.0
A couple of fixes for crashes in colo and migration parameters. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEERfXHG0oMt/uXep+pBRYzHrxb/ecFAlyneJoACgkQBRYzHrxb /edbEQ//R+uAspJym78EJEKeCts75CnEM8WYFRecS2our4KWVC6sihD4BAPbIddE 5Xe9QDfZZ1ihbY8VyMTiqgwxa3EIxdVja3rTze8tFFlH7MTQsQE8r+r2Erz9lyGl UAsFo3gTxY8BCwv51oowu87iyE3psDoa3C+Iq4HRL0Pr+BAdnxyygwLpNnOd1TlZ tpORsLU7/irULqy0NKXfF0mVZha9jMUmA4mVUgEwIS8TD0q/GLyFyd1dzE1cOrmk vh7BfyyeD3yPVbJL4M0Zggs/HdQsiihF1j60BYpFRbD8io4KnGBYCTorWoz+pF0y y4q++UxSwFWsYEYWhiRemfZcK/THCUhh3BKs4ti5xY4dga8M0GSqbuKBl+QjErYO LahX2bs72HV6SzRwgw4HFaJn2KQs7vyd+ejcjwSiAZw8P0P/8urTkTOevmz1VeFj nXjqDrp9CTvZrMiFbs6QAxTQbMBwprv8RP+hUsGXjD7FaeqFrRBzwp/Z80Xr0NT+ TzScRd4J9LvQXgSNKEWk+fTHW1bXWBXd3Ap5IixXZPaPq8kB76NOc6TLeZyhQu6o qnnPOXDpSXPAVYKdv0xfwGkxNxbqU4mcxQbrdFvZ6/pCIfeYkB55RZPzu/9fIHx/ Dqxy/+73xOAL3jdBZJlOw7j8eajwLJZhpHr1N6twExs8eLA/WOQ= =2DS8 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20190405a' into staging Migration fixes pull for 4.0 A couple of fixes for crashes in colo and migration parameters. # gpg: Signature made Fri 05 Apr 2019 16:47:38 BST # gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full] # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20190405a: migration: Fix migrate_set_parameter migration/ram.c: Fix codes conflict about bitmap_mutex Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
90fb864a7d
6
hmp.c
6
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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue