OSDN Git Service

migration: split ufd_version_check onto receive/request features part
authorAlexey Perevalov <a.perevalov@samsung.com>
Tue, 19 Sep 2017 16:47:58 +0000 (19:47 +0300)
committerJuan Quintela <quintela@redhat.com>
Fri, 22 Sep 2017 12:11:29 +0000 (14:11 +0200)
commit54ae0886b12c4934e84381af777d4df6147cc2ec
tree1c431138896e897f7e43c2e7f02f50ad643353fd
parent5553499f043d4b7fc020600ffda75d1162ff970b
migration: split ufd_version_check onto receive/request features part

This modification is necessary for userfault fd features which are
required to be requested from userspace.
UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will
be introduced in the next patch.

QEMU have to use separate userfault file descriptor, due to
userfault context has internal state, and after first call of
ioctl UFFD_API it changes its state to UFFD_STATE_RUNNING (in case of
success), but kernel while handling ioctl UFFD_API expects UFFD_STATE_WAIT_API.
So only one ioctl with UFFD_API is possible per ufd.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/postcopy-ram.c