From 00fa4fc85b00f1a8a810068d158a7a66e88658eb Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Mon, 12 Mar 2018 17:21:04 +0000 Subject: postcopy: Allow registering of fd handler Allow other userfaultfd's to be registered into the fault thread so that handlers for shared memory can get responses. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- migration/migration.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'migration/migration.h') diff --git a/migration/migration.h b/migration/migration.h index 08c5d2ded1..d02a759331 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -51,6 +51,8 @@ struct MigrationIncomingState { QemuMutex rp_mutex; /* We send replies from multiple threads */ void *postcopy_tmp_page; void *postcopy_tmp_zero_page; + /* PostCopyFD's for external userfaultfds & handlers of shared memory */ + GArray *postcopy_remote_fds; QEMUBH *bh; -- cgit v1.2.3 From 096bf4c8522fc0331fef78e46108244ab09480a0 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Mon, 12 Mar 2018 17:21:12 +0000 Subject: vhost+postcopy: Helper to send requests to source for shared pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provide a helper to be used by shared waker functions to request shared pages from the source. The last_rb pointer is moved into the incoming state since this helper can update it as well as the main fault thread function. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- migration/migration.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'migration/migration.h') diff --git a/migration/migration.h b/migration/migration.h index d02a759331..83dc36b57a 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -49,6 +49,8 @@ struct MigrationIncomingState { int userfault_event_fd; QEMUFile *to_src_file; QemuMutex rp_mutex; /* We send replies from multiple threads */ + /* RAMBlock of last request sent to source */ + RAMBlock *last_rb; void *postcopy_tmp_page; void *postcopy_tmp_zero_page; /* PostCopyFD's for external userfaultfds & handlers of shared memory */ -- cgit v1.2.3