mirror of https://github.com/xemu-project/xemu.git
Migration pull for 3.0
Fixes only -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJbV3CLAAoJEAUWMx68W/3nnbwQAIqKENVGu6iiDov2cVmboVE+ p5dmZxOKwhzOri0gtU5CbljO96JBJPvvQ6H8bcxf7GijHpHfFbk9laENrKabSNP9 Mbm0JnszeAy7W1w+d2Ryb2qQA/Aagyo5/W+BUtWK5PROWB3zJLjySbSeas7Grho6 U6QCV1bs4UslMlsKXYVk17zHZVice7S6B0UCivDxe4Ms0I2KrhEi+L1Dfg6Ip88l Yg6JlpXS4TLDzz5uGTkYBVHRH4k2m5LgRm9xQieCT27m0e8CMIU9akRDALy0D0BK LfQrITPy5w2pmEyC3WhJ2O4pEXnC/WbLl8djvx6TjrQorlbptROzynHKz9tAz4GX 5S+AaZHbXG8vxaSPq9vsGBJfBSJgbZjskImbapy1lcY9y1OorhiZYolD4tv4A7r1 awLOsAUARUNV7eV6Q3oo5IXSNyxmYaNyEdrR8ufABB8r7nwQSzgTUfokvMhsYC6U r/9UwVeFW/HrqonreDkz1dCNV0qhmtnOmOaitUfskflKkSzCFWOXqTbTYIgsyAG4 KfF2r3ouWV0wq4QT+xvCEJUgE+87zplZ8wkwYtIbdszGH1vi7+1jcnog6logLZiG HihH4fk/d3WkoPm3RfOIwe+XWUAWIMtNpAr+bPPYilsixoGDj4kLEQcBIMwp/A7U vrDLmU/9Ke77L/oHThdE =rfmW -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180724a' into staging Migration pull for 3.0 Fixes only # gpg: Signature made Tue 24 Jul 2018 19:31:39 BST # gpg: using RSA key 0516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20180724a: migration: fix duplicate initialization for expected_downtime and cleanup_bh tests: only update last_byte when at the edge migration: disallow recovery for release-ram migration: update recv bitmap only on dest vm audio/hda: Fix migration migrate: Fix cancelling state warning migration: fix potential overflow in multifd send Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
8ca2838de2
|
@ -786,7 +786,7 @@ static void hda_audio_reset(DeviceState *dev)
|
|||
static bool vmstate_hda_audio_stream_buf_needed(void *opaque)
|
||||
{
|
||||
HDAAudioStream *st = opaque;
|
||||
return st->state->use_timer;
|
||||
return st->state && st->state->use_timer;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_hda_audio_stream_buf = {
|
||||
|
|
|
@ -1629,6 +1629,25 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
|
|||
"paused migration");
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Postcopy recovery won't work well with release-ram
|
||||
* capability since release-ram will drop the page buffer as
|
||||
* long as the page is put into the send buffer. So if there
|
||||
* is a network failure happened, any page buffers that have
|
||||
* not yet reached the destination VM but have already been
|
||||
* sent from the source VM will be lost forever. Let's refuse
|
||||
* the client from resuming such a postcopy migration.
|
||||
* Luckily release-ram was designed to only be used when src
|
||||
* and destination VMs are on the same host, so it should be
|
||||
* fine.
|
||||
*/
|
||||
if (migrate_release_ram()) {
|
||||
error_setg(errp, "Postcopy recovery cannot work "
|
||||
"when release-ram capability is set");
|
||||
return false;
|
||||
}
|
||||
|
||||
/* This is a resume, skip init status */
|
||||
return true;
|
||||
}
|
||||
|
@ -2877,6 +2896,7 @@ static void migration_iteration_finish(MigrationState *s)
|
|||
/* Fallthrough */
|
||||
case MIGRATION_STATUS_FAILED:
|
||||
case MIGRATION_STATUS_CANCELLED:
|
||||
case MIGRATION_STATUS_CANCELLING:
|
||||
if (s->vm_was_running) {
|
||||
vm_start();
|
||||
} else {
|
||||
|
@ -3032,8 +3052,6 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
|
|||
} else {
|
||||
/* This is a fresh new migration */
|
||||
rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO;
|
||||
s->expected_downtime = s->parameters.downtime_limit;
|
||||
s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s);
|
||||
|
||||
/* Notify before starting migration thread */
|
||||
notifier_list_notify(&migration_state_notifiers, s);
|
||||
|
|
|
@ -851,7 +851,7 @@ static void multifd_send_pages(void)
|
|||
p->pages->block = NULL;
|
||||
multifd_send_state->pages = p->pages;
|
||||
p->pages = pages;
|
||||
transferred = pages->used * TARGET_PAGE_SIZE + p->packet_len;
|
||||
transferred = ((uint64_t) pages->used) * TARGET_PAGE_SIZE + p->packet_len;
|
||||
ram_counters.multifd_bytes += transferred;
|
||||
ram_counters.transferred += transferred;;
|
||||
qemu_mutex_unlock(&p->mutex);
|
||||
|
@ -2827,8 +2827,15 @@ int ram_discard_range(const char *rbname, uint64_t start, size_t length)
|
|||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* On source VM, we don't need to update the received bitmap since
|
||||
* we don't even have one.
|
||||
*/
|
||||
if (rb->receivedmap) {
|
||||
bitmap_clear(rb->receivedmap, start >> qemu_target_page_bits(),
|
||||
length >> qemu_target_page_bits());
|
||||
}
|
||||
|
||||
ret = ram_block_discard_range(rb, start, length);
|
||||
|
||||
err:
|
||||
|
|
|
@ -300,6 +300,7 @@ static void check_guests_ram(QTestState *who)
|
|||
* to us yet.
|
||||
*/
|
||||
hit_edge = true;
|
||||
last_byte = b;
|
||||
} else {
|
||||
fprintf(stderr, "Memory content inconsistency at %x"
|
||||
" first_byte = %x last_byte = %x current = %x"
|
||||
|
@ -308,7 +309,6 @@ static void check_guests_ram(QTestState *who)
|
|||
bad = true;
|
||||
}
|
||||
}
|
||||
last_byte = b;
|
||||
}
|
||||
g_assert_false(bad);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue