aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.c
diff options
context:
space:
mode:
authorLongpeng(Mike) <longpeng2@huawei.com>2020-08-06 15:40:30 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-08-28 13:34:52 +0100
commit9ba3b2baa1f06e772c84f0ab77146428a2b19db1 (patch)
tree22a7f0cf7b0e037a35bb2d873b2059bbef6a9f71 /migration/migration.c
parentd658f65c16901afd58a7ce88dcebfdefb3594924 (diff)
downloadqemu-9ba3b2baa1f06e772c84f0ab77146428a2b19db1.zip
qemu-9ba3b2baa1f06e772c84f0ab77146428a2b19db1.tar.gz
qemu-9ba3b2baa1f06e772c84f0ab77146428a2b19db1.tar.bz2
migration: add vsock as data channel support
The vsock channel is more widely use in some new features, for example, the Nitro/Enclave. It can also be used as the migration channel. Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Message-Id: <20200806074030.174-3-longpeng2@huawei.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/migration/migration.c b/migration/migration.c
index ac37a38..58a5452 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -384,7 +384,8 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
if (!strcmp(uri, "defer")) {
deferred_incoming_migration(errp);
} else if (strstart(uri, "tcp:", &p) ||
- strstart(uri, "unix:", NULL)) {
+ strstart(uri, "unix:", NULL) ||
+ strstart(uri, "vsock:", NULL)) {
socket_start_incoming_migration(p ? p : uri, errp);
#ifdef CONFIG_RDMA
} else if (strstart(uri, "rdma:", &p)) {
@@ -2102,7 +2103,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
}
if (strstart(uri, "tcp:", &p) ||
- strstart(uri, "unix:", NULL)) {
+ strstart(uri, "unix:", NULL) ||
+ strstart(uri, "vsock:", NULL)) {
socket_start_outgoing_migration(s, p ? p : uri, &local_err);
#ifdef CONFIG_RDMA
} else if (strstart(uri, "rdma:", &p)) {