From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755318AbdDGK1t (ORCPT ); Fri, 7 Apr 2017 06:27:49 -0400 Received: from 8bytes.org ([81.169.241.247]:48011 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753754AbdDGK1k (ORCPT ); Fri, 7 Apr 2017 06:27:40 -0400 Date: Fri, 7 Apr 2017 12:27:39 +0200 From: Joerg Roedel To: Samuel Sieb Cc: Linux Kernel Subject: Re: AMD IOMMU causing filesystem corruption Message-ID: <20170407102739.GY7266@8bytes.org> References: <5ea65f55-e5eb-11a5-14ab-e721d2f95ed6@sieb.net> <20170403213909.GR7266@8bytes.org> <32afc9d1-a2db-f9dc-bbe0-d894967dc8ad@sieb.net> <935473d9-e75b-c019-0dde-063855067858@sieb.net> <20170404073215.GS7266@8bytes.org> <5838b65d-0f2f-86b1-1041-a28d42fc9881@sieb.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5838b65d-0f2f-86b1-1041-a28d42fc9881@sieb.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 04, 2017 at 09:29:37AM -0700, Samuel Sieb wrote: > That's what I did. While running with iommu=off, I compiled and > installed a 4.11rc kernel with the patch. I rebooted to use that > kernel and then compiled and installed a 4.10 kernel with that patch > and another unrelated patch. That is what I described above. The > filesystem destruction happened while running the 4.11rc kernel with > that patch. Is there any way to verify that the patch was actually > having any effect? Can I check if ATS is enabled or not? I will > have to rebuild the system before I can test again. Also, please try the attached debug-diff on your kernel. It completly disables the use of ATS in the amd-iommu driver. diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 98940d1392cb..f019aa67c54c 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -467,7 +467,7 @@ static int iommu_init_device(struct device *dev) struct amd_iommu *iommu; iommu = amd_iommu_rlookup_table[dev_data->devid]; - dev_data->iommu_v2 = iommu->is_iommu_v2; + dev_data->iommu_v2 = false; } dev->archdata.iommu = dev_data; diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 6130278c5d71..41d0e645960c 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -171,7 +171,7 @@ int amd_iommus_present; /* IOMMUs have a non-present cache? */ bool amd_iommu_np_cache __read_mostly; -bool amd_iommu_iotlb_sup __read_mostly = true; +bool amd_iommu_iotlb_sup __read_mostly = false; u32 amd_iommu_max_pasid __read_mostly = ~0;