xref: /dpdk/doc/guides/linux_gsg/linux_drivers.rst (revision c265d58619e7fc0f72441faafec56a2a8633a15b)
15be776dfSFerruh Yigit..  SPDX-License-Identifier: BSD-3-Clause
20db52e66SShahaf Shuler    Copyright(c) 2010-2015 Intel Corporation.
35feecc57SShahaf Shuler    Copyright 2017 Mellanox Technologies, Ltd
40db52e66SShahaf Shuler    All rights reserved.
50db52e66SShahaf Shuler
6*c265d586SBruce Richardson.. include:: <isonum.txt>
7*c265d586SBruce Richardson
80db52e66SShahaf Shuler.. _linux_gsg_linux_drivers:
90db52e66SShahaf Shuler
100db52e66SShahaf ShulerLinux Drivers
110db52e66SShahaf Shuler=============
120db52e66SShahaf Shuler
130db52e66SShahaf ShulerDifferent PMDs may require different kernel drivers in order to work properly.
149180da67SAnatoly BurakovDepending on the PMD being used, a corresponding kernel driver should be loaded,
159180da67SAnatoly Burakovand network ports should be bound to that driver.
160db52e66SShahaf Shuler
170db52e66SShahaf ShulerVFIO
180db52e66SShahaf Shuler----
190db52e66SShahaf Shuler
2057ff39f4SAnatoly BurakovVFIO is a robust and secure driver that relies on IOMMU protection.
210db52e66SShahaf ShulerTo make use of VFIO, the ``vfio-pci`` module must be loaded:
220db52e66SShahaf Shuler
230db52e66SShahaf Shuler.. code-block:: console
240db52e66SShahaf Shuler
250db52e66SShahaf Shuler    sudo modprobe vfio-pci
260db52e66SShahaf Shuler
279180da67SAnatoly BurakovVFIO kernel is usually present by default in all distributions,
280db52e66SShahaf Shulerhowever please consult your distributions documentation to make sure that is the case.
290db52e66SShahaf Shuler
30016763c2SNithin DabilpuramFor DMA mapping of either external memory or hugepages, VFIO interface is used.
31016763c2SNithin DabilpuramVFIO does not support partial unmap of once mapped memory. Hence DPDK's memory is
32016763c2SNithin Dabilpurammapped in hugepage granularity or system page granularity. Number of DMA
33016763c2SNithin Dabilpurammappings is limited by kernel with user locked memory limit of a process (rlimit)
34016763c2SNithin Dabilpuramfor system/hugepage memory. Another per-container overall limit applicable both
35016763c2SNithin Dabilpuramfor external memory and system memory was added in kernel 5.1 defined by
36016763c2SNithin DabilpuramVFIO module parameter ``dma_entry_limit`` with a default value of 64K.
37016763c2SNithin DabilpuramWhen application is out of DMA entries, these limits need to be adjusted to
38016763c2SNithin Dabilpuramincrease the allowed limit.
39016763c2SNithin Dabilpuram
409180da67SAnatoly BurakovSince Linux version 5.7,
419180da67SAnatoly Burakovthe ``vfio-pci`` module supports the creation of virtual functions.
429180da67SAnatoly BurakovAfter the PF is bound to ``vfio-pci`` module,
439180da67SAnatoly Burakovthe user can create the VFs using the ``sysfs`` interface,
449180da67SAnatoly Burakovand these VFs will be bound to ``vfio-pci`` module automatically.
45598be723SHaiyue Wang
469180da67SAnatoly BurakovWhen the PF is bound to ``vfio-pci``,
479180da67SAnatoly Burakovby default it will have a randomly generated VF token.
489180da67SAnatoly BurakovFor security reasons, this token is write only,
499180da67SAnatoly Burakovso the user cannot read it from the kernel directly.
509180da67SAnatoly BurakovTo access the VFs, the user needs to create a new token,
519180da67SAnatoly Burakovand use it to initialize both VF and PF devices.
529180da67SAnatoly BurakovThe tokens are in UUID format,
539180da67SAnatoly Burakovso any UUID generation tool can be used to create a new token.
54598be723SHaiyue Wang
559180da67SAnatoly BurakovThis VF token can be passed to DPDK by using EAL parameter ``--vfio-vf-token``.
569180da67SAnatoly BurakovThe token will be used for all PF and VF ports within the application.
579180da67SAnatoly Burakov
589180da67SAnatoly Burakov#. Generate the VF token by uuid command
59598be723SHaiyue Wang
60598be723SHaiyue Wang   .. code-block:: console
61598be723SHaiyue Wang
62598be723SHaiyue Wang      14d63f20-8445-11ea-8900-1f9ce7d5650d
63598be723SHaiyue Wang
649180da67SAnatoly Burakov#. Load the ``vfio-pci`` module with ``enable_sriov`` parameter set
65598be723SHaiyue Wang
669180da67SAnatoly Burakov   .. code-block:: console
67598be723SHaiyue Wang
689180da67SAnatoly Burakov      sudo modprobe vfio-pci enable_sriov=1
69598be723SHaiyue Wang
70efb57dd5SAnatoly Burakov   Alternatively, pass the ``enable_sriov`` parameter through the ``sysfs`` if the module is already loaded or is built-in:
71efb57dd5SAnatoly Burakov
72efb57dd5SAnatoly Burakov   .. code-block:: console
73efb57dd5SAnatoly Burakov
74efb57dd5SAnatoly Burakov      echo 1 | sudo tee /sys/module/vfio_pci/parameters/enable_sriov
75efb57dd5SAnatoly Burakov
769180da67SAnatoly Burakov#. Bind the PCI devices to ``vfio-pci`` driver
779180da67SAnatoly Burakov
789180da67SAnatoly Burakov   .. code-block:: console
799180da67SAnatoly Burakov
809180da67SAnatoly Burakov      ./usertools/dpdk-devbind.py -b vfio-pci 0000:86:00.0
819180da67SAnatoly Burakov
829180da67SAnatoly Burakov#. Create the desired number of VF devices
839180da67SAnatoly Burakov
849180da67SAnatoly Burakov   .. code-block:: console
859180da67SAnatoly Burakov
869180da67SAnatoly Burakov      echo 2 > /sys/bus/pci/devices/0000:86:00.0/sriov_numvfs
879180da67SAnatoly Burakov
889180da67SAnatoly Burakov#. Start the DPDK application that will manage the PF device
899180da67SAnatoly Burakov
909180da67SAnatoly Burakov   .. code-block:: console
919180da67SAnatoly Burakov
92db27370bSStephen Hemminger      <build_dir>/app/dpdk-testpmd -l 22-25 -n 4 -a 86:00.0 \
93598be723SHaiyue Wang      --vfio-vf-token=14d63f20-8445-11ea-8900-1f9ce7d5650d --file-prefix=pf -- -i
94598be723SHaiyue Wang
959180da67SAnatoly Burakov#. Start the DPDK application that will manage the VF device
969180da67SAnatoly Burakov
979180da67SAnatoly Burakov   .. code-block:: console
989180da67SAnatoly Burakov
99db27370bSStephen Hemminger      <build_dir>/app/dpdk-testpmd -l 26-29 -n 4 -a 86:02.0 \
100598be723SHaiyue Wang      --vfio-vf-token=14d63f20-8445-11ea-8900-1f9ce7d5650d --file-prefix=vf0 -- -i
101598be723SHaiyue Wang
1029180da67SAnatoly BurakovTo make use of full VFIO functionality,
1039180da67SAnatoly Burakovboth kernel and BIOS must support and be configured
104*c265d586SBruce Richardsonto use IO virtualization (such as Intel\ |reg| VT-d).
1050db52e66SShahaf Shuler
1060db52e66SShahaf Shuler.. note::
1070db52e66SShahaf Shuler
1089180da67SAnatoly Burakov   Linux versions earlier than version 3.6 do not support VFIO.
1099180da67SAnatoly Burakov
1109180da67SAnatoly Burakov.. note::
1119180da67SAnatoly Burakov
1129180da67SAnatoly Burakov   Linux versions earlier than version 5.7 do not support the creation of
1139180da67SAnatoly Burakov   virtual functions within the VFIO framework.
1149180da67SAnatoly Burakov
1159180da67SAnatoly Burakov.. note::
1169180da67SAnatoly Burakov
1179180da67SAnatoly Burakov   In most cases, specifying "iommu=on" as kernel parameter should be enough to
1189180da67SAnatoly Burakov   configure the Linux kernel to use IOMMU.
1190db52e66SShahaf Shuler
1200db52e66SShahaf ShulerFor proper operation of VFIO when running DPDK applications as a non-privileged user, correct permissions should also be set up.
1219180da67SAnatoly BurakovFor more information, please refer to :ref:`Running_Without_Root_Privileges`.
1220db52e66SShahaf Shuler
123fc08c183SAnatoly BurakovVFIO no-IOMMU mode
124fc08c183SAnatoly Burakov------------------
125fc08c183SAnatoly Burakov
126fc08c183SAnatoly BurakovIf there is no IOMMU available on the system, VFIO can still be used,
127fc08c183SAnatoly Burakovbut it has to be loaded with an additional module parameter:
128fc08c183SAnatoly Burakov
129fc08c183SAnatoly Burakov.. code-block:: console
130fc08c183SAnatoly Burakov
131fc08c183SAnatoly Burakov   modprobe vfio enable_unsafe_noiommu_mode=1
132fc08c183SAnatoly Burakov
133fc08c183SAnatoly BurakovAlternatively, one can also enable this option in an already loaded kernel module:
134fc08c183SAnatoly Burakov
135fc08c183SAnatoly Burakov.. code-block:: console
136fc08c183SAnatoly Burakov
137fc08c183SAnatoly Burakov   echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
138fc08c183SAnatoly Burakov
139fc08c183SAnatoly BurakovAfter that, VFIO can be used with hardware devices as usual.
140fc08c183SAnatoly Burakov
1410db52e66SShahaf Shuler.. note::
1420db52e66SShahaf Shuler
143fc08c183SAnatoly Burakov   It may be required to unload all VFIO related-modules before probing
144fc08c183SAnatoly Burakov   the module again with ``enable_unsafe_noiommu_mode=1`` parameter.
145fc08c183SAnatoly Burakov
146fc08c183SAnatoly Burakov.. warning::
147fc08c183SAnatoly Burakov
148fc08c183SAnatoly Burakov   Since no-IOMMU mode forgoes IOMMU protection, it is inherently unsafe.
149fc08c183SAnatoly Burakov   That said, it does make it possible for the user
15057ff39f4SAnatoly Burakov   to keep the degree of device access and programming that VFIO has,
15157ff39f4SAnatoly Burakov   in situations where IOMMU is not available.
15257ff39f4SAnatoly Burakov
15357ff39f4SAnatoly BurakovUIO
15457ff39f4SAnatoly Burakov---
15557ff39f4SAnatoly Burakov
15657ff39f4SAnatoly BurakovIn situations where using VFIO is not an option, there are alternative drivers one can use.
15757ff39f4SAnatoly BurakovIn many cases, the standard ``uio_pci_generic`` module included in the Linux kernel
1589180da67SAnatoly Burakovcan be used as a substitute for VFIO. This module can be loaded using the command:
15957ff39f4SAnatoly Burakov
16057ff39f4SAnatoly Burakov.. code-block:: console
16157ff39f4SAnatoly Burakov
16257ff39f4SAnatoly Burakov   sudo modprobe uio_pci_generic
16357ff39f4SAnatoly Burakov
16457ff39f4SAnatoly Burakov.. note::
16557ff39f4SAnatoly Burakov
16657ff39f4SAnatoly Burakov   ``uio_pci_generic`` module doesn't support the creation of virtual functions.
16757ff39f4SAnatoly Burakov
16857ff39f4SAnatoly BurakovAs an alternative to the ``uio_pci_generic``, there is the ``igb_uio`` module
16957ff39f4SAnatoly Burakovwhich can be found in the repository `dpdk-kmods <http://git.dpdk.org/dpdk-kmods>`_.
17057ff39f4SAnatoly BurakovIt can be loaded as shown below:
17157ff39f4SAnatoly Burakov
17257ff39f4SAnatoly Burakov.. code-block:: console
17357ff39f4SAnatoly Burakov
17457ff39f4SAnatoly Burakov   sudo modprobe uio
17557ff39f4SAnatoly Burakov   sudo insmod igb_uio.ko
17657ff39f4SAnatoly Burakov
17757ff39f4SAnatoly Burakov.. note::
17857ff39f4SAnatoly Burakov
17957ff39f4SAnatoly Burakov   If UEFI secure boot is enabled,
18057ff39f4SAnatoly Burakov   the Linux kernel may disallow the use of UIO on the system.
18157ff39f4SAnatoly Burakov   Therefore, devices for use by DPDK should be bound to the ``vfio-pci`` kernel module
18257ff39f4SAnatoly Burakov   rather than any UIO-based module.
18357ff39f4SAnatoly Burakov   For more details see :ref:`linux_gsg_binding_kernel` below.
18457ff39f4SAnatoly Burakov
18557ff39f4SAnatoly Burakov.. note::
18657ff39f4SAnatoly Burakov
1870e45ace5SBruce Richardson   If the devices used for DPDK are bound to a UIO-based kernel module,
1889180da67SAnatoly Burakov   please make sure that the IOMMU is disabled or is in passthrough mode.
18957ff39f4SAnatoly Burakov   One can add ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt``
19057ff39f4SAnatoly Burakov   in GRUB command line on x86_64 systems,
19157ff39f4SAnatoly Burakov   or add ``iommu.passthrough=1`` on aarch64 systems.
19257ff39f4SAnatoly Burakov
1939180da67SAnatoly Burakov.. note::
1949180da67SAnatoly Burakov
1959180da67SAnatoly Burakov   Using UIO drivers is inherently unsafe due to this method lacking IOMMU protection,
1969180da67SAnatoly Burakov   and can only be done by root user.
1970db52e66SShahaf Shuler
19820789d4dSThomas Monjalon.. _bifurcated_driver:
19920789d4dSThomas Monjalon
2000db52e66SShahaf ShulerBifurcated Driver
2010db52e66SShahaf Shuler-----------------
2020db52e66SShahaf Shuler
2030db52e66SShahaf ShulerPMDs which use the bifurcated driver co-exists with the device kernel driver.
2040db52e66SShahaf ShulerOn such model the NIC is controlled by the kernel, while the data
2050db52e66SShahaf Shulerpath is performed by the PMD directly on top of the device.
2060db52e66SShahaf Shuler
2070db52e66SShahaf ShulerSuch model has the following benefits:
2080db52e66SShahaf Shuler
2090db52e66SShahaf Shuler - It is secure and robust, as the memory management and isolation
2100db52e66SShahaf Shuler   is done by the kernel.
2110db52e66SShahaf Shuler - It enables the user to use legacy linux tools such as ``ethtool`` or
2120db52e66SShahaf Shuler   ``ifconfig`` while running DPDK application on the same network ports.
2130db52e66SShahaf Shuler - It enables the DPDK application to filter only part of the traffic,
21420789d4dSThomas Monjalon   while the rest will be directed and handled by the kernel driver.
21520789d4dSThomas Monjalon   The flow bifurcation is performed by the NIC hardware.
21620789d4dSThomas Monjalon   As an example, using :ref:`flow_isolated_mode` allows to choose
21720789d4dSThomas Monjalon   strictly what is received in DPDK.
2180db52e66SShahaf Shuler
2190db52e66SShahaf ShulerMore about the bifurcated driver can be found in
2200db52e66SShahaf Shuler`Mellanox Bifurcated DPDK PMD
221d052a9a7SAli Alnubani<https://www.dpdk.org/wp-content/uploads/sites/35/2016/10/Day02-Session04-RonyEfraim-Userspace2016.pdf>`__.
2220db52e66SShahaf Shuler
2230db52e66SShahaf Shuler.. _linux_gsg_binding_kernel:
2240db52e66SShahaf Shuler
2250db52e66SShahaf ShulerBinding and Unbinding Network Ports to/from the Kernel Modules
2260db52e66SShahaf Shuler--------------------------------------------------------------
2270db52e66SShahaf Shuler
2280db52e66SShahaf Shuler.. note::
2290db52e66SShahaf Shuler
2309180da67SAnatoly Burakov   PMDs which use the bifurcated driver should not be unbound from their kernel drivers.
2319180da67SAnatoly Burakov   This section is for PMDs which use the UIO or VFIO drivers.
2320db52e66SShahaf Shuler
2330db52e66SShahaf ShulerAs of release 1.4, DPDK applications no longer automatically unbind all supported network ports from the kernel driver in use.
2349180da67SAnatoly BurakovInstead, in case the PMD being used use the VFIO or UIO drivers,
2359180da67SAnatoly Burakovall ports that are to be used by a DPDK application must be bound to
2369180da67SAnatoly Burakovthe ``vfio-pci``, ``uio_pci_generic``, or ``igb_uio`` module
2379180da67SAnatoly Burakovbefore the application is run.
2380db52e66SShahaf ShulerFor such PMDs, any network ports under Linux* control will be ignored and cannot be used by the application.
2390db52e66SShahaf Shuler
2409180da67SAnatoly BurakovTo bind ports to the ``vfio-pci``, ``uio_pci_generic`` or ``igb_uio`` module
2419180da67SAnatoly Burakovfor DPDK use, or to return ports to Linux control,
2429180da67SAnatoly Burakova utility script called ``dpdk-devbind.py`` is provided in the ``usertools`` subdirectory.
2430db52e66SShahaf ShulerThis utility can be used to provide a view of the current state of the network ports on the system,
2449180da67SAnatoly Burakovand to bind and unbind those ports from the different kernel modules,
2459180da67SAnatoly Burakovincluding the VFIO and UIO modules.
2460db52e66SShahaf ShulerThe following are some examples of how the script can be used.
2479180da67SAnatoly BurakovA full description of the script and its parameters can be obtained
2489180da67SAnatoly Burakovby calling the script with the ``--help`` or ``--usage`` options.
2499180da67SAnatoly BurakovNote that the UIO or VFIO kernel modules to be used,
2509180da67SAnatoly Burakovshould be loaded into the kernel before running the ``dpdk-devbind.py`` script.
2510db52e66SShahaf Shuler
2520db52e66SShahaf Shuler.. warning::
2530db52e66SShahaf Shuler
2549180da67SAnatoly Burakov   Due to the way VFIO works, there are certain limitations
2559180da67SAnatoly Burakov   to which devices can be used with VFIO.
2560db52e66SShahaf Shuler   Mainly it comes down to how IOMMU groups work.
2579180da67SAnatoly Burakov   Any Virtual Function device can usually be used with VFIO on its own,
2589180da67SAnatoly Burakov   but physical devices may require either all ports bound to VFIO,
2590db52e66SShahaf Shuler   or some of them bound to VFIO while others not being bound to anything at all.
2600db52e66SShahaf Shuler
2619180da67SAnatoly Burakov   If your device is behind a PCI-to-PCI bridge,
2629180da67SAnatoly Burakov   the bridge will then be part of the IOMMU group in which your device is in.
2639180da67SAnatoly Burakov   Therefore, the bridge driver should also be unbound from the bridge PCI device
2649180da67SAnatoly Burakov   for VFIO to work with devices behind the bridge.
2650db52e66SShahaf Shuler
2660db52e66SShahaf Shuler.. warning::
2670db52e66SShahaf Shuler
2689180da67SAnatoly Burakov   While any user can run the ``dpdk-devbind.py`` script
2699180da67SAnatoly Burakov   to view the status of the network ports,
2700db52e66SShahaf Shuler   binding or unbinding network ports requires root privileges.
2710db52e66SShahaf Shuler
2720db52e66SShahaf ShulerTo see the status of all network ports on the system:
2730db52e66SShahaf Shuler
2740db52e66SShahaf Shuler.. code-block:: console
2750db52e66SShahaf Shuler
2760db52e66SShahaf Shuler    ./usertools/dpdk-devbind.py --status
2770db52e66SShahaf Shuler
2780db52e66SShahaf Shuler    Network devices using DPDK-compatible driver
2790db52e66SShahaf Shuler    ============================================
2800db52e66SShahaf Shuler    0000:82:00.0 '82599EB 10-GbE NIC' drv=uio_pci_generic unused=ixgbe
2810db52e66SShahaf Shuler    0000:82:00.1 '82599EB 10-GbE NIC' drv=uio_pci_generic unused=ixgbe
2820db52e66SShahaf Shuler
2830db52e66SShahaf Shuler    Network devices using kernel driver
2840db52e66SShahaf Shuler    ===================================
2850db52e66SShahaf Shuler    0000:04:00.0 'I350 1-GbE NIC' if=em0  drv=igb unused=uio_pci_generic *Active*
2860db52e66SShahaf Shuler    0000:04:00.1 'I350 1-GbE NIC' if=eth1 drv=igb unused=uio_pci_generic
2870db52e66SShahaf Shuler    0000:04:00.2 'I350 1-GbE NIC' if=eth2 drv=igb unused=uio_pci_generic
2880db52e66SShahaf Shuler    0000:04:00.3 'I350 1-GbE NIC' if=eth3 drv=igb unused=uio_pci_generic
2890db52e66SShahaf Shuler
2900db52e66SShahaf Shuler    Other network devices
2910db52e66SShahaf Shuler    =====================
2920db52e66SShahaf Shuler    <none>
2930db52e66SShahaf Shuler
2940db52e66SShahaf ShulerTo bind device ``eth1``,``04:00.1``, to the ``uio_pci_generic`` driver:
2950db52e66SShahaf Shuler
2960db52e66SShahaf Shuler.. code-block:: console
2970db52e66SShahaf Shuler
2980db52e66SShahaf Shuler    ./usertools/dpdk-devbind.py --bind=uio_pci_generic 04:00.1
2990db52e66SShahaf Shuler
3000db52e66SShahaf Shuleror, alternatively,
3010db52e66SShahaf Shuler
3020db52e66SShahaf Shuler.. code-block:: console
3030db52e66SShahaf Shuler
3040db52e66SShahaf Shuler    ./usertools/dpdk-devbind.py --bind=uio_pci_generic eth1
3050db52e66SShahaf Shuler
3060db52e66SShahaf ShulerTo restore device ``82:00.0`` to its original kernel binding:
3070db52e66SShahaf Shuler
3080db52e66SShahaf Shuler.. code-block:: console
3090db52e66SShahaf Shuler
3100db52e66SShahaf Shuler    ./usertools/dpdk-devbind.py --bind=ixgbe 82:00.0
3118a8979c9SAnatoly Burakov
3128a8979c9SAnatoly BurakovTroubleshooting VFIO
3138a8979c9SAnatoly Burakov--------------------
3148a8979c9SAnatoly Burakov
3158a8979c9SAnatoly BurakovIn certain situations, using ``dpdk-devbind.py`` script
3168a8979c9SAnatoly Burakovto bind a device to VFIO driver may fail.
3178a8979c9SAnatoly BurakovThe first place to check is the kernel messages:
3188a8979c9SAnatoly Burakov
3198a8979c9SAnatoly Burakov.. code-block:: console
3208a8979c9SAnatoly Burakov
3218a8979c9SAnatoly Burakov   dmesg | tail
3228a8979c9SAnatoly Burakov   ...
3238a8979c9SAnatoly Burakov   [ 1297.875090] vfio-pci: probe of 0000:31:00.0 failed with error -22
3248a8979c9SAnatoly Burakov   ...
3258a8979c9SAnatoly Burakov
3268a8979c9SAnatoly BurakovIn most cases, the ``error -22`` indicates that the VFIO subsystem
3278a8979c9SAnatoly Burakovcould not be enabled because there is no IOMMU support.
3288a8979c9SAnatoly Burakov
3298a8979c9SAnatoly BurakovTo check whether the kernel has been booted with correct parameters,
3308a8979c9SAnatoly Burakovone can check the kernel command-line:
3318a8979c9SAnatoly Burakov
3328a8979c9SAnatoly Burakov.. code-block:: console
3338a8979c9SAnatoly Burakov
3348a8979c9SAnatoly Burakov   cat /proc/cmdline
3358a8979c9SAnatoly Burakov
3368a8979c9SAnatoly BurakovPlease refer to earlier sections on how to configure kernel parameters
3378a8979c9SAnatoly Burakovcorrectly for your system.
3388a8979c9SAnatoly Burakov
3398a8979c9SAnatoly BurakovIf the kernel is configured correctly, one also has to make sure that
340*c265d586SBruce Richardsonthe BIOS configuration has virtualization features (such as Intel\ |reg| VT-d).
3418a8979c9SAnatoly BurakovThere is no standard way to check if the platform is configured correctly,
3428a8979c9SAnatoly Burakovso please check with your platform documentation to see if it has such features,
3438a8979c9SAnatoly Burakovand how to enable them.
3448a8979c9SAnatoly Burakov
3458a8979c9SAnatoly BurakovIn certain distributions, default kernel configuration is such that
3468a8979c9SAnatoly Burakovthe no-IOMMU mode is disabled altogether at compile time.
3478a8979c9SAnatoly BurakovThis can be checked in the boot configuration of your system:
3488a8979c9SAnatoly Burakov
3498a8979c9SAnatoly Burakov.. code-block:: console
3508a8979c9SAnatoly Burakov
3518a8979c9SAnatoly Burakov   cat /boot/config-$(uname -r) | grep NOIOMMU
3528a8979c9SAnatoly Burakov   # CONFIG_VFIO_NOIOMMU is not set
3538a8979c9SAnatoly Burakov
3548a8979c9SAnatoly BurakovIf ``CONFIG_VFIO_NOIOMMU`` is not enabled in the kernel configuration,
3558a8979c9SAnatoly BurakovVFIO driver will not support the no-IOMMU mode,
3568a8979c9SAnatoly Burakovand other alternatives (such as UIO drivers) will have to be used.
357