lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 1 Oct 2010 11:07:24 +0200
From:	"Roedel, Joerg" <Joerg.Roedel@....com>
To:	Matthew Garrett <mjg59@...f.ucam.org>
CC:	Ingo Molnar <mingo@...e.hu>,
	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"stable@...nel.org" <stable@...nel.org>
Subject: Re: [PATCH 2/3] x86/amd-iommu: Work around S3 BIOS bug

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ