scripts/setup: [VFIO] Load vfio_iommu_type1

This is done in order to make sure IOMMU extensions, which DPDK is
looking for, are enabled.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ia9ff8e5329d14a5eb60721f08ff7063cfb1d6eb7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5259
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Mike Gerdts
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2020-11-25 13:30:35 +01:00 committed by Tomasz Zawadzki
parent b4916f9f69
commit cac9322dc9

View File

@ -307,6 +307,13 @@ function configure_linux_pci() {
/sys/module/vfio/parameters/enable_unsafe_noiommu_mode && \
"$(cat /sys/module/vfio/parameters/enable_unsafe_noiommu_mode)" == "Y") ]]; then
driver_name=vfio-pci
# Just in case, attempt to load VFIO_IOMMU_TYPE1 module into the kernel - this
# should be done automatically by modprobe since this particular module should
# be a part of vfio-pci dependencies, however, on some distros, it seems that
# it's not the case. See #1689.
if modinfo vfio_iommu_type1 > /dev/null; then
modprobe vfio_iommu_type1
fi
elif modinfo uio_pci_generic > /dev/null 2>&1; then
driver_name=uio_pci_generic
elif [[ -e $igb_uio_fallback ]]; then