Commit 88179a65 authored by Seth Howell's avatar Seth Howell Committed by Darek Stojaczyk
Browse files

env/memory: use spdk_iommu_is_enabled internally



This will help keep the definition of that function fresh as things
change around it over time.

Change-Id: Id30864df132459a0ff889a725aa70abe072f3087
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446972


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent d9f92cd3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1045,7 +1045,7 @@ spdk_vtophys_notify(void *cb_ctx, struct spdk_mem_map *map,
			if (paddr == SPDK_VTOPHYS_ERROR) {
				/* This is not an address that DPDK is managing. */
#if SPDK_VFIO_ENABLED
				if (g_vfio.enabled && !g_vfio.noiommu_enabled) {
				if (spdk_iommu_is_enabled()) {
					/* We'll use the virtual address as the iova. DPDK
					 * currently uses physical addresses as the iovas (or counts
					 * up from 0 if it can't get physical addresses), so
@@ -1088,7 +1088,7 @@ spdk_vtophys_notify(void *cb_ctx, struct spdk_mem_map *map,
				 * This is not an address that DPDK is managing. If vfio is enabled,
				 * we need to unmap the range from the IOMMU
				 */
				if (g_vfio.enabled && !g_vfio.noiommu_enabled) {
				if (spdk_iommu_is_enabled()) {
					uint64_t buffer_len = VALUE_2MB;
					paddr = spdk_mem_map_translate(map, (uint64_t)vaddr, &buffer_len);
					if (buffer_len != VALUE_2MB) {