From: Joerg Roedel <joro@8bytes.org>
To: Samuel Sieb <samuel@sieb.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: AMD IOMMU causing filesystem corruption
Date: Mon, 3 Apr 2017 23:39:09 +0200 [thread overview]
Message-ID: <20170403213909.GR7266@8bytes.org> (raw)
In-Reply-To: <5ea65f55-e5eb-11a5-14ab-e721d2f95ed6@sieb.net>
Hi Samuel,
On Mon, Apr 03, 2017 at 01:38:08PM -0700, Samuel Sieb wrote:
> I filed a bug in bugzilla, but I wasn't sure what category to put it
> in, so I suspect I ended up picking one that doesn't get looked at
> much.
>
> https://bugzilla.kernel.org/show_bug.cgi?id=195051
>
> The issue is that on a specific Acer laptop with a dual-core A9, if
> I don't disable the IOMMU using iommu=off, it has immediate and
> rapidly fatal filesystem corruption by the time a user logs into the
> desktop. What led me to try that was at one point I noticed an error
> message about the iommu in the logs. However, I did not have a
> chance to save that due to the corruption obliterating the log
> files.
You have a system based on the AMD Stoney platform, on which the PCI-ATS
feature of the GPU is broken, as we recently found out.
Can you please test whether the attached patch fixes the issue on your
machine?
>From 09cbdcbbd23f0823e7651b4f35b13ae633b3fbe2 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <jroedel@suse.de>
Date: Tue, 28 Mar 2017 13:20:27 +0200
Subject: [PATCH] PCI: Blacklist AMD Stoney GPU devices for ATS
ATS is broken on these devices. Under invalidation load, the
GPU does not reply to invalidations anymore, causing
Completion-wait loop timeouts on the AMD IOMMU driver side.
Fix it by not enabling ATS on these devices.
Note that below mentioned commit is not broken, it just
triggers the issue because it might cause invalidation
storms on devices.
Fixes: b1516a14657a ('iommu/amd: Implement flush queue')
Reported-by: Daniel Drake <drake@endlessm.com>
Cc: Alexander Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/pci/ats.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c
index eeb9fb2..711bdb2 100644
--- a/drivers/pci/ats.c
+++ b/drivers/pci/ats.c
@@ -17,10 +17,18 @@
#include "pci.h"
+static const struct pci_device_id broken_ats_tbl[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x98e4) }, /* AMD Stoney GPU part */
+ { 0 }
+};
+
void pci_ats_init(struct pci_dev *dev)
{
int pos;
+ if (pci_match_id(broken_ats_tbl, dev))
+ return;
+
pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ATS);
if (!pos)
return;
--
1.9.1
next prev parent reply other threads:[~2017-04-03 21:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 20:38 AMD IOMMU causing filesystem corruption Samuel Sieb
2017-04-03 21:39 ` Joerg Roedel [this message]
2017-04-04 3:37 ` Samuel Sieb
2017-04-04 7:11 ` Samuel Sieb
2017-04-04 7:32 ` Joerg Roedel
2017-04-04 16:29 ` Samuel Sieb
2017-04-07 10:22 ` Joerg Roedel
2017-04-08 6:49 ` Samuel Sieb
2017-04-07 10:27 ` Joerg Roedel
2017-04-25 17:55 ` Samuel Sieb
2017-04-26 10:14 ` Joerg Roedel
2017-04-26 21:31 ` Samuel Sieb
2017-04-26 21:43 ` Joerg Roedel
2017-04-27 19:32 ` Samuel Sieb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170403213909.GR7266@8bytes.org \
--to=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samuel@sieb.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).