From cac9322dc9a18c6b9e99ced0bb3151133d4c604b Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 25 Nov 2020 13:30:35 +0100 Subject: [PATCH] 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 Change-Id: Ia9ff8e5329d14a5eb60721f08ff7063cfb1d6eb7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5259 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Mike Gerdts Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- scripts/setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/setup.sh b/scripts/setup.sh index 81b08d497..f790146a0 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -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