* [Qemu-devel] [PULL 0/5] Migration pull request
@ 2017-05-12 15:52 Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 1/5] migration: Fix regression with compression threads Juan Quintela
` (6 more replies)
0 siblings, 7 replies; 20+ messages in thread
From: Juan Quintela @ 2017-05-12 15:52 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
Hi
This pull contains:
- Fix regression with compression threads (mea culpa)
- start of includes migration (creating of blocker.h header)
- Use Error** correctly after several iterations
- Rename of RAM_SAVE_FLAG_COMPRESS
- Create block capabilities for shared and enable
Please, apply.
The following changes since commit ecc1f5adeec4e3324d1b695a7c54e3967c526949:
maintainers: Add myself as linux-user reviewer (2017-05-11 13:31:11 -0400)
are available in the git repository at:
git://github.com/juanquintela/qemu.git tags/migration/20170512
for you to fetch changes up to f15e5850905dea6a09e29ef14df508ec236321d9:
migration: Create migration/blocker.h (2017-05-12 17:10:57 +0200)
----------------------------------------------------------------
migration/next for 20170512
----------------------------------------------------------------
Juan Quintela (5):
migration: Fix regression with compression threads
migration: Pass Error ** argument to {save,load}_vmstate
ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO
migration: Create block capabilities for shared and enable
migration: Create migration/blocker.h
block/qcow.c | 2 +-
block/vdi.c | 2 +-
block/vhdx.c | 2 +-
block/vmdk.c | 2 +-
block/vpc.c | 2 +-
block/vvfat.c | 2 +-
hmp.c | 9 ++++++--
hw/9pfs/9p.c | 2 +-
hw/display/qxl.c | 2 +-
hw/display/virtio-gpu.c | 2 +-
hw/intc/arm_gic_kvm.c | 2 +-
hw/intc/arm_gicv3_its_kvm.c | 2 +-
hw/intc/arm_gicv3_kvm.c | 2 +-
hw/misc/ivshmem.c | 2 +-
hw/scsi/vhost-scsi.c | 2 +-
hw/virtio/vhost.c | 2 +-
include/migration/block.h | 3 +++
include/migration/blocker.h | 35 +++++++++++++++++++++++++++++
include/migration/migration.h | 21 +++---------------
include/sysemu/sysemu.h | 4 ++--
migration/migration.c | 37 +++++++++++++++++++++++++++++++
migration/ram.c | 35 +++++++++++++++++------------
migration/savevm.c | 51 +++++++++++++++++++++----------------------
qapi-schema.json | 7 +++++-
replay/replay-snapshot.c | 8 +++++--
stubs/migr-blocker.c | 2 +-
target/i386/kvm.c | 2 +-
vl.c | 4 +++-
28 files changed, 165 insertions(+), 83 deletions(-)
create mode 100644 include/migration/blocker.h
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Qemu-devel] [PULL 1/5] migration: Fix regression with compression threads
2017-05-12 15:52 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
@ 2017-05-12 15:52 ` Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 2/5] migration: Pass Error ** argument to {save, load}_vmstate Juan Quintela
` (5 subsequent siblings)
6 siblings, 0 replies; 20+ messages in thread
From: Juan Quintela @ 2017-05-12 15:52 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
Compression threads got broken on commit
commit 247956946651ae0280f7b1ea88bb6237dd01c231
Author: Juan Quintela <quintela@redhat.com>
Date: Tue Mar 21 11:45:01 2017 +0100
ram: reorganize last_sent_block
On do_compress_ram_page() we use a different QEMUFile than the
migration one. We need to pass it there. The failure can be seen as:
(qemu) qemu-system-x86_64: Unknown combination of migration flags: 0
qemu-system-x86_64: error while loading state section id 3(ram)
qemu-system-x86_64: load of migration failed: Invalid argument
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: Peter Xu <peterx@redhat.com>
---
migration/ram.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 293d27c..995d1fc 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -436,20 +436,21 @@ void migrate_compress_threads_create(void)
* @offset: offset inside the block for the page
* in the lower bits, it contains flags
*/
-static size_t save_page_header(RAMState *rs, RAMBlock *block, ram_addr_t offset)
+static size_t save_page_header(RAMState *rs, QEMUFile *f, RAMBlock *block,
+ ram_addr_t offset)
{
size_t size, len;
if (block == rs->last_sent_block) {
offset |= RAM_SAVE_FLAG_CONTINUE;
}
- qemu_put_be64(rs->f, offset);
+ qemu_put_be64(f, offset);
size = 8;
if (!(offset & RAM_SAVE_FLAG_CONTINUE)) {
len = strlen(block->idstr);
- qemu_put_byte(rs->f, len);
- qemu_put_buffer(rs->f, (uint8_t *)block->idstr, len);
+ qemu_put_byte(f, len);
+ qemu_put_buffer(f, (uint8_t *)block->idstr, len);
size += 1 + len;
rs->last_sent_block = block;
}
@@ -571,7 +572,7 @@ static int save_xbzrle_page(RAMState *rs, uint8_t **current_data,
}
/* Send XBZRLE based compressed page */
- bytes_xbzrle = save_page_header(rs, block,
+ bytes_xbzrle = save_page_header(rs, rs->f, block,
offset | RAM_SAVE_FLAG_XBZRLE);
qemu_put_byte(rs->f, ENCODING_FLAG_XBZRLE);
qemu_put_be16(rs->f, encoded_len);
@@ -745,7 +746,7 @@ static int save_zero_page(RAMState *rs, RAMBlock *block, ram_addr_t offset,
if (is_zero_range(p, TARGET_PAGE_SIZE)) {
rs->zero_pages++;
rs->bytes_transferred +=
- save_page_header(rs, block, offset | RAM_SAVE_FLAG_COMPRESS);
+ save_page_header(rs, rs->f, block, offset | RAM_SAVE_FLAG_COMPRESS);
qemu_put_byte(rs->f, 0);
rs->bytes_transferred += 1;
pages = 1;
@@ -834,7 +835,7 @@ static int ram_save_page(RAMState *rs, PageSearchStatus *pss, bool last_stage)
/* XBZRLE overflow or normal page */
if (pages == -1) {
- rs->bytes_transferred += save_page_header(rs, block,
+ rs->bytes_transferred += save_page_header(rs, rs->f, block,
offset | RAM_SAVE_FLAG_PAGE);
if (send_async) {
qemu_put_buffer_async(rs->f, p, TARGET_PAGE_SIZE,
@@ -860,7 +861,7 @@ static int do_compress_ram_page(QEMUFile *f, RAMBlock *block,
int bytes_sent, blen;
uint8_t *p = block->host + (offset & TARGET_PAGE_MASK);
- bytes_sent = save_page_header(rs, block, offset |
+ bytes_sent = save_page_header(rs, f, block, offset |
RAM_SAVE_FLAG_COMPRESS_PAGE);
blen = qemu_put_compression_data(f, p, TARGET_PAGE_SIZE,
migrate_compress_level());
@@ -991,7 +992,7 @@ static int ram_save_compressed_page(RAMState *rs, PageSearchStatus *pss,
pages = save_zero_page(rs, block, offset, p);
if (pages == -1) {
/* Make sure the first page is sent out before other pages */
- bytes_xmit = save_page_header(rs, block, offset |
+ bytes_xmit = save_page_header(rs, rs->f, block, offset |
RAM_SAVE_FLAG_COMPRESS_PAGE);
blen = qemu_put_compression_data(rs->f, p, TARGET_PAGE_SIZE,
migrate_compress_level());
--
2.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Qemu-devel] [PULL 2/5] migration: Pass Error ** argument to {save, load}_vmstate
2017-05-12 15:52 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 1/5] migration: Fix regression with compression threads Juan Quintela
@ 2017-05-12 15:52 ` Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 3/5] ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO Juan Quintela
` (4 subsequent siblings)
6 siblings, 0 replies; 20+ messages in thread
From: Juan Quintela @ 2017-05-12 15:52 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
This way we use the "normal" way of printing errors for hmp commands.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
---
hmp.c | 9 +++++++--
include/sysemu/sysemu.h | 4 ++--
migration/savevm.c | 51 ++++++++++++++++++++++++------------------------
replay/replay-snapshot.c | 8 ++++++--
vl.c | 4 +++-
5 files changed, 43 insertions(+), 33 deletions(-)
diff --git a/hmp.c b/hmp.c
index 524e589..b9dd933 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1274,17 +1274,22 @@ void hmp_loadvm(Monitor *mon, const QDict *qdict)
{
int saved_vm_running = runstate_is_running();
const char *name = qdict_get_str(qdict, "name");
+ Error *err = NULL;
vm_stop(RUN_STATE_RESTORE_VM);
- if (load_vmstate(name) == 0 && saved_vm_running) {
+ if (load_vmstate(name, &err) == 0 && saved_vm_running) {
vm_start();
}
+ hmp_handle_error(mon, &err);
}
void hmp_savevm(Monitor *mon, const QDict *qdict)
{
- save_vmstate(qdict_get_try_str(qdict, "name"));
+ Error *err = NULL;
+
+ save_vmstate(qdict_get_try_str(qdict, "name"), &err);
+ hmp_handle_error(mon, &err);
}
void hmp_delvm(Monitor *mon, const QDict *qdict)
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 15656b7..058d5eb 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -75,8 +75,8 @@ void qemu_remove_exit_notifier(Notifier *notify);
void qemu_add_machine_init_done_notifier(Notifier *notify);
void qemu_remove_machine_init_done_notifier(Notifier *notify);
-int save_vmstate(const char *name);
-int load_vmstate(const char *name);
+int save_vmstate(const char *name, Error **errp);
+int load_vmstate(const char *name, Error **errp);
void qemu_announce_self(void);
diff --git a/migration/savevm.c b/migration/savevm.c
index 352a8f2..b2fd06f 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2074,7 +2074,7 @@ int qemu_loadvm_state(QEMUFile *f)
return ret;
}
-int save_vmstate(const char *name)
+int save_vmstate(const char *name, Error **errp)
{
BlockDriverState *bs, *bs1;
QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1;
@@ -2084,29 +2084,27 @@ int save_vmstate(const char *name)
uint64_t vm_state_size;
qemu_timeval tv;
struct tm tm;
- Error *local_err = NULL;
AioContext *aio_context;
if (!bdrv_all_can_snapshot(&bs)) {
- error_report("Device '%s' is writable but does not support snapshots",
- bdrv_get_device_name(bs));
+ error_setg(errp, "Device '%s' is writable but does not support "
+ "snapshots", bdrv_get_device_name(bs));
return ret;
}
/* Delete old snapshots of the same name */
if (name) {
- ret = bdrv_all_delete_snapshot(name, &bs1, &local_err);
+ ret = bdrv_all_delete_snapshot(name, &bs1, errp);
if (ret < 0) {
- error_reportf_err(local_err,
- "Error while deleting snapshot on device '%s': ",
- bdrv_get_device_name(bs1));
+ error_prepend(errp, "Error while deleting snapshot on device "
+ "'%s': ", bdrv_get_device_name(bs1));
return ret;
}
}
bs = bdrv_all_find_vmstate_bs();
if (bs == NULL) {
- error_report("No block device can accept snapshots");
+ error_setg(errp, "No block device can accept snapshots");
return ret;
}
aio_context = bdrv_get_aio_context(bs);
@@ -2115,7 +2113,7 @@ int save_vmstate(const char *name)
ret = global_state_store();
if (ret) {
- error_report("Error saving global state");
+ error_setg(errp, "Error saving global state");
return ret;
}
vm_stop(RUN_STATE_SAVE_VM);
@@ -2147,21 +2145,20 @@ int save_vmstate(const char *name)
/* save the VM state */
f = qemu_fopen_bdrv(bs, 1);
if (!f) {
- error_report("Could not open VM state file");
+ error_setg(errp, "Could not open VM state file");
goto the_end;
}
- ret = qemu_savevm_state(f, &local_err);
+ ret = qemu_savevm_state(f, errp);
vm_state_size = qemu_ftell(f);
qemu_fclose(f);
if (ret < 0) {
- error_report_err(local_err);
goto the_end;
}
ret = bdrv_all_create_snapshot(sn, bs, vm_state_size, &bs);
if (ret < 0) {
- error_report("Error while creating snapshot on '%s'",
- bdrv_get_device_name(bs));
+ error_setg(errp, "Error while creating snapshot on '%s'",
+ bdrv_get_device_name(bs));
goto the_end;
}
@@ -2234,7 +2231,7 @@ void qmp_xen_load_devices_state(const char *filename, Error **errp)
migration_incoming_state_destroy();
}
-int load_vmstate(const char *name)
+int load_vmstate(const char *name, Error **errp)
{
BlockDriverState *bs, *bs_vm_state;
QEMUSnapshotInfo sn;
@@ -2244,20 +2241,22 @@ int load_vmstate(const char *name)
MigrationIncomingState *mis = migration_incoming_get_current();
if (!bdrv_all_can_snapshot(&bs)) {
- error_report("Device '%s' is writable but does not support snapshots",
- bdrv_get_device_name(bs));
+ error_setg(errp,
+ "Device '%s' is writable but does not support snapshots",
+ bdrv_get_device_name(bs));
return -ENOTSUP;
}
ret = bdrv_all_find_snapshot(name, &bs);
if (ret < 0) {
- error_report("Device '%s' does not have the requested snapshot '%s'",
- bdrv_get_device_name(bs), name);
+ error_setg(errp,
+ "Device '%s' does not have the requested snapshot '%s'",
+ bdrv_get_device_name(bs), name);
return ret;
}
bs_vm_state = bdrv_all_find_vmstate_bs();
if (!bs_vm_state) {
- error_report("No block device supports snapshots");
+ error_setg(errp, "No block device supports snapshots");
return -ENOTSUP;
}
aio_context = bdrv_get_aio_context(bs_vm_state);
@@ -2269,8 +2268,8 @@ int load_vmstate(const char *name)
if (ret < 0) {
return ret;
} else if (sn.vm_state_size == 0) {
- error_report("This is a disk-only snapshot. Revert to it offline "
- "using qemu-img.");
+ error_setg(errp, "This is a disk-only snapshot. Revert to it "
+ " offline using qemu-img");
return -EINVAL;
}
@@ -2279,7 +2278,7 @@ int load_vmstate(const char *name)
ret = bdrv_all_goto_snapshot(name, &bs);
if (ret < 0) {
- error_report("Error %d while activating snapshot '%s' on '%s'",
+ error_setg(errp, "Error %d while activating snapshot '%s' on '%s'",
ret, name, bdrv_get_device_name(bs));
return ret;
}
@@ -2287,7 +2286,7 @@ int load_vmstate(const char *name)
/* restore the VM state */
f = qemu_fopen_bdrv(bs_vm_state, 0);
if (!f) {
- error_report("Could not open VM state file");
+ error_setg(errp, "Could not open VM state file");
return -EINVAL;
}
@@ -2301,7 +2300,7 @@ int load_vmstate(const char *name)
migration_incoming_state_destroy();
if (ret < 0) {
- error_report("Error %d while loading VM state", ret);
+ error_setg(errp, "Error %d while loading VM state", ret);
return ret;
}
diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c
index 8cced46..c75cd38 100644
--- a/replay/replay-snapshot.c
+++ b/replay/replay-snapshot.c
@@ -62,14 +62,18 @@ void replay_vmstate_register(void)
void replay_vmstate_init(void)
{
+ Error *err = NULL;
+
if (replay_snapshot) {
if (replay_mode == REPLAY_MODE_RECORD) {
- if (save_vmstate(replay_snapshot) != 0) {
+ if (save_vmstate(replay_snapshot, &err) != 0) {
+ error_report_err(err);
error_report("Could not create snapshot for icount record");
exit(1);
}
} else if (replay_mode == REPLAY_MODE_PLAY) {
- if (load_vmstate(replay_snapshot) != 0) {
+ if (load_vmstate(replay_snapshot, &err) != 0) {
+ error_report_err(err);
error_report("Could not load snapshot for icount replay");
exit(1);
}
diff --git a/vl.c b/vl.c
index ce2b392..b48f308 100644
--- a/vl.c
+++ b/vl.c
@@ -4687,7 +4687,9 @@ int main(int argc, char **argv, char **envp)
if (replay_mode != REPLAY_MODE_NONE) {
replay_vmstate_init();
} else if (loadvm) {
- if (load_vmstate(loadvm) < 0) {
+ Error *local_err = NULL;
+ if (load_vmstate(loadvm, &local_err) < 0) {
+ error_report_err(local_err);
autostart = 0;
}
}
--
2.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Qemu-devel] [PULL 3/5] ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO
2017-05-12 15:52 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 1/5] migration: Fix regression with compression threads Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 2/5] migration: Pass Error ** argument to {save, load}_vmstate Juan Quintela
@ 2017-05-12 15:52 ` Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 4/5] migration: Create block capabilities for shared and enable Juan Quintela
` (3 subsequent siblings)
6 siblings, 0 replies; 20+ messages in thread
From: Juan Quintela @ 2017-05-12 15:52 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
Reflects better what it does now, and avoid confussions with
RAM_SAVE_FLAG_COMPRESS_PAGE.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
migration/ram.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 995d1fc..76c118c 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -48,8 +48,14 @@
/***********************************************************/
/* ram save/restore */
+/* RAM_SAVE_FLAG_ZERO used to be named RAM_SAVE_FLAG_COMPRESS, it
+ * worked for pages that where filled with the same char. We switched
+ * it to only search for the zero value. And to avoid confusion with
+ * RAM_SSAVE_FLAG_COMPRESS_PAGE just rename it.
+ */
+
#define RAM_SAVE_FLAG_FULL 0x01 /* Obsolete, not used anymore */
-#define RAM_SAVE_FLAG_COMPRESS 0x02
+#define RAM_SAVE_FLAG_ZERO 0x02
#define RAM_SAVE_FLAG_MEM_SIZE 0x04
#define RAM_SAVE_FLAG_PAGE 0x08
#define RAM_SAVE_FLAG_EOS 0x10
@@ -746,7 +752,7 @@ static int save_zero_page(RAMState *rs, RAMBlock *block, ram_addr_t offset,
if (is_zero_range(p, TARGET_PAGE_SIZE)) {
rs->zero_pages++;
rs->bytes_transferred +=
- save_page_header(rs, rs->f, block, offset | RAM_SAVE_FLAG_COMPRESS);
+ save_page_header(rs, rs->f, block, offset | RAM_SAVE_FLAG_ZERO);
qemu_put_byte(rs->f, 0);
rs->bytes_transferred += 1;
pages = 1;
@@ -2406,7 +2412,7 @@ static int ram_load_postcopy(QEMUFile *f)
trace_ram_load_postcopy_loop((uint64_t)addr, flags);
place_needed = false;
- if (flags & (RAM_SAVE_FLAG_COMPRESS | RAM_SAVE_FLAG_PAGE)) {
+ if (flags & (RAM_SAVE_FLAG_ZERO | RAM_SAVE_FLAG_PAGE)) {
block = ram_block_from_stream(f, flags);
host = host_from_ram_block_offset(block, addr);
@@ -2453,7 +2459,7 @@ static int ram_load_postcopy(QEMUFile *f)
last_host = host;
switch (flags & ~RAM_SAVE_FLAG_CONTINUE) {
- case RAM_SAVE_FLAG_COMPRESS:
+ case RAM_SAVE_FLAG_ZERO:
ch = qemu_get_byte(f);
memset(page_buffer, ch, TARGET_PAGE_SIZE);
if (ch) {
@@ -2542,7 +2548,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
flags = addr & ~TARGET_PAGE_MASK;
addr &= TARGET_PAGE_MASK;
- if (flags & (RAM_SAVE_FLAG_COMPRESS | RAM_SAVE_FLAG_PAGE |
+ if (flags & (RAM_SAVE_FLAG_ZERO | RAM_SAVE_FLAG_PAGE |
RAM_SAVE_FLAG_COMPRESS_PAGE | RAM_SAVE_FLAG_XBZRLE)) {
RAMBlock *block = ram_block_from_stream(f, flags);
@@ -2604,7 +2610,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
}
break;
- case RAM_SAVE_FLAG_COMPRESS:
+ case RAM_SAVE_FLAG_ZERO:
ch = qemu_get_byte(f);
ram_handle_compressed(host, ch, TARGET_PAGE_SIZE);
break;
--
2.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Qemu-devel] [PULL 4/5] migration: Create block capabilities for shared and enable
2017-05-12 15:52 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
` (2 preceding siblings ...)
2017-05-12 15:52 ` [Qemu-devel] [PULL 3/5] ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO Juan Quintela
@ 2017-05-12 15:52 ` Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 5/5] migration: Create migration/blocker.h Juan Quintela
` (2 subsequent siblings)
6 siblings, 0 replies; 20+ messages in thread
From: Juan Quintela @ 2017-05-12 15:52 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
Those two capabilities were added through the command line. Notice that
we just created them. This is just the boilerplate.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
---
include/migration/block.h | 3 +++
include/migration/migration.h | 3 +++
migration/migration.c | 36 ++++++++++++++++++++++++++++++++++++
qapi-schema.json | 7 ++++++-
4 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/include/migration/block.h b/include/migration/block.h
index 41a1ac8..5b3f1a5 100644
--- a/include/migration/block.h
+++ b/include/migration/block.h
@@ -20,4 +20,7 @@ uint64_t blk_mig_bytes_transferred(void);
uint64_t blk_mig_bytes_remaining(void);
uint64_t blk_mig_bytes_total(void);
+void migrate_set_block_shared(MigrationState *s, bool value);
+void migrate_set_block_enabled(MigrationState *s, bool value);
+
#endif /* MIGRATION_BLOCK_H */
diff --git a/include/migration/migration.h b/include/migration/migration.h
index e29cb01..465d8ce 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -311,6 +311,9 @@ bool migrate_colo_enabled(void);
int64_t xbzrle_cache_resize(int64_t new_size);
+bool migrate_use_block_enabled(void);
+bool migrate_use_block_shared(void);
+
bool migrate_use_compression(void);
int migrate_compress_level(void);
int migrate_compress_threads(void);
diff --git a/migration/migration.c b/migration/migration.c
index 799952c..250e3e3 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1210,6 +1210,16 @@ bool migration_is_blocked(Error **errp)
return false;
}
+void migrate_set_block_shared(MigrationState *s, bool value)
+{
+ s->enabled_capabilities[MIGRATION_CAPABILITY_BLOCK_SHARED] = value;
+}
+
+void migrate_set_block_enabled(MigrationState *s, bool value)
+{
+ s->enabled_capabilities[MIGRATION_CAPABILITY_BLOCK_ENABLED] = value;
+}
+
void qmp_migrate(const char *uri, bool has_blk, bool blk,
bool has_inc, bool inc, bool has_detach, bool detach,
Error **errp)
@@ -1239,6 +1249,14 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
s = migrate_init(¶ms);
+ if (has_blk && blk) {
+ migrate_set_block_enabled(s, true);
+ }
+
+ if (has_inc && inc) {
+ migrate_set_block_shared(s, true);
+ }
+
if (strstart(uri, "tcp:", &p)) {
tcp_start_outgoing_migration(s, p, &local_err);
#ifdef CONFIG_RDMA
@@ -1434,6 +1452,24 @@ int64_t migrate_xbzrle_cache_size(void)
return s->xbzrle_cache_size;
}
+bool migrate_use_block_enabled(void)
+{
+ MigrationState *s;
+
+ s = migrate_get_current();
+
+ return s->enabled_capabilities[MIGRATION_CAPABILITY_BLOCK_ENABLED];
+}
+
+bool migrate_use_block_shared(void)
+{
+ MigrationState *s;
+
+ s = migrate_get_current();
+
+ return s->enabled_capabilities[MIGRATION_CAPABILITY_BLOCK_SHARED];
+}
+
/* migration thread support */
/*
* Something bad happened to the RP stream, mark an error
diff --git a/qapi-schema.json b/qapi-schema.json
index 5728b7f..109852e 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -894,11 +894,16 @@
# @release-ram: if enabled, qemu will free the migrated ram pages on the source
# during postcopy-ram migration. (since 2.9)
#
+# @block-enabled: enable block migration (Since 2.10)
+#
+# @block-shared: enable block shared migration (Since 2.10)
+#
# Since: 1.2
##
{ 'enum': 'MigrationCapability',
'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
- 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram'] }
+ 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
+ 'block-enabled', 'block-shared' ] }
##
# @MigrationCapabilityStatus:
--
2.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [Qemu-devel] [PULL 5/5] migration: Create migration/blocker.h
2017-05-12 15:52 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
` (3 preceding siblings ...)
2017-05-12 15:52 ` [Qemu-devel] [PULL 4/5] migration: Create block capabilities for shared and enable Juan Quintela
@ 2017-05-12 15:52 ` Juan Quintela
2017-05-15 13:58 ` [Qemu-devel] [PULL 0/5] Migration pull request Stefan Hajnoczi
2017-05-16 14:35 ` Stefan Hajnoczi
6 siblings, 0 replies; 20+ messages in thread
From: Juan Quintela @ 2017-05-12 15:52 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
This allows us to remove lots of includes of migration/migration.h
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
block/qcow.c | 2 +-
block/vdi.c | 2 +-
block/vhdx.c | 2 +-
block/vmdk.c | 2 +-
block/vpc.c | 2 +-
block/vvfat.c | 2 +-
hw/9pfs/9p.c | 2 +-
hw/display/qxl.c | 2 +-
hw/display/virtio-gpu.c | 2 +-
hw/intc/arm_gic_kvm.c | 2 +-
hw/intc/arm_gicv3_its_kvm.c | 2 +-
hw/intc/arm_gicv3_kvm.c | 2 +-
hw/misc/ivshmem.c | 2 +-
hw/scsi/vhost-scsi.c | 2 +-
hw/virtio/vhost.c | 2 +-
include/migration/blocker.h | 35 +++++++++++++++++++++++++++++++++++
include/migration/migration.h | 18 ------------------
migration/migration.c | 1 +
stubs/migr-blocker.c | 2 +-
target/i386/kvm.c | 2 +-
20 files changed, 53 insertions(+), 35 deletions(-)
create mode 100644 include/migration/blocker.h
diff --git a/block/qcow.c b/block/qcow.c
index 5d147b9..95ab123 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -32,7 +32,7 @@
#include <zlib.h>
#include "qapi/qmp/qerror.h"
#include "crypto/cipher.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
/**************************************************************/
/* QEMU COW block driver with compression and encryption support */
diff --git a/block/vdi.c b/block/vdi.c
index d12d9cd..79af477 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -55,7 +55,7 @@
#include "sysemu/block-backend.h"
#include "qemu/module.h"
#include "qemu/bswap.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "qemu/coroutine.h"
#include "qemu/cutils.h"
#include "qemu/uuid.h"
diff --git a/block/vhdx.c b/block/vhdx.c
index e8fe3fb..8b270b5 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -24,7 +24,7 @@
#include "qemu/crc32c.h"
#include "qemu/bswap.h"
#include "block/vhdx.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "qemu/uuid.h"
/* Options for VHDX creation */
diff --git a/block/vmdk.c b/block/vmdk.c
index c61b9cc..55581b0 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -31,7 +31,7 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qemu/bswap.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "qemu/cutils.h"
#include <zlib.h>
diff --git a/block/vpc.c b/block/vpc.c
index ecfee77..4240ba9 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -28,7 +28,7 @@
#include "block/block_int.h"
#include "sysemu/block-backend.h"
#include "qemu/module.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "qemu/bswap.h"
#include "qemu/uuid.h"
diff --git a/block/vvfat.c b/block/vvfat.c
index 9c82371..426ca70 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -28,7 +28,7 @@
#include "block/block_int.h"
#include "qemu/module.h"
#include "qemu/bswap.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qbool.h"
#include "qapi/qmp/qstring.h"
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index c80ba67..ab3e22f 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -23,7 +23,7 @@
#include "9p-xattr.h"
#include "coth.h"
#include "trace.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
int open_fd_hw;
int total_open_fd;
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 4d94cec..ad09bb9 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -26,7 +26,7 @@
#include "qemu/queue.h"
#include "qemu/atomic.h"
#include "sysemu/sysemu.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "trace.h"
#include "qxl.h"
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index e1056f3..8ad27f3 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -19,7 +19,7 @@
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-gpu.h"
#include "hw/virtio/virtio-bus.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "qemu/log.h"
#include "qapi/error.h"
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
index ec952ec..af5cd36 100644
--- a/hw/intc/arm_gic_kvm.c
+++ b/hw/intc/arm_gic_kvm.c
@@ -24,7 +24,7 @@
#include "qemu-common.h"
#include "cpu.h"
#include "hw/sysbus.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "sysemu/kvm.h"
#include "kvm_arm.h"
#include "gic_internal.h"
diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
index bd4f3aa..a0441d6 100644
--- a/hw/intc/arm_gicv3_its_kvm.c
+++ b/hw/intc/arm_gicv3_its_kvm.c
@@ -24,7 +24,7 @@
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
#include "kvm_arm.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#define TYPE_KVM_ARM_ITS "arm-its-kvm"
#define KVM_ARM_ITS(obj) OBJECT_CHECK(GICv3ITSState, (obj), TYPE_KVM_ARM_ITS)
diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c
index 19aab56..4ee2baa 100644
--- a/hw/intc/arm_gicv3_kvm.c
+++ b/hw/intc/arm_gicv3_kvm.c
@@ -28,7 +28,7 @@
#include "kvm_arm.h"
#include "gicv3_internal.h"
#include "vgic_common.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#ifdef DEBUG_GICV3_KVM
#define DPRINTF(fmt, ...) \
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 82ce837..475e36a 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -25,7 +25,7 @@
#include "hw/pci/msi.h"
#include "hw/pci/msix.h"
#include "sysemu/kvm.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "qemu/error-report.h"
#include "qemu/event_notifier.h"
#include "qom/object_interfaces.h"
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 8f53ac3..cd4ab05 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -21,7 +21,7 @@
#include "qemu/error-report.h"
#include "qemu/queue.h"
#include "monitor/monitor.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "hw/virtio/vhost-scsi.h"
#include "hw/virtio/vhost.h"
#include "hw/virtio/virtio-scsi.h"
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 0001e60..03a46a7 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -25,7 +25,7 @@
#include "exec/address-spaces.h"
#include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-access.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "sysemu/dma.h"
/* enabled until disconnected backend stabilizes */
diff --git a/include/migration/blocker.h b/include/migration/blocker.h
new file mode 100644
index 0000000..acd2701
--- /dev/null
+++ b/include/migration/blocker.h
@@ -0,0 +1,35 @@
+/*
+ * QEMU migration blockers
+ *
+ * Copyright IBM, Corp. 2008
+ *
+ * Authors:
+ * Anthony Liguori <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef MIGRATION_BLOCKER_H
+#define MIGRATION_BLOCKER_H
+
+/**
+ * @migrate_add_blocker - prevent migration from proceeding
+ *
+ * @reason - an error to be returned whenever migration is attempted
+ *
+ * @errp - [out] The reason (if any) we cannot block migration right now.
+ *
+ * @returns - 0 on success, -EBUSY/-EACCES on failure, with errp set.
+ */
+int migrate_add_blocker(Error *reason, Error **errp);
+
+/**
+ * @migrate_del_blocker - remove a blocking error from migration
+ *
+ * @reason - the error blocking migration
+ */
+void migrate_del_blocker(Error *reason);
+
+#endif
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 465d8ce..258e4ff 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -275,24 +275,6 @@ int ram_discard_range(const char *block_name, uint64_t start, size_t length);
int ram_postcopy_incoming_init(MigrationIncomingState *mis);
void ram_postcopy_migrated_memory_release(MigrationState *ms);
-/**
- * @migrate_add_blocker - prevent migration from proceeding
- *
- * @reason - an error to be returned whenever migration is attempted
- *
- * @errp - [out] The reason (if any) we cannot block migration right now.
- *
- * @returns - 0 on success, -EBUSY/-EACCES on failure, with errp set.
- */
-int migrate_add_blocker(Error *reason, Error **errp);
-
-/**
- * @migrate_del_blocker - remove a blocking error from migration
- *
- * @reason - the error blocking migration
- */
-void migrate_del_blocker(Error *reason);
-
int check_migratable(Object *obj, Error **err);
bool migrate_release_ram(void);
diff --git a/migration/migration.c b/migration/migration.c
index 250e3e3..78102eb 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -17,6 +17,7 @@
#include "qemu/cutils.h"
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
+#include "migration/blocker.h"
#include "migration/migration.h"
#include "migration/qemu-file.h"
#include "sysemu/sysemu.h"
diff --git a/stubs/migr-blocker.c b/stubs/migr-blocker.c
index a5ba18f..2b64ac9 100644
--- a/stubs/migr-blocker.c
+++ b/stubs/migr-blocker.c
@@ -1,6 +1,6 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
int migrate_add_blocker(Error *reason, Error **errp)
{
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 55865db..011d4a5 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -43,7 +43,7 @@
#include "standard-headers/asm-x86/hyperv.h"
#include "hw/pci/pci.h"
#include "hw/pci/msi.h"
-#include "migration/migration.h"
+#include "migration/blocker.h"
#include "exec/memattrs.h"
#include "trace.h"
--
2.9.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration pull request
2017-05-12 15:52 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
` (4 preceding siblings ...)
2017-05-12 15:52 ` [Qemu-devel] [PULL 5/5] migration: Create migration/blocker.h Juan Quintela
@ 2017-05-15 13:58 ` Stefan Hajnoczi
2017-05-15 14:52 ` Eric Blake
2017-05-15 17:17 ` Juan Quintela
2017-05-16 14:35 ` Stefan Hajnoczi
6 siblings, 2 replies; 20+ messages in thread
From: Stefan Hajnoczi @ 2017-05-15 13:58 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel, lvivier, dgilbert, peterx
[-- Attachment #1: Type: text/plain, Size: 2888 bytes --]
On Fri, May 12, 2017 at 05:52:44PM +0200, Juan Quintela wrote:
> Hi
>
> This pull contains:
> - Fix regression with compression threads (mea culpa)
> - start of includes migration (creating of blocker.h header)
> - Use Error** correctly after several iterations
> - Rename of RAM_SAVE_FLAG_COMPRESS
> - Create block capabilities for shared and enable
>
> Please, apply.
>
>
>
> The following changes since commit ecc1f5adeec4e3324d1b695a7c54e3967c526949:
>
> maintainers: Add myself as linux-user reviewer (2017-05-11 13:31:11 -0400)
>
> are available in the git repository at:
>
> git://github.com/juanquintela/qemu.git tags/migration/20170512
>
> for you to fetch changes up to f15e5850905dea6a09e29ef14df508ec236321d9:
>
> migration: Create migration/blocker.h (2017-05-12 17:10:57 +0200)
>
> ----------------------------------------------------------------
> migration/next for 20170512
>
> ----------------------------------------------------------------
> Juan Quintela (5):
> migration: Fix regression with compression threads
> migration: Pass Error ** argument to {save,load}_vmstate
> ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO
> migration: Create block capabilities for shared and enable
> migration: Create migration/blocker.h
>
> block/qcow.c | 2 +-
> block/vdi.c | 2 +-
> block/vhdx.c | 2 +-
> block/vmdk.c | 2 +-
> block/vpc.c | 2 +-
> block/vvfat.c | 2 +-
> hmp.c | 9 ++++++--
> hw/9pfs/9p.c | 2 +-
> hw/display/qxl.c | 2 +-
> hw/display/virtio-gpu.c | 2 +-
> hw/intc/arm_gic_kvm.c | 2 +-
> hw/intc/arm_gicv3_its_kvm.c | 2 +-
> hw/intc/arm_gicv3_kvm.c | 2 +-
> hw/misc/ivshmem.c | 2 +-
> hw/scsi/vhost-scsi.c | 2 +-
> hw/virtio/vhost.c | 2 +-
> include/migration/block.h | 3 +++
> include/migration/blocker.h | 35 +++++++++++++++++++++++++++++
> include/migration/migration.h | 21 +++---------------
> include/sysemu/sysemu.h | 4 ++--
> migration/migration.c | 37 +++++++++++++++++++++++++++++++
> migration/ram.c | 35 +++++++++++++++++------------
> migration/savevm.c | 51 +++++++++++++++++++++----------------------
> qapi-schema.json | 7 +++++-
> replay/replay-snapshot.c | 8 +++++--
> stubs/migr-blocker.c | 2 +-
> target/i386/kvm.c | 2 +-
> vl.c | 4 +++-
> 28 files changed, 165 insertions(+), 83 deletions(-)
> create mode 100644 include/migration/blocker.h
>
Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration pull request
2017-05-15 13:58 ` [Qemu-devel] [PULL 0/5] Migration pull request Stefan Hajnoczi
@ 2017-05-15 14:52 ` Eric Blake
2017-05-15 17:17 ` Juan Quintela
1 sibling, 0 replies; 20+ messages in thread
From: Eric Blake @ 2017-05-15 14:52 UTC (permalink / raw)
To: Stefan Hajnoczi, Juan Quintela; +Cc: lvivier, qemu-devel, peterx, dgilbert
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
On 05/15/2017 08:58 AM, Stefan Hajnoczi wrote:
>> ----------------------------------------------------------------
>> Juan Quintela (5):
>> migration: Fix regression with compression threads
>> migration: Pass Error ** argument to {save,load}_vmstate
>> ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO
>> migration: Create block capabilities for shared and enable
We may still end up changing our representation of these capabilities (I
don't think the design discussion has completed) - but as long as we get
it done before 2.10, I don't see a reason to have to unstage the pull
request.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration pull request
2017-05-15 13:58 ` [Qemu-devel] [PULL 0/5] Migration pull request Stefan Hajnoczi
2017-05-15 14:52 ` Eric Blake
@ 2017-05-15 17:17 ` Juan Quintela
1 sibling, 0 replies; 20+ messages in thread
From: Juan Quintela @ 2017-05-15 17:17 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, lvivier, dgilbert, peterx
Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Fri, May 12, 2017 at 05:52:44PM +0200, Juan Quintela wrote:
>> Hi
>>
>>
>
> Thanks, applied to my staging tree:
> https://github.com/stefanha/qemu/commits/staging
Hi
As fast as I sent the PULL request, more comments appeared.
What do you preffer?
- drop the whole PULL request?
- drop the patch: migration: Create block capabilities for shared and enable
it has zero conflicts with the other patches
- let the PULL alone and I will sent fixes on top of that?
I would preffer option two, but that is up to you.
Sorry for the inconvenience.
Later, Juan.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration pull request
2017-05-12 15:52 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
` (5 preceding siblings ...)
2017-05-15 13:58 ` [Qemu-devel] [PULL 0/5] Migration pull request Stefan Hajnoczi
@ 2017-05-16 14:35 ` Stefan Hajnoczi
6 siblings, 0 replies; 20+ messages in thread
From: Stefan Hajnoczi @ 2017-05-16 14:35 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel, Laurent Vivier, Dave Gilbert, peterx
On Fri, May 12, 2017 at 4:52 PM, Juan Quintela <quintela@redhat.com> wrote:
> Hi
>
> This pull contains:
> - Fix regression with compression threads (mea culpa)
> - start of includes migration (creating of blocker.h header)
> - Use Error** correctly after several iterations
> - Rename of RAM_SAVE_FLAG_COMPRESS
> - Create block capabilities for shared and enable
>
> Please, apply.
I have reverted the pull request at Juan's request.
Stefan
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration pull request
2018-06-04 4:21 Juan Quintela
2018-06-04 4:29 ` no-reply
@ 2018-06-04 13:24 ` Peter Maydell
1 sibling, 0 replies; 20+ messages in thread
From: Peter Maydell @ 2018-06-04 13:24 UTC (permalink / raw)
To: Juan Quintela
Cc: QEMU Developers, Laurent Vivier, Dr. David Alan Gilbert, Peter Xu
On 4 June 2018 at 05:21, Juan Quintela <quintela@redhat.com> wrote:
> The following changes since commit 392fba9f583223786f844dce9b2e7f9a0ce0147a:
>
> Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-010618-1' into staging (2018-06-01 17:32:30 +0100)
>
> are available in the Git repository at:
>
> git://github.com/juanquintela/qemu.git tags/migration/20180604
>
> for you to fetch changes up to c5e76115ccb4979cec795a8ae38becd07c2fde9f:
>
> migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect (2018-06-04 05:46:15 +0200)
>
> ----------------------------------------------------------------
> migration/next for 20180604
>
> - RDMA fixes from (lidong)
> - Fix docempress-error-check (Xiao)
> - make -S and block work better (dave)
> - don't migrate "bad" ramblocks (Cédric)
>
> Please apply, Juan.
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration pull request
2018-06-04 4:29 ` no-reply
@ 2018-06-04 7:30 ` Juan Quintela
0 siblings, 0 replies; 20+ messages in thread
From: Juan Quintela @ 2018-06-04 7:30 UTC (permalink / raw)
To: no-reply; +Cc: qemu-devel, famz, lvivier, dgilbert, peterx
no-reply@patchew.org wrote:
> Hi,
>
> This series seems to have some coding style problems. See output below for
> more information:
>
> Type: series
> Message-id: 20180604042156.13812-1-quintela@redhat.com
> Subject: [Qemu-devel] [PULL 0/5] Migration pull request
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> From https://github.com/patchew-project/qemu
> t [tag update] patchew/20180514065700.22202-1-clg@kaod.org -> patchew/20180514065700.22202-1-clg@kaod.org
> * [new tag] patchew/20180604042156.13812-1-quintela@redhat.com -> patchew/20180604042156.13812-1-quintela@redhat.com
> Switched to a new branch 'test'
> 99ac0fb20d migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect
> 7c902253bb migration: remove unnecessary variables len in QIOChannelRDMA
> 3c1203cb38 migration: Don't activate block devices if using -S
> 2ecc458546 migration: discard non-migratable RAMBlocks
> 718b388d4e migration: introduce decompress-error-check
>
> === OUTPUT BEGIN ===
> Checking PATCH 1/5: migration: introduce decompress-error-check...
> Checking PATCH 2/5: migration: discard non-migratable RAMBlocks...
> ERROR: Macros with multiple statements should be enclosed in a do - while loop
> #191: FILE: migration/ram.c:161:
> +#define RAMBLOCK_FOREACH_MIGRATABLE(block) \
> + RAMBLOCK_FOREACH(block) \
> + if (!qemu_ram_is_migratable(block)) {} else
>
> ERROR: trailing statements should be on next line
> #193: FILE: migration/ram.c:163:
> + if (!qemu_ram_is_migratable(block)) {} else
We know. it is on purpose. There is no good solution. Changing
checkpatch don't make sense either, it is an one-off case.
Later, Juan.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration pull request
2018-06-04 4:21 Juan Quintela
@ 2018-06-04 4:29 ` no-reply
2018-06-04 7:30 ` Juan Quintela
2018-06-04 13:24 ` Peter Maydell
1 sibling, 1 reply; 20+ messages in thread
From: no-reply @ 2018-06-04 4:29 UTC (permalink / raw)
To: quintela; +Cc: famz, qemu-devel, lvivier, dgilbert, peterx
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20180604042156.13812-1-quintela@redhat.com
Subject: [Qemu-devel] [PULL 0/5] Migration pull request
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))
done
exit $failed
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
t [tag update] patchew/20180514065700.22202-1-clg@kaod.org -> patchew/20180514065700.22202-1-clg@kaod.org
* [new tag] patchew/20180604042156.13812-1-quintela@redhat.com -> patchew/20180604042156.13812-1-quintela@redhat.com
Switched to a new branch 'test'
99ac0fb20d migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect
7c902253bb migration: remove unnecessary variables len in QIOChannelRDMA
3c1203cb38 migration: Don't activate block devices if using -S
2ecc458546 migration: discard non-migratable RAMBlocks
718b388d4e migration: introduce decompress-error-check
=== OUTPUT BEGIN ===
Checking PATCH 1/5: migration: introduce decompress-error-check...
Checking PATCH 2/5: migration: discard non-migratable RAMBlocks...
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#191: FILE: migration/ram.c:161:
+#define RAMBLOCK_FOREACH_MIGRATABLE(block) \
+ RAMBLOCK_FOREACH(block) \
+ if (!qemu_ram_is_migratable(block)) {} else
ERROR: trailing statements should be on next line
#193: FILE: migration/ram.c:163:
+ if (!qemu_ram_is_migratable(block)) {} else
total: 2 errors, 0 warnings, 273 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 3/5: migration: Don't activate block devices if using -S...
Checking PATCH 4/5: migration: remove unnecessary variables len in QIOChannelRDMA...
Checking PATCH 5/5: migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect...
=== OUTPUT END ===
Test command exited with code: 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Qemu-devel] [PULL 0/5] Migration pull request
@ 2018-06-04 4:21 Juan Quintela
2018-06-04 4:29 ` no-reply
2018-06-04 13:24 ` Peter Maydell
0 siblings, 2 replies; 20+ messages in thread
From: Juan Quintela @ 2018-06-04 4:21 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
The following changes since commit 392fba9f583223786f844dce9b2e7f9a0ce0147a:
Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-010618-1' into staging (2018-06-01 17:32:30 +0100)
are available in the Git repository at:
git://github.com/juanquintela/qemu.git tags/migration/20180604
for you to fetch changes up to c5e76115ccb4979cec795a8ae38becd07c2fde9f:
migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect (2018-06-04 05:46:15 +0200)
----------------------------------------------------------------
migration/next for 20180604
- RDMA fixes from (lidong)
- Fix docempress-error-check (Xiao)
- make -S and block work better (dave)
- don't migrate "bad" ramblocks (Cédric)
Please apply, Juan.
----------------------------------------------------------------
Cédric Le Goater (1):
migration: discard non-migratable RAMBlocks
Dr. David Alan Gilbert (1):
migration: Don't activate block devices if using -S
Lidong Chen (2):
migration: remove unnecessary variables len in QIOChannelRDMA
migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect
Xiao Guangrong (1):
migration: introduce decompress-error-check
exec.c | 38 +++++++++++++++++++++++++++++++++++++
hw/arm/virt.c | 4 ++++
hw/i386/pc_piix.c | 1 +
hw/i386/pc_q35.c | 1 +
include/exec/cpu-common.h | 4 ++++
include/hw/compat.h | 7 ++++++-
migration/migration.c | 38 ++++++++++++++++++++++++++++++-------
migration/migration.h | 7 +++++++
migration/postcopy-ram.c | 12 ++++++------
migration/ram.c | 48 ++++++++++++++++++++++++++++++++++-------------
migration/rdma.c | 27 +++++++++-----------------
migration/savevm.c | 2 ++
migration/trace-events | 1 -
qapi/migration.json | 6 +++++-
14 files changed, 149 insertions(+), 47 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration PULL request
2017-06-14 11:51 [Qemu-devel] [PULL 0/5] Migration PULL request Juan Quintela
@ 2017-06-15 11:56 ` Peter Maydell
0 siblings, 0 replies; 20+ messages in thread
From: Peter Maydell @ 2017-06-15 11:56 UTC (permalink / raw)
To: Juan Quintela
Cc: QEMU Developers, Laurent Vivier, Dr. David Alan Gilbert, Peter Xu
On 14 June 2017 at 12:51, Juan Quintela <quintela@redhat.com> wrote:
> Hi
>
> In this pull requset:
> - I included the v1 of peter return path, fix it
> - fix the compliation with older compilers (new compliers don't
> complain about a repeated typedef, so I didn't noticed)
> - Add test for disabled features
> - Last bit of misc cleanup, remove of not needed includes
>
> Please, apply.
>
> Thanks, Juan.
>
> The following changes since commit 3f0602927b120a480b35dcf58cf6f95435b3ae91:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170613' into staging (2017-06-13 15:49:07 +0100)
>
> are available in the git repository at:
>
> git://github.com/juanquintela/qemu.git tags/migration/20170614
>
> for you to fetch changes up to 3416ab5bb452f1b6cea58aed8983ffb9a455b7c4:
>
> migration: Don't create decompression threads if not enabled (2017-06-14 11:11:06 +0200)
>
> ----------------------------------------------------------------
> migration/next for 20170614
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Qemu-devel] [PULL 0/5] Migration PULL request
@ 2017-06-14 11:51 Juan Quintela
2017-06-15 11:56 ` Peter Maydell
0 siblings, 1 reply; 20+ messages in thread
From: Juan Quintela @ 2017-06-14 11:51 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
Hi
In this pull requset:
- I included the v1 of peter return path, fix it
- fix the compliation with older compilers (new compliers don't
complain about a repeated typedef, so I didn't noticed)
- Add test for disabled features
- Last bit of misc cleanup, remove of not needed includes
Please, apply.
Thanks, Juan.
The following changes since commit 3f0602927b120a480b35dcf58cf6f95435b3ae91:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170613' into staging (2017-06-13 15:49:07 +0100)
are available in the git repository at:
git://github.com/juanquintela/qemu.git tags/migration/20170614
for you to fetch changes up to 3416ab5bb452f1b6cea58aed8983ffb9a455b7c4:
migration: Don't create decompression threads if not enabled (2017-06-14 11:11:06 +0200)
----------------------------------------------------------------
migration/next for 20170614
----------------------------------------------------------------
Juan Quintela (4):
migration: Fix compilation with older compilers
migration: Remove unneeded includes
migration: Test for disabled features on reception
migration: Don't create decompression threads if not enabled
Peter Xu (1):
migration: fix incorrect enable return path
include/migration/colo.h | 3 ---
include/migration/misc.h | 2 ++
include/migration/register.h | 3 ---
include/migration/vmstate.h | 1 -
include/qemu/typedefs.h | 2 ++
migration/block.c | 6 ------
migration/colo-failover.c | 2 ++
migration/colo.c | 2 --
migration/exec.c | 2 --
migration/fd.c | 2 --
migration/global_state.c | 1 -
migration/migration.c | 12 +++++-------
migration/migration.h | 2 --
migration/postcopy-ram.c | 2 --
migration/qemu-file.c | 2 --
migration/ram.c | 24 +++++++++++++++++++-----
migration/savevm.c | 6 ------
17 files changed, 30 insertions(+), 44 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration pull request
2017-05-31 9:15 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
@ 2017-06-01 14:50 ` Peter Maydell
0 siblings, 0 replies; 20+ messages in thread
From: Peter Maydell @ 2017-06-01 14:50 UTC (permalink / raw)
To: Juan Quintela
Cc: QEMU Developers, Laurent Vivier, Dr. David Alan Gilbert, Peter Xu
On 31 May 2017 at 10:15, Juan Quintela <quintela@redhat.com> wrote:
> Hi
>
> This are the migration patches ready for inclusion:
> - autoconverge improvements: (felipe franciosi)
> - create savem.h
>
> Please, Apply.
>
> The following changes since commit 0748b3526e8cb78b9cd64208426bfc3d54a72b04:
>
> Merge remote-tracking branch 'kwolf/tags/for-upstream' into staging (2017-05-30 14:15:15 +0100)
>
> are available in the git repository at:
>
> git://github.com/juanquintela/qemu.git tags/migration/20170531
>
> for you to fetch changes up to b4a3c64b16856a018869bfd4a9ed3b2a74554541:
>
> migration: use dirty_rate_high_cnt more aggressively (2017-05-31 09:39:20 +0200)
>
> ----------------------------------------------------------------
> migration/next for 20170531
>
> ----------------------------------------------------------------
> Felipe Franciosi (4):
> migration: keep bytes_xfer_prev init'd to zero
> migration: set dirty_pages_rate before autoconverge logic
> migration: set bytes_xfer_* outside of autoconverge logic
> migration: use dirty_rate_high_cnt more aggressively
>
> Juan Quintela (1):
> migration: Create savevm.h for functions exported from savevm.c
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Qemu-devel] [PULL 0/5] Migration pull request
@ 2017-05-31 9:15 Juan Quintela
2017-06-01 14:50 ` Peter Maydell
0 siblings, 1 reply; 20+ messages in thread
From: Juan Quintela @ 2017-05-31 9:15 UTC (permalink / raw)
To: qemu-devel; +Cc: dgilbert, lvivier, peterx
Hi
This are the migration patches ready for inclusion:
- autoconverge improvements: (felipe franciosi)
- create savem.h
Please, Apply.
The following changes since commit 0748b3526e8cb78b9cd64208426bfc3d54a72b04:
Merge remote-tracking branch 'kwolf/tags/for-upstream' into staging (2017-05-30 14:15:15 +0100)
are available in the git repository at:
git://github.com/juanquintela/qemu.git tags/migration/20170531
for you to fetch changes up to b4a3c64b16856a018869bfd4a9ed3b2a74554541:
migration: use dirty_rate_high_cnt more aggressively (2017-05-31 09:39:20 +0200)
----------------------------------------------------------------
migration/next for 20170531
----------------------------------------------------------------
Felipe Franciosi (4):
migration: keep bytes_xfer_prev init'd to zero
migration: set dirty_pages_rate before autoconverge logic
migration: set bytes_xfer_* outside of autoconverge logic
migration: use dirty_rate_high_cnt more aggressively
Juan Quintela (1):
migration: Create savevm.h for functions exported from savevm.c
include/sysemu/sysemu.h | 47 -----------------------------------------------
migration/colo.c | 1 +
migration/migration.c | 1 +
migration/postcopy-ram.c | 1 +
migration/ram.c | 23 +++++++++++------------
migration/savevm.c | 29 +++++++++++++++++++++++++----
migration/savevm.h | 41 +++++++++++++++++++++++++++++++++++++++++
7 files changed, 80 insertions(+), 63 deletions(-)
create mode 100644 migration/savevm.h
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] Migration pull request
2015-11-04 12:48 Juan Quintela
@ 2015-11-05 10:48 ` Peter Maydell
0 siblings, 0 replies; 20+ messages in thread
From: Peter Maydell @ 2015-11-05 10:48 UTC (permalink / raw)
To: Juan Quintela; +Cc: Amit Shah, QEMU Developers, Dr. David Alan Gilbert
On 4 November 2015 at 12:48, Juan Quintela <quintela@redhat.com> wrote:
> Hi
>
> This is the pull request for migration, it includes:
>
> - Liang Li series for improving migration downtime
> - Mark Cave-Ayland fix to analyze-migration script
>
> Please, apply
>
> The following changes since commit 79cf9fad341e6e7bd6b55395b71d5c5727d7f5b0:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20151103' into staging (2015-11-03 14:54:40 +0000)
>
> are available in the git repository at:
>
> git://github.com/juanquintela/qemu.git tags/migration/20151104
>
> for you to fetch changes up to 96e5c9bc77acef8b7b56cbe23a8a2611feff9e34:
>
> migration: fix analyze-migration.py script (2015-11-04 13:40:13 +0100)
>
> ----------------------------------------------------------------
> migration/next for 20151104
>
> ----------------------------------------------------------------
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Qemu-devel] [PULL 0/5] Migration pull request
@ 2015-11-04 12:48 Juan Quintela
2015-11-05 10:48 ` Peter Maydell
0 siblings, 1 reply; 20+ messages in thread
From: Juan Quintela @ 2015-11-04 12:48 UTC (permalink / raw)
To: qemu-devel; +Cc: amit.shah, dgilbert
Hi
This is the pull request for migration, it includes:
- Liang Li series for improving migration downtime
- Mark Cave-Ayland fix to analyze-migration script
Please, apply
The following changes since commit 79cf9fad341e6e7bd6b55395b71d5c5727d7f5b0:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20151103' into staging (2015-11-03 14:54:40 +0000)
are available in the git repository at:
git://github.com/juanquintela/qemu.git tags/migration/20151104
for you to fetch changes up to 96e5c9bc77acef8b7b56cbe23a8a2611feff9e34:
migration: fix analyze-migration.py script (2015-11-04 13:40:13 +0100)
----------------------------------------------------------------
migration/next for 20151104
----------------------------------------------------------------
Liang Li (4):
migration: defer migration_end & blk_mig_cleanup
migration: rename qemu_savevm_state_cancel
migration: rename cancel to cleanup in SaveVMHandles
migration: code clean up
Mark Cave-Ayland (1):
migration: fix analyze-migration.py script
include/migration/vmstate.h | 2 +-
include/sysemu/sysemu.h | 2 +-
migration/block.c | 10 ++--------
migration/migration.c | 13 ++++++-------
migration/ram.c | 10 ++--------
migration/savevm.c | 10 +++++-----
scripts/analyze-migration.py | 13 +++++++++++++
trace-events | 2 +-
8 files changed, 31 insertions(+), 31 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2018-06-04 13:24 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-12 15:52 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 1/5] migration: Fix regression with compression threads Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 2/5] migration: Pass Error ** argument to {save, load}_vmstate Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 3/5] ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 4/5] migration: Create block capabilities for shared and enable Juan Quintela
2017-05-12 15:52 ` [Qemu-devel] [PULL 5/5] migration: Create migration/blocker.h Juan Quintela
2017-05-15 13:58 ` [Qemu-devel] [PULL 0/5] Migration pull request Stefan Hajnoczi
2017-05-15 14:52 ` Eric Blake
2017-05-15 17:17 ` Juan Quintela
2017-05-16 14:35 ` Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2018-06-04 4:21 Juan Quintela
2018-06-04 4:29 ` no-reply
2018-06-04 7:30 ` Juan Quintela
2018-06-04 13:24 ` Peter Maydell
2017-06-14 11:51 [Qemu-devel] [PULL 0/5] Migration PULL request Juan Quintela
2017-06-15 11:56 ` Peter Maydell
2017-05-31 9:15 [Qemu-devel] [PULL 0/5] Migration pull request Juan Quintela
2017-06-01 14:50 ` Peter Maydell
2015-11-04 12:48 Juan Quintela
2015-11-05 10:48 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.