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

migration: Pre-fault memory before starting background snasphot


This commit solves the issue with userfault_fd WP feature that
background snapshot is based on. For any never poluated or discarded
memory page, the UFFDIO_WRITEPROTECT ioctl() would skip updating
PTE for that page, thereby loosing WP setting for it.

So we need to pre-fault pages for each RAM block to be protected
before making a userfault_fd wr-protect ioctl().

Fixes: 278e2f55 (migration: support
  UFFD write fault processing in ram_save_iterate())
Signed-off-by: default avatarAndrey Gruzdev <andrey.gruzdev@virtuozzo.com>
Reported-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Message-Id: <20210401092226.102804-4-andrey.gruzdev@virtuozzo.com>
Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
dgilbert:
  Bodged ifdef __linux__ on ram_write_tracking_prepare, should really
      go in a stub
parent 1a8e44a8
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