set migration max downtime

provide a monitor command to allow one to set the maximum
downtime he is willing to suffer during migration, in seconds.
"ms", "us", "ns" and "s" are accepted as modifiers.

This parameter will be used by ram_save_live() code to determine
a safe moment to enter stage 3

Signed-off-by: Glauber Costa <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index f1155b8..fa48527 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -484,6 +484,14 @@
 Set maximum speed to @var{value} (in bytes) for migrations.
 ETEXI
 
+    { "migrate_set_downtime", "s", do_migrate_set_downtime,
+      "value", "set maximum tolerated downtime (in seconds) for migrations" },
+
+STEXI
+@item migrate_set_downtime @var{second}
+Set maximum tolerated downtime (in seconds) for migration.
+ETEXI
+
 #if defined(TARGET_I386)
     { "drive_add", "ss", drive_hot_add, "pci_addr=[[<domain>:]<bus>:]<slot>\n"
                                          "[file=file][,if=type][,bus=n]\n"