Commit 75209b1d authored by paul luse's avatar paul luse Committed by Tomasz Zawadzki
Browse files

lib/idxd: fail init if IOMMU is not enabled



Currently the idxd driver requires VFIO so avoid unexpected errors
if someone tries without it (with UIO).

Temp workaround for issue #2316

Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Change-Id: I430cd2193bc8dbd6939af7d0ca799832e7a73213
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11816


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent adc36d5b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -296,6 +296,14 @@ spdk_idxd_probe(void *cb_ctx, spdk_idxd_attach_cb attach_cb)
		return -1;
	}

	/* The idxd library doesn't support UIO at the moment, so fail init
	 * if the IOMMU is disabled. TODO: remove once driver supports UIO.
	 */
	if (spdk_iommu_is_enabled() == false) {
		SPDK_ERRLOG("The IDXD driver currently requires the IOMMU which is disabled. Please re-enable to use IDXD\n");
		return -EINVAL;
	}

	return g_idxd_impl->probe(cb_ctx, attach_cb);
}