aboutsummaryrefslogtreecommitdiff
path: root/include/migration
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-11-05 18:11:17 +0000
committerJuan Quintela <quintela@redhat.com>2015-11-10 15:00:28 +0100
commitc4faeed2313e2bf9aa3694544bd211c15e28c164 (patch)
treee2b0b9e1160f2ede7daa8015792d359a1ab44729 /include/migration
parent4ed023ce2a39ab5812d33cf4d819def168965a7f (diff)
downloadqemu-c4faeed2313e2bf9aa3694544bd211c15e28c164.zip
qemu-c4faeed2313e2bf9aa3694544bd211c15e28c164.tar.gz
qemu-c4faeed2313e2bf9aa3694544bd211c15e28c164.tar.bz2
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 <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include/migration')
-rw-r--r--include/migration/migration.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/migration/migration.h b/include/migration/migration.h
index a48471e..329d535 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;