vhost: handle dirty pages logging request
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 29 Jan 2016 04:57:56 +0000 (12:57 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 19 Feb 2016 14:42:54 +0000 (15:42 +0100)
commit54f9e32305d4a8d30c2a4ae059d310189b312498
tree480e9db6f4df693fa2c672014958789b9f356ed5
parentf1fe8388d5cccfb159096230d6269cd8001167a0
vhost: handle dirty pages logging request

VHOST_USER_SET_LOG_BASE request is used to tell the backend (dpdk
vhost-user) where we should log dirty pages, and how big the log
buffer is.

This request introduces a new payload:

    typedef struct VhostUserLog {
            uint64_t mmap_size;
            uint64_t mmap_offset;
    } VhostUserLog;

Also, a fd is delivered from QEMU by ancillary data.

With those info given, an area of memory is mmaped, assigned
to dev->log_base, for logging dirty pages.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Victor Kaplansky <victork@redhat.com>
Tested-by: Pavel Fedin <p.fedin@samsung.com>
lib/librte_vhost/rte_virtio_net.h
lib/librte_vhost/vhost_user/vhost-net-user.c
lib/librte_vhost/vhost_user/vhost-net-user.h
lib/librte_vhost/vhost_user/virtio-net-user.c
lib/librte_vhost/vhost_user/virtio-net-user.h