]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
vfio: Depend on MMU
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 5 Mar 2021 01:30:03 +0000 (21:30 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:53:24 +0000 (10:53 +0200)
BugLink: https://bugs.launchpad.net/bugs/1928823
commit b2b12db53507bc97d96f6b7cb279e831e5eafb00 upstream.

VFIO_IOMMU_TYPE1 does not compile with !MMU:

../drivers/vfio/vfio_iommu_type1.c: In function 'follow_fault_pfn':
../drivers/vfio/vfio_iommu_type1.c:536:22: error: implicit declaration of function 'pte_write'; did you mean 'vfs_write'? [-Werror=implicit-function-declaration]

So require it.

Suggested-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Message-Id: <0-v1-02cb5500df6e+78-vfio_no_mmu_jgg@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/vfio/Kconfig

index 9dc95024afaeb2578b5c18fb6d10b66d0e06cae8..503ed2f3fbb5eb94c5cc9cfd1080ae1c79c9ea00 100644 (file)
@@ -22,7 +22,7 @@ config VFIO_VIRQFD
 menuconfig VFIO
        tristate "VFIO Non-Privileged userspace driver framework"
        select IOMMU_API
-       select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM || ARM64)
+       select VFIO_IOMMU_TYPE1 if MMU && (X86 || S390 || ARM || ARM64)
        help
          VFIO provides a framework for secure userspace device drivers.
          See Documentation/driver-api/vfio.rst for more details.