mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
4ed023ce2a
commit
c4faeed231
3 changed files with 158 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue