Index: new/Makefile.objs
===================================================================
---- new.orig/Makefile.objs 2013-12-06 07:46:38.000000000 +0100
-+++ new/Makefile.objs 2013-12-06 08:59:22.000000000 +0100
-@@ -56,6 +56,7 @@
+--- new.orig/Makefile.objs 2014-05-05 09:49:29.000000000 +0200
++++ new/Makefile.objs 2014-05-05 09:54:17.000000000 +0200
+@@ -55,6 +55,7 @@
common-obj-y += qemu-char.o #aio.o
common-obj-y += block-migration.o
common-obj-y += page_cache.o xbzrle.o
Index: new/block.c
===================================================================
---- new.orig/block.c 2013-12-06 07:46:38.000000000 +0100
-+++ new/block.c 2013-12-06 08:59:22.000000000 +0100
-@@ -1710,7 +1710,7 @@
+--- new.orig/block.c 2014-05-05 09:49:29.000000000 +0200
++++ new/block.c 2014-05-05 09:54:17.000000000 +0200
+@@ -1967,7 +1967,7 @@
bs_new->drv ? bs_new->drv->format_name : "");
}
assert(!bs->job);
Index: new/hmp-commands.hx
===================================================================
---- new.orig/hmp-commands.hx 2013-12-06 08:57:27.000000000 +0100
-+++ new/hmp-commands.hx 2013-12-06 08:59:22.000000000 +0100
-@@ -1731,6 +1731,8 @@
+--- new.orig/hmp-commands.hx 2014-05-05 09:49:29.000000000 +0200
++++ new/hmp-commands.hx 2014-05-05 09:54:17.000000000 +0200
+@@ -1777,6 +1777,8 @@
show current migration capabilities
@item info migrate_cache_size
show current migration XBZRLE cache size
@item info balloon
show balloon information
@item info qtree
-@@ -1752,3 +1754,35 @@
+@@ -1798,3 +1800,35 @@
STEXI
@end table
ETEXI
+ },
Index: new/hmp.c
===================================================================
---- new.orig/hmp.c 2013-12-06 08:57:27.000000000 +0100
-+++ new/hmp.c 2013-12-06 08:59:22.000000000 +0100
-@@ -1655,3 +1655,60 @@
-
+--- new.orig/hmp.c 2014-05-05 09:49:29.000000000 +0200
++++ new/hmp.c 2014-05-05 09:54:17.000000000 +0200
+@@ -1738,3 +1738,60 @@
+ qmp_object_del(id, &err);
hmp_handle_error(mon, &err);
}
+
+}
Index: new/hmp.h
===================================================================
---- new.orig/hmp.h 2013-12-06 07:46:38.000000000 +0100
-+++ new/hmp.h 2013-12-06 08:59:22.000000000 +0100
+--- new.orig/hmp.h 2014-05-05 09:49:29.000000000 +0200
++++ new/hmp.h 2014-05-05 09:54:17.000000000 +0200
@@ -25,6 +25,7 @@
void hmp_info_uuid(Monitor *mon, const QDict *qdict);
void hmp_info_chardev(Monitor *mon, const QDict *qdict);
void hmp_nbd_server_start(Monitor *mon, const QDict *qdict);
Index: new/include/block/block.h
===================================================================
---- new.orig/include/block/block.h 2013-12-06 07:46:38.000000000 +0100
-+++ new/include/block/block.h 2013-12-06 08:59:22.000000000 +0100
-@@ -214,6 +214,7 @@
+--- new.orig/include/block/block.h 2014-05-05 09:49:29.000000000 +0200
++++ new/include/block/block.h 2014-05-05 09:54:17.000000000 +0200
+@@ -251,6 +251,7 @@
const char *backing_file);
int bdrv_get_backing_file_depth(BlockDriverState *bs);
int bdrv_truncate(BlockDriverState *bs, int64_t offset);
void bdrv_get_geometry(BlockDriverState *bs, uint64_t *nb_sectors_ptr);
Index: new/include/sysemu/sysemu.h
===================================================================
---- new.orig/include/sysemu/sysemu.h 2013-12-06 07:46:38.000000000 +0100
-+++ new/include/sysemu/sysemu.h 2013-12-06 08:59:22.000000000 +0100
+--- new.orig/include/sysemu/sysemu.h 2014-05-05 09:49:29.000000000 +0200
++++ new/include/sysemu/sysemu.h 2014-05-05 09:54:17.000000000 +0200
@@ -73,16 +73,17 @@
void do_savevm(Monitor *mon, const QDict *qdict);
int qemu_loadvm_state(QEMUFile *f);
Index: new/monitor.c
===================================================================
---- new.orig/monitor.c 2013-12-06 07:46:38.000000000 +0100
-+++ new/monitor.c 2013-12-06 08:59:22.000000000 +0100
-@@ -2908,6 +2908,13 @@
+--- new.orig/monitor.c 2014-05-05 09:49:29.000000000 +0200
++++ new/monitor.c 2014-05-05 09:54:17.000000000 +0200
+@@ -2931,6 +2931,13 @@
.mhandler.cmd = hmp_info_migrate_cache_size,
},
{
.params = "",
Index: new/qapi-schema.json
===================================================================
---- new.orig/qapi-schema.json 2013-12-06 08:57:27.000000000 +0100
-+++ new/qapi-schema.json 2013-12-06 08:59:22.000000000 +0100
-@@ -740,6 +740,42 @@
+--- new.orig/qapi-schema.json 2014-05-05 09:49:29.000000000 +0200
++++ new/qapi-schema.json 2014-05-05 09:54:17.000000000 +0200
+@@ -820,6 +820,42 @@
'*downtime': 'int',
'*setup-time': 'int'} }
##
# @query-migrate
#
-@@ -3436,8 +3472,18 @@
+@@ -3687,8 +3723,18 @@
#
# Since: 1.2.0
##
#
Index: new/qemu-options.hx
===================================================================
---- new.orig/qemu-options.hx 2013-12-06 07:46:38.000000000 +0100
-+++ new/qemu-options.hx 2013-12-06 08:59:22.000000000 +0100
-@@ -2734,6 +2734,19 @@
+--- new.orig/qemu-options.hx 2014-05-05 09:49:29.000000000 +0200
++++ new/qemu-options.hx 2014-05-05 09:54:17.000000000 +0200
+@@ -2759,6 +2759,19 @@
Start right away with a saved state (@code{loadvm} in monitor)
ETEXI
"-daemonize daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
Index: new/qmp-commands.hx
===================================================================
---- new.orig/qmp-commands.hx 2013-12-06 07:46:38.000000000 +0100
-+++ new/qmp-commands.hx 2013-12-06 08:59:22.000000000 +0100
-@@ -3326,3 +3326,34 @@
- <- { "return": {} }
+--- new.orig/qmp-commands.hx 2014-05-05 09:49:29.000000000 +0200
++++ new/qmp-commands.hx 2014-05-05 09:54:17.000000000 +0200
+@@ -3593,3 +3593,34 @@
+ } } ] }
EQMP
+
Index: new/savevm-async.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ new/savevm-async.c 2013-12-06 08:59:22.000000000 +0100
++++ new/savevm-async.c 2014-05-05 09:55:53.000000000 +0200
@@ -0,0 +1,478 @@
+#include "qemu-common.h"
+#include "qapi/qmp/qerror.h"
+
+ /* Open the image */
+ snap_state.bs = bdrv_new("vmstate");
-+ ret = bdrv_open(snap_state.bs, statefile, NULL, bdrv_oflags, drv, &local_err);
++ ret = bdrv_open(&snap_state.bs, statefile, NULL, NULL, bdrv_oflags, drv, &local_err);
+
+ if (ret < 0) {
+ error_set(errp, ERROR_CLASS_GENERIC_ERROR, "failed to open '%s'", statefile);
+ int ret = -1;
+
+ bs = bdrv_new("vmstate");
-+ ret = bdrv_open(bs, filename, NULL, BDRV_O_CACHE_WB, drv, &local_err);
++ ret = bdrv_open(&bs, filename, NULL, NULL, BDRV_O_CACHE_WB, drv, &local_err);
+ bdrv_set_in_use(bs, 1);
+ bdrv_ref(bs);
+
+}
Index: new/savevm.c
===================================================================
---- new.orig/savevm.c 2013-12-06 07:46:38.000000000 +0100
-+++ new/savevm.c 2013-12-06 08:59:22.000000000 +0100
-@@ -1845,11 +1845,11 @@
+--- new.orig/savevm.c 2014-05-05 09:49:29.000000000 +0200
++++ new/savevm.c 2014-05-05 09:54:17.000000000 +0200
+@@ -460,11 +460,11 @@
return false;
}
- int ret;
+ int ret = 0;
+ trace_savevm_state_begin();
QTAILQ_FOREACH(se, &savevm_handlers, entry) {
- if (!se->ops || !se->ops->set_params) {
-@@ -1890,6 +1890,7 @@
+@@ -506,6 +506,7 @@
break;
}
}
}
/*
-@@ -1937,7 +1938,7 @@
+@@ -554,7 +555,7 @@
return ret;
}
{
SaveStateEntry *se;
int ret;
-@@ -1962,7 +1963,7 @@
- trace_savevm_section_end(se->section_id);
+@@ -581,7 +582,7 @@
+ trace_savevm_section_end(se->idstr, se->section_id);
if (ret < 0) {
qemu_file_set_error(f, ret);
- return;
}
}
-@@ -1991,6 +1992,7 @@
+@@ -610,6 +611,7 @@
qemu_put_byte(f, QEMU_VM_EOF);
qemu_fflush(f);
uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size)
Index: new/vl.c
===================================================================
---- new.orig/vl.c 2013-12-06 07:46:38.000000000 +0100
-+++ new/vl.c 2013-12-06 08:59:22.000000000 +0100
-@@ -1643,6 +1643,7 @@
- info->name = g_strdup(m->name);
- info->cpu_max = !m->max_cpus ? 1 : m->max_cpus;
-
-+
- if (strcmp(m->name, current_machine->name) == 0) {
- info->has_is_current = true;
- info->is_current = true;
-@@ -2842,6 +2843,7 @@
+--- new.orig/vl.c 2014-05-05 09:49:29.000000000 +0200
++++ new/vl.c 2014-05-05 09:54:17.000000000 +0200
+@@ -2953,6 +2953,7 @@
int optind;
const char *optarg;
const char *loadvm = NULL;
+ const char *loadstate = NULL;
+ MachineClass *machine_class;
QEMUMachine *machine;
const char *cpu_model;
- const char *vga_model = "none";
-@@ -3455,6 +3457,9 @@
+@@ -3574,6 +3575,9 @@
case QEMU_OPTION_loadvm:
loadvm = optarg;
break;
case QEMU_OPTION_full_screen:
full_screen = 1;
break;
-@@ -4406,6 +4411,10 @@
+@@ -4541,6 +4545,10 @@
if (load_vmstate(loadvm) < 0) {
autostart = 0;
}