qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH RDMA support v1: 2/5] install new monitor comman


From: mrhines
Subject: [Qemu-devel] [RFC PATCH RDMA support v1: 2/5] install new monitor commands to configure RDMA
Date: Mon, 28 Jan 2013 17:01:42 -0500

From: "Michael R. Hines" <address@hidden>


Signed-off-by: Michael R. Hines <address@hidden>
---
 hmp-commands.hx  |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 hmp.c            |   23 ++++++++++++++++++++++
 hmp.h            |    4 ++++
 qapi-schema.json |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 qemu-options.hx  |   10 ++++++++++
 5 files changed, 149 insertions(+)

diff --git a/hmp-commands.hx b/hmp-commands.hx
index 0934b9b..4cf8ece 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -895,6 +895,34 @@ Set cache size to @var{value} (in bytes) for xbzrle 
migrations.
 ETEXI
 
     {
+        .name       = "migrate_rdma_prepare",
+        .args_type  = "",
+        .params     = "",
+        .help       = "prepare for RDMA VM migration",
+        .mhandler.cmd = hmp_migrate_rdma_prepare,
+    },
+
+STEXI
address@hidden migrate_rdma_prepare
address@hidden migrate_rdma_prepare
+Prepare the VM for RDMA VM migration.
+ETEXI
+
+    {
+        .name       = "migrate_rdma_release",
+        .args_type  = "",
+        .params     = "",
+        .help       = "release RDMA resources for VM migration",
+        .mhandler.cmd = hmp_migrate_rdma_release,
+    },
+
+STEXI
address@hidden migrate_rdma_release
address@hidden migrate_rdma_release
+Release the RDMA resources used during VM RDMA migration.
+ETEXI
+
+    {
         .name       = "migrate_set_speed",
         .args_type  = "value:o",
         .params     = "value",
@@ -910,6 +938,34 @@ Set maximum speed to @var{value} (in bytes) for migrations.
 ETEXI
 
     {
+        .name       = "migrate_set_rdma_port",
+        .args_type  = "port:i",
+        .params     = "port",
+        .help       = "set RDMA port for migration",
+        .mhandler.cmd = hmp_migrate_set_rdma_port,
+    },
+
+STEXI
address@hidden migrate_set_rdma_port @var{value}
address@hidden migrate_set_rdma_port
+Set RDMA migration port to @var{value}.
+ETEXI
+
+    {
+        .name       = "migrate_set_rdma_host",
+        .args_type  = "host:s",
+        .params     = "host",
+        .help       = "set RDMA host name for migration",
+        .mhandler.cmd = hmp_migrate_set_rdma_host,
+    },
+
+STEXI
address@hidden migrate_set_rdma_host @var{value}
address@hidden migrate_set_rdma_host
+Set RDMA migration host name to @var{value}.
+ETEXI
+
+    {
         .name       = "migrate_set_downtime",
         .args_type  = "value:T",
         .params     = "value",
diff --git a/hmp.c b/hmp.c
index c7b6ba0..4a2dd3b 100644
--- a/hmp.c
+++ b/hmp.c
@@ -848,6 +848,29 @@ void hmp_migrate_set_cache_size(Monitor *mon, const QDict 
*qdict)
     }
 }
 
+void hmp_migrate_set_rdma_port(Monitor *mon, const QDict *qdict)
+{
+    int port = qdict_get_int(qdict, "port");
+    qmp_migrate_set_rdma_port(port, NULL);
+}
+
+void hmp_migrate_set_rdma_host(Monitor *mon, const QDict *qdict)
+{
+    const char *host = qdict_get_str(qdict, "host");
+    qmp_migrate_set_rdma_host(host, NULL);
+}
+
+void hmp_migrate_rdma_prepare(Monitor *mon, const QDict *qdict)
+{
+    qmp_migrate_rdma_prepare(NULL);
+}
+
+void hmp_migrate_rdma_release(Monitor *mon, const QDict *qdict)
+{
+    qmp_migrate_rdma_release(NULL);
+}
+
+
 void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict)
 {
     int64_t value = qdict_get_int(qdict, "value");
diff --git a/hmp.h b/hmp.h
index 44be683..185f343 100644
--- a/hmp.h
+++ b/hmp.h
@@ -55,6 +55,10 @@ void hmp_drive_mirror(Monitor *mon, const QDict *qdict);
 void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
 void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
 void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
+void hmp_migrate_set_rdma_port(Monitor *mon, const QDict *qdict);
+void hmp_migrate_set_rdma_host(Monitor *mon, const QDict *qdict);
+void hmp_migrate_rdma_prepare(Monitor *mon, const QDict *qdict);
+void hmp_migrate_rdma_release(Monitor *mon, const QDict *qdict);
 void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict);
 void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict);
 void hmp_set_password(Monitor *mon, const QDict *qdict);
diff --git a/qapi-schema.json b/qapi-schema.json
index 6d7252b..181489b 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1695,6 +1695,62 @@
 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
 
 ##
+# @migrate_set_rdma_port
+#
+# Set rdma communication port.
+#
+# @port: rdma communication port.
+#
+# Returns: nothing on success
+#
+# Notes: Nothing.
+#
+# Since: 1.3.0
+##
+{ 'command': 'migrate_set_rdma_port', 'data': {'port': 'int'} }
+
+##
+# @migrate_set_rdma_host
+#
+# Set rdma communication host address.
+#
+# @host: rdma communication host address.
+#
+# Returns: nothing on success
+#
+# Notes: Nothing.
+#
+# Since: 1.3.0
+##
+{ 'command': 'migrate_set_rdma_host', 'data': {'host': 'str'} }
+
+##
+# @migrate_rdma_prepare
+#
+# Tell the backup QEMU to pre-register all of the RDMA memory
+#
+# Returns: nothing on success
+#
+# Notes: Nothing.
+#
+# Since: 1.3.0
+##
+{ 'command': 'migrate_rdma_prepare' }
+
+##
+# @migrate_rdma_release
+#
+# Tell the QEMU to release rdma resources
+#
+# Returns: nothing on success
+#
+# Notes: Nothing.
+#
+# Since: 1.3.0
+##
+{ 'command': 'migrate_rdma_release' }
+
+##
 # @migrate-set-cache-size
 #
 # Set XBZRLE cache size
diff --git a/qemu-options.hx b/qemu-options.hx
index 4e2b499..dbd033b 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2796,6 +2796,16 @@ CD-ROM drive and others. The @code{-nodefaults} option 
will disable all those
 default devices.
 ETEXI
 
+DEF("rdmaport", HAS_ARG, QEMU_OPTION_rdmaport, \
+    "-rdmaport p     port for RDMA migration\n", QEMU_ARCH_ALL)
+STEXI
+ETEXI
+
+DEF("rdmahost", HAS_ARG, QEMU_OPTION_rdmahost, \
+    "-rdmahost p     host name for RDMA migration\n", QEMU_ARCH_ALL)
+STEXI
+ETEXI
+
 #ifndef _WIN32
 DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
     "-chroot dir     chroot to dir just before starting the VM\n",
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]