[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V2 11/13] migration: cpr-uri option
From: |
Steve Sistare |
Subject: |
[PATCH V2 11/13] migration: cpr-uri option |
Date: |
Mon, 30 Sep 2024 12:40:42 -0700 |
Define the cpr-uri QEMU command-line option to specify the URI from
which CPR vmstate is loaded for cpr-transfer mode.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
include/migration/cpr.h | 1 +
migration/cpr.c | 7 +++++++
qemu-options.hx | 8 ++++++++
system/vl.c | 3 +++
4 files changed, 19 insertions(+)
diff --git a/include/migration/cpr.h b/include/migration/cpr.h
index 51c19ed..e886c98 100644
--- a/include/migration/cpr.h
+++ b/include/migration/cpr.h
@@ -25,6 +25,7 @@ int cpr_find_fd(const char *name, int id);
int cpr_walk_fd(cpr_walk_fd_cb cb);
void cpr_resave_fd(const char *name, int id, int fd);
+void cpr_set_cpr_uri(const char *uri);
int cpr_state_save(Error **errp);
int cpr_state_load(Error **errp);
void cpr_state_close(void);
diff --git a/migration/cpr.c b/migration/cpr.c
index 7514c4e..86f66c1 100644
--- a/migration/cpr.c
+++ b/migration/cpr.c
@@ -163,6 +163,13 @@ QIOChannel *cpr_state_ioc(void)
return qemu_file_get_ioc(cpr_state_file);
}
+static char *cpr_uri;
+
+void cpr_set_cpr_uri(const char *uri)
+{
+ cpr_uri = g_strdup(uri);
+}
+
int cpr_state_save(Error **errp)
{
int ret;
diff --git a/qemu-options.hx b/qemu-options.hx
index 90ab943..2c88229 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -4963,6 +4963,14 @@ SRST
ERST
+DEF("cpr-uri", HAS_ARG, QEMU_OPTION_cpr_uri, \
+ "-cpr-uri unix:socketpath\n",
+ QEMU_ARCH_ALL)
+SRST
+``-cpr-uri unix:socketpath``
+ URI for incoming CPR state, for the cpr-transfer migration mode.
+ERST
+
DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
"-incoming tcp:[host]:port[,to=maxport][,ipv4=on|off][,ipv6=on|off]\n" \
"-incoming rdma:host:port[,ipv4=on|off][,ipv6=on|off]\n" \
diff --git a/system/vl.c b/system/vl.c
index 565d932..1ac6b0b 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -3490,6 +3490,9 @@ void qemu_init(int argc, char **argv)
exit(1);
}
break;
+ case QEMU_OPTION_cpr_uri:
+ cpr_set_cpr_uri(optarg);
+ break;
case QEMU_OPTION_incoming:
if (!incoming) {
runstate_set(RUN_STATE_INMIGRATE);
--
1.8.3.1
- [PATCH V2 01/13] machine: alloc-anon option, (continued)
- [PATCH V2 01/13] machine: alloc-anon option, Steve Sistare, 2024/09/30
- [PATCH V2 03/13] migration: save cpr mode, Steve Sistare, 2024/09/30
- [PATCH V2 02/13] migration: cpr-state, Steve Sistare, 2024/09/30
- [PATCH V2 05/13] physmem: preserve ram blocks for cpr, Steve Sistare, 2024/09/30
- [PATCH V2 04/13] migration: stop vm earlier for cpr, Steve Sistare, 2024/09/30
- [PATCH V2 06/13] hostmem-memfd: preserve for cpr, Steve Sistare, 2024/09/30
- [PATCH V2 07/13] migration: SCM_RIGHTS for QEMUFile, Steve Sistare, 2024/09/30
- [PATCH V2 09/13] migration: cpr-transfer save and load, Steve Sistare, 2024/09/30
- [PATCH V2 08/13] migration: VMSTATE_FD, Steve Sistare, 2024/09/30
- [PATCH V2 10/13] migration: cpr-uri parameter, Steve Sistare, 2024/09/30
- [PATCH V2 11/13] migration: cpr-uri option,
Steve Sistare <=
- [PATCH V2 12/13] migration: split qmp_migrate, Steve Sistare, 2024/09/30
- [PATCH V2 13/13] migration: cpr-transfer mode, Steve Sistare, 2024/09/30