aboutsummaryrefslogtreecommitdiff
path: root/migration/rdma.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-10-11 22:35:15 +0200
committerJuan Quintela <quintela@redhat.com>2023-10-17 09:25:13 +0200
commit27fd25b0fbcbcf2546fb2cb13fd9c8fe840eef02 (patch)
treee19f5c451642264a20b2e35d7cf7fb0019d09fb7 /migration/rdma.c
parentd4f34485ca8a077c98fc2303451e9bece9200dd7 (diff)
downloadqemu-27fd25b0fbcbcf2546fb2cb13fd9c8fe840eef02.zip
qemu-27fd25b0fbcbcf2546fb2cb13fd9c8fe840eef02.tar.gz
qemu-27fd25b0fbcbcf2546fb2cb13fd9c8fe840eef02.tar.bz2
migration: Create migrate_rdma()
Helper to say if we are doing a migration over rdma. Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231011203527.9061-2-quintela@redhat.com>
Diffstat (limited to 'migration/rdma.c')
-rw-r--r--migration/rdma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/migration/rdma.c b/migration/rdma.c
index f6fc226..f155f3e 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -4113,6 +4113,7 @@ static void rdma_accept_incoming_migration(void *opaque)
void rdma_start_incoming_migration(const char *host_port, Error **errp)
{
+ MigrationState *s = migrate_get_current();
int ret;
RDMAContext *rdma;
@@ -4144,7 +4145,7 @@ void rdma_start_incoming_migration(const char *host_port, Error **errp)
}
trace_rdma_start_incoming_migration_after_rdma_listen();
-
+ s->rdma_migration = true;
qemu_set_fd_handler(rdma->channel->fd, rdma_accept_incoming_migration,
NULL, (void *)(intptr_t)rdma);
return;
@@ -4220,6 +4221,7 @@ void rdma_start_outgoing_migration(void *opaque,
trace_rdma_start_outgoing_migration_after_rdma_connect();
s->to_dst_file = rdma_new_output(rdma);
+ s->rdma_migration = true;
migrate_fd_connect(s, NULL);
return;
return_path_err: