From: "Roedel, Joerg" <Joerg.Roedel@amd.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ingo Molnar <mingo@elte.hu>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@kernel.org" <stable@kernel.org>
Subject: Re: [PATCH 2/3] x86/amd-iommu: Work around S3 BIOS bug
Date: Fri, 1 Oct 2010 11:07:24 +0200 [thread overview]
Message-ID: <20101001090723.GQ9817@amd.com> (raw)
In-Reply-To: <20100930202104.GA20495@srcf.ucam.org>
On Thu, Sep 30, 2010 at 04:21:04PM -0400, Matthew Garrett wrote:
> On Thu, Sep 23, 2010 at 04:44:48PM +0200, Joerg Roedel wrote:
> > +static void iommu_apply_quirks(struct amd_iommu *iommu)
> > +{
> > + if (is_rd890_iommu(iommu->dev)) {
> > + pci_write_config_dword(iommu->dev, 0xf0, iommu->cache_cfg[0]);
> > + pci_write_config_dword(iommu->dev, 0xf4, iommu->cache_cfg[1]);
> > + pci_write_config_dword(iommu->dev, 0xf8, iommu->cache_cfg[2]);
> > + pci_write_config_dword(iommu->dev, 0xfc, iommu->cache_cfg[3]);
> > + }
> > +}
> > +
>
> This doesn't look right. 0xf0-0xff are for indexed register access, so
> what you're doing here is just restoring the last of each of those
> registers that the BIOS programmed - and if the BIOS cleared the
> writable flag afterwards, you're not even doing that.
With a half-fixed BIOS (a BIOS which re-enables the IOMMU on resume)
this was the necessary step to make the IOMMU execute commands again. So
it actually fixed the problem I have seen. I agree that its better to
fully restore the indirect register spaces when we workaround the fully
broken BIOSes. When we have this I remove this code, but until then it
fixes the problem.
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
next prev parent reply other threads:[~2010-10-01 9:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 14:44 [git pull] AMD IOMMU fixes for 2.6.36 Joerg Roedel
2010-09-23 14:44 ` [PATCH 1/3] x86/amd-iommu: Set iommu configuration flags in enable-loop Joerg Roedel
2010-09-23 14:44 ` [PATCH 2/3] x86/amd-iommu: Work around S3 BIOS bug Joerg Roedel
2010-09-30 20:21 ` Matthew Garrett
2010-10-01 9:07 ` Roedel, Joerg [this message]
2010-09-23 14:44 ` [PATCH 3/3] x86/amd-iommu: Fix rounding-bug in __unmap_single Joerg Roedel
2010-09-24 9:21 ` [git pull] AMD IOMMU fixes for 2.6.36 Ingo Molnar
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=20101001090723.GQ9817@amd.com \
--to=joerg.roedel@amd.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mjg59@srcf.ucam.org \
--cc=stable@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.