vhost: translate incoming log address to GPA
authorAdrian Moreno <amorenoz@redhat.com>
Wed, 9 Oct 2019 11:54:30 +0000 (13:54 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
commitfbda9f1459271435df3ea2575ca5845d04733466
tree1815d4b54be29627921fe7708a4ecf113653bbbc
parenta44c4e1e3a9277a51c7c5aca5c872f04c3524050
vhost: translate incoming log address to GPA

When IOMMU is enabled the incoming log address is in IOVA space. In that
case, look in IOTLB table and translate the resulting HVA to GPA.

If IOMMU is not enabled, the incoming log address is already a GPA so no
transformation is needed.

Fixes: 69c90e98f483 ("vhost: enable IOMMU support")
Cc: stable@dpdk.org
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost.c
lib/librte_vhost/vhost.h
lib/librte_vhost/vhost_user.c