From c4faeed2313e2bf9aa3694544bd211c15e28c164 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Thu, 5 Nov 2015 18:11:17 +0000 Subject: Postcopy; Handle userfault requests userfaultfd is a Linux syscall that gives an fd that receives a stream of notifications of accesses to pages registered with it and allows the program to acknowledge those stalls and tell the accessing thread to carry on. We convert the requests from the kernel into messages back to the source asking for the pages. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Amit Shah Signed-off-by: Juan Quintela --- include/migration/migration.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/migration') diff --git a/include/migration/migration.h b/include/migration/migration.h index a48471e026..329d5358d5 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -89,11 +89,14 @@ struct MigrationIncomingState { */ QemuEvent main_thread_load_event; + bool have_fault_thread; QemuThread fault_thread; QemuSemaphore fault_thread_sem; /* For the kernel to send us notifications */ int userfault_fd; + /* To tell the fault_thread to quit */ + int userfault_quit_fd; QEMUFile *to_src_file; QemuMutex rp_mutex; /* We send replies from multiple threads */ void *postcopy_tmp_page; -- cgit v1.2.3