Disable mlock around incoming postcopy
commit58b7c17e226aa4d3b943ea22c1d1309126de146b
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 5 Nov 2015 18:11:22 +0000 (5 18:11 +0000)
committerJuan Quintela <quintela@redhat.com>
Tue, 10 Nov 2015 14:00:28 +0000 (10 15:00 +0100)
tree92d3ed7a85849b125370020ee2af9ace3ff7573d
parente9bef235d91bff87517770c93d74eb98e5a33278
Disable mlock around incoming postcopy

Userfault doesn't work with mlock; mlock is designed to nail down pages
so they don't move, userfault is designed to tell you when they're not
there.

munlock the pages we userfault protect before postcopy.
mlock everything again at the end if mlock is enabled.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
include/sysemu/sysemu.h
migration/postcopy-ram.c