aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
Diffstat (limited to 'migration')
-rw-r--r--migration/postcopy-ram.c2
-rw-r--r--migration/ram.c8
-rw-r--r--migration/rdma.c19
3 files changed, 15 insertions, 14 deletions
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index b41a9fe2fd..1bb22f2b6c 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -388,7 +388,7 @@ bool postcopy_ram_supported_by_host(MigrationIncomingState *mis)
*/
if (munlockall()) {
error_report("%s: munlockall: %s", __func__, strerror(errno));
- return -1;
+ goto out;
}
/*
diff --git a/migration/ram.c b/migration/ram.c
index 069b6e30bc..5554a7d2d8 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -859,9 +859,11 @@ static inline bool migration_bitmap_clear_dirty(RAMState *rs,
/* Called with RCU critical section */
static void ramblock_sync_dirty_bitmap(RAMState *rs, RAMBlock *rb)
{
- rs->migration_dirty_pages +=
- cpu_physical_memory_sync_dirty_bitmap(rb, 0, rb->used_length,
- &rs->num_dirty_pages_period);
+ uint64_t new_dirty_pages =
+ cpu_physical_memory_sync_dirty_bitmap(rb, 0, rb->used_length);
+
+ rs->migration_dirty_pages += new_dirty_pages;
+ rs->num_dirty_pages_period += new_dirty_pages;
}
/**
diff --git a/migration/rdma.c b/migration/rdma.c
index bbe6f36627..bea6532813 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -3788,7 +3788,6 @@ static int qemu_rdma_registration_start(QEMUFile *f, void *opaque,
static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque,
uint64_t flags, void *data)
{
- Error *local_err = NULL, **errp = &local_err;
QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(opaque);
RDMAContext *rdma;
RDMAControlHeader head = { .len = 0, .repeat = 1 };
@@ -3833,7 +3832,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque,
&reg_result_idx, rdma->pin_all ?
qemu_rdma_reg_whole_ram_blocks : NULL);
if (ret < 0) {
- ERROR(errp, "receiving remote info!");
+ fprintf(stderr, "receiving remote info!");
return ret;
}
@@ -3852,10 +3851,10 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque,
*/
if (local->nb_blocks != nb_dest_blocks) {
- ERROR(errp, "ram blocks mismatch (Number of blocks %d vs %d) "
- "Your QEMU command line parameters are probably "
- "not identical on both the source and destination.",
- local->nb_blocks, nb_dest_blocks);
+ fprintf(stderr, "ram blocks mismatch (Number of blocks %d vs %d) "
+ "Your QEMU command line parameters are probably "
+ "not identical on both the source and destination.",
+ local->nb_blocks, nb_dest_blocks);
rdma->error_state = -EINVAL;
return -EINVAL;
}
@@ -3868,10 +3867,10 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque,
/* We require that the blocks are in the same order */
if (rdma->dest_blocks[i].length != local->block[i].length) {
- ERROR(errp, "Block %s/%d has a different length %" PRIu64
- "vs %" PRIu64, local->block[i].block_name, i,
- local->block[i].length,
- rdma->dest_blocks[i].length);
+ fprintf(stderr, "Block %s/%d has a different length %" PRIu64
+ "vs %" PRIu64, local->block[i].block_name, i,
+ local->block[i].length,
+ rdma->dest_blocks[i].length);
rdma->error_state = -EINVAL;
return -EINVAL;
}