1
0
Fork 0
remarkable-linux/drivers/iommu
Jay Cornwall 15115bf3b7 iommu/amd: Apply workaround for ATS write permission check
[ Upstream commit 358875fd52 ]

The AMD Family 15h Models 30h-3Fh (Kaveri) BIOS and Kernel Developer's
Guide omitted part of the BIOS IOMMU L2 register setup specification.
Without this setup the IOMMU L2 does not fully respect write permissions
when handling an ATS translation request.

The IOMMU L2 will set PTE dirty bit when handling an ATS translation with
write permission request, even when PTE RW bit is clear. This may occur by
direct translation (which would cause a PPR) or by prefetch request from
the ATC.

This is observed in practice when the IOMMU L2 modifies a PTE which maps a
pagecache page. The ext4 filesystem driver BUGs when asked to writeback
these (non-modified) pages.

Enable ATS write permission check in the Kaveri IOMMU L2 if BIOS has not.

Signed-off-by: Jay Cornwall <jay@jcornwall.me>
Cc: <stable@vger.kernel.org> # v3.19+
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2016-03-09 13:15:09 -05:00
..
Kconfig iommu/io-pgtable-arm: Add built time dependency 2015-03-03 14:04:12 +01:00
Makefile Merge branches 'arm/renesas', 'arm/smmu', 'arm/omap', 'ppc/pamu', 'x86/amd' and 'core' into next 2015-02-04 16:53:44 +01:00
amd_iommu.c iommu/amd: Don't clear DTE flags when modifying it 2015-11-09 14:33:33 -08:00
amd_iommu_init.c iommu/amd: Apply workaround for ATS write permission check 2016-03-09 13:15:09 -05:00
amd_iommu_proto.h IOMMU Updates for Linux v3.20 2015-02-12 09:16:56 -08:00
amd_iommu_types.h iommu/amd: Don't clear DTE flags when modifying it 2015-11-09 14:33:33 -08:00
amd_iommu_v2.c iommu/amd: Fix BUG when faulting a PROT_NONE VMA 2015-11-09 14:33:33 -08:00
arm-smmu.c iommu/arm-smmu: Fix broken ATOS check 2015-07-10 09:49:33 -07:00
dmar.c iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG 2016-02-23 00:46:35 -05:00
exynos-iommu.c iommu/exynos: Make use of domain_alloc and domain_free 2015-03-31 15:32:11 +02:00
fsl_pamu.c iommu/fsl: Really fix init section(s) content 2015-09-29 19:26:14 +02:00
fsl_pamu.h iommu/fsl: Various cleanups 2015-02-03 18:47:18 +01:00
fsl_pamu_domain.c iommu/fsl: Make use of domain_alloc and domain_free 2015-03-31 15:32:14 +02:00
fsl_pamu_domain.h iommu/fsl: Make use of domain_alloc and domain_free 2015-03-31 15:32:14 +02:00
intel-iommu.c iommu/vt-d: Fix ATSR handling for Root-Complex integrated endpoints 2016-01-31 11:23:39 -08:00
intel_irq_remapping.c iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG 2016-02-23 00:46:35 -05:00
io-pgtable-arm.c iommu/io-pgtable-arm: Ensure we free the final level on teardown 2016-02-01 11:40:02 -05:00
io-pgtable.c iommu: add ARM LPAE page table allocator 2015-01-19 14:46:44 +00:00
io-pgtable.h iommu: io-pgtable-arm: add non-secure quirk 2015-01-19 14:46:45 +00:00
iommu-sysfs.c iommu: Fix compile error in iommu-sysfs.c 2014-07-07 12:01:21 +02:00
iommu-traces.c iommu: Add iommu_error class event to iommu trace 2013-09-25 11:07:04 +02:00
iommu.c iommu: Remove domain_init and domain_free iommu_ops 2015-03-31 15:32:16 +02:00
iova.c iommu: Make IOVA domain page size explicit 2015-01-19 14:55:22 +01:00
ipmmu-vmsa.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
irq_remapping.c iommu/irq_remapping: Normailize the way to detect whether IR is enabled 2015-01-15 11:24:24 +01:00
irq_remapping.h IOMMU Updates for Linux v3.20 2015-02-12 09:16:56 -08:00
msm_iommu.c iommu/msm: Make use of domain_alloc and domain_free 2015-03-31 15:32:12 +02:00
msm_iommu.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
msm_iommu_dev.c iommu/msm: Use dev_get_platdata() 2014-11-04 15:03:39 +01:00
msm_iommu_hw-8xxx.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
of_iommu.c of: iommu: Add ptr to OF node arg to of_iommu_configure() 2015-03-03 14:42:55 -06:00
omap-iommu-debug.c iommu/omap: Switch pagetable debugfs entry to use seq_file 2014-10-23 14:33:48 +02:00
omap-iommu.c iommu/omap: Make use of domain_alloc and domain_free 2015-03-31 15:32:02 +02:00
omap-iommu.h iommu/omap: Do not export unneeded functions 2014-10-23 14:33:47 +02:00
omap-iopgtable.h iommu/omap: Move to_iommu definition from omap-iopgtable.h 2014-04-16 16:30:15 +02:00
rockchip-iommu.c iommu/rockchip: Fix build without CONFIG_OF 2015-05-05 15:18:24 +02:00
shmobile-iommu.c iommu/shmobile: Make use of domain_alloc and domain_free 2015-03-31 15:32:13 +02:00
shmobile-ipmmu.c iommu: drop owner assignment from platform_drivers 2014-10-20 16:20:42 +02:00
shmobile-ipmmu.h iommu/shmobile: Turn the flush_lock mutex into a spinlock 2014-01-07 15:35:25 +01:00
tegra-gart.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
tegra-smmu.c iommu/tegra-smmu: Parameterize number of TLB lines 2015-09-29 19:26:14 +02:00