Spdk/lib/idxd
Ben Walker 2371a070c8 idxd: For kernel mode, handle IOMMU+SM mode
If the kernel is booted with the IOMMU enabled and Shared Memory mode
enabled (which are the expected boot parameters for production servers),
then the kernel idxd driver will automatically register a dedicated work
queue with the PASID for the process that opens it. This means that the
descriptors written into the portal for that work queue should be
*virtual* addresses.

If the IOMMU is enabled but Shared Memory mode is disabled, then the
kernel has registered the device with the IOMMU and assigned it I/O
virtual addresses. We have no way to get those addresses from user
space, so we cannot use the kernel driver in this mode. Add a check to
catch that.

If the IOMMU is disabled, then physical addresses are used everywherre.

Change-Id: I0bf079835ad4df1128ef9db54f5564050327e9f7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14019
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-09-26 11:48:39 +00:00
..
idxd_internal.h idxd: For kernel mode, handle IOMMU+SM mode 2022-09-26 11:48:39 +00:00
idxd_kernel.c idxd: For kernel mode, handle IOMMU+SM mode 2022-09-26 11:48:39 +00:00
idxd_user.c lib/idxd: Save device version during kernel and user initialization 2022-08-18 18:47:02 +00:00
idxd.c idxd: For kernel mode, handle IOMMU+SM mode 2022-09-26 11:48:39 +00:00
Makefile accel/idxd/iaa: Convert to use iovecs 2022-09-23 00:10:08 +00:00
spdk_idxd.map lib/idxd: add raw request for low level testing 2022-05-23 19:09:50 +00:00