From: Greg Kroah-Hartman Date: Fri, 7 May 2021 05:49:54 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.19.190~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5495a65c70e9cf5c302adcf9fe386ae01c3c1f2c;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: vfio-depend-on-mmu.patch --- diff --git a/queue-5.4/series b/queue-5.4/series index 2e6e5660c37..1b8b331daed 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -17,3 +17,4 @@ platform-x86-thinkpad_acpi-correct-thermal-sensor-allocation.patch scsi-ufs-unlock-on-a-couple-error-paths.patch ovl-allow-upperdir-inside-lowerdir.patch perf-core-fix-unconditional-security_locked_down-call.patch +vfio-depend-on-mmu.patch diff --git a/queue-5.4/vfio-depend-on-mmu.patch b/queue-5.4/vfio-depend-on-mmu.patch new file mode 100644 index 00000000000..40a05871a83 --- /dev/null +++ b/queue-5.4/vfio-depend-on-mmu.patch @@ -0,0 +1,36 @@ +From b2b12db53507bc97d96f6b7cb279e831e5eafb00 Mon Sep 17 00:00:00 2001 +From: Jason Gunthorpe +Date: Thu, 4 Mar 2021 21:30:03 -0400 +Subject: vfio: Depend on MMU + +From: Jason Gunthorpe + +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 +Signed-off-by: Jason Gunthorpe +Message-Id: <0-v1-02cb5500df6e+78-vfio_no_mmu_jgg@nvidia.com> +Signed-off-by: Alex Williamson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/vfio/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/vfio/Kconfig ++++ b/drivers/vfio/Kconfig +@@ -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.