vhost: Fix spdk_iommu_mem_unregister

The function body uses VFIO_IOMMU_MAP_DMA which appears to be a
copy&paste mistake, make it VFIO_IOMMU_UNMAP_DMA because we are doing
the opposite of spdk_iommu_mem_register.

Change-Id: If9f3b188178e71ff71221c77c1680b679fec1df0
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-on: https://review.gerrithub.io/368551
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Fam Zheng 2017-07-07 18:39:03 +08:00 committed by Jim Harris
parent 0abf67ce31
commit ee263a80fc

View File

@ -306,7 +306,7 @@ int spdk_iommu_mem_unregister(uint64_t addr, uint64_t len)
int ret;
pthread_mutex_lock(&vfio_cfg.map_lock);
ret = spdk_vfio_mem_op(addr, len, VFIO_IOMMU_MAP_DMA);
ret = spdk_vfio_mem_op(addr, len, VFIO_IOMMU_UNMAP_DMA);
pthread_mutex_unlock(&vfio_cfg.map_lock);
return ret;
}