vhost: restrict postcopy live-migration enablement
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 12 Oct 2018 12:40:45 +0000 (14:40 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 18 Oct 2018 08:24:39 +0000 (10:24 +0200)
commitcd85039e7ee6c52cf9bc0628d7543dd75db02f5a
tree09d8aa0713753e6f8f99fbc5f6ee53223593ba12
parent9a0a3a25fa3b3f1175f46a86de01f0048a984d12
vhost: restrict postcopy live-migration enablement

Postcopy live-migration feature requires the application to
not populate the guest memory. As the vhost library cannot
prevent the application to that (e.g. preventing the
application to call mlockall()), the feature is disabled by
default.

The application should only enable the feature if it does not
force the guest memory to be populated.

In case the user passes the RTE_VHOST_USER_POSTCOPY_SUPPORT
flag at registration but the feature was not compiled,
registration fails.

For the same reason, postcopy and dequeue zero copy features
are not compatible, so don't advertize postcopy support if
dequeue zero copy is requested.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
doc/guides/prog_guide/vhost_lib.rst
lib/librte_vhost/rte_vhost.h
lib/librte_vhost/socket.c
lib/librte_vhost/vhost_user.c