Skip to content
Snippets Groups Projects
Commit 278e2f55 authored by Andrey Gruzdev's avatar Andrey Gruzdev Committed by Dr. David Alan Gilbert
Browse files

migration: support UFFD write fault processing in ram_save_iterate()


In this particular implementation the same single migration
thread is responsible for both normal linear dirty page
migration and procesing UFFD page fault events.

Processing write faults includes reading UFFD file descriptor,
finding respective RAM block and saving faulting page to
the migration stream. After page has been saved, write protection
can be removed. Since asynchronous version of qemu_put_buffer()
is expected to be used to save pages, we also have to flush
migraion stream prior to un-protecting saved memory range.

Write protection is being removed for any previously protected
memory chunk that has hit the migration stream. That's valid
for pages from linear page scan along with write fault pages.

Signed-off-by: default avatarAndrey Gruzdev <andrey.gruzdev@virtuozzo.com>
Acked-by: default avatarPeter Xu <peterx@redhat.com>
Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20210129101407.103458-4-andrey.gruzdev@virtuozzo.com>
Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
  fixup pagefault.address cast for 32bit
parent 0e9b5cd6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment