vhost: fix guest/host physical address mapping
authorHaifeng Lin <haifeng.lin@huawei.com>
Thu, 1 Dec 2016 11:42:02 +0000 (19:42 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 17 Jan 2017 08:20:17 +0000 (09:20 +0100)
commit8c33fc10f65d250cf84d9dcf2766dabd605a37b2
tree0245007c5b0b42cd646b136a8851bb2392d15a74
parent1feda4d8fc422ceb1700d32175501f4f691eb844
vhost: fix guest/host physical address mapping

When reg_size < page_size the function read in
rte_mem_virt2phy would not return, because
host_user_addr is invalid.

Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")
Cc: stable@dpdk.org
Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/vhost_user.c