Enabled IOMMU kills MMC card access
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · * Oliver Hartkopp ([email protected]) wrote:
Quoted 7 lines · Chris Wright
Quoted 5 lines · * Oliver Hartkopp ([email protected]) wrote:
i have a Dell 6510 with i7 CPU (M 640 @ 2.80GHz) with integrated GPU.
With 3.2-rc - even with the very latest Linux version from Linus' tree 3.2.0-rc7-w-iommu-00081-g733bbb7 from today - i encountered some problems with my built-in MMC adapter:
Quoted 8 lines
Quoted 2 lines
Ricoh device? If so, appears to be a buggy device (issues DMA from pci function 0 despite programming pci function > 0).
Yes. It is a Ricoh device - lspci says:
03:00.0 CardBus bridge: Ricoh Co Ltd Device e476 (rev 02) 03:00.1 SD Host controller: Ricoh Co Ltd MMC/SD Host Controller (rev 03)
Yeah, that's just buggy. The driver is programming pci Bus:Dev.Func (03:00.1) to do DMA (and so the IOMMU should have translations for that device). However, the device appears to issue the DMA from 03:00.0 giving the DMA errors you showed, like this:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
[ 71.818618] DMAR:[DMA Write] Request device [03:00.0] fault addr fffff000 [ 71.818620] DMAR:[fault reason 02] Present bit in context entry is clear [ 71.818800] mmc0: unrecognised EXT_CSD revision 112 [ 71.818808] mmc0: error -22 whilst initialising MMC card
<snip>
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
I do not get this problem when using a Debian distribution kernel 3.1.0 config as a base for the 3.2-rc7. Therefore i assume that they enabled something with visualization, that i did not enable on my development box.
They may have IOMMU defaulting to off (
CONFIG_INTEL_IOMMU_DEFAULT_ONturned off).There is no
CONFIG_INTEL_IOMMU_DEFAULT_ONin the 3.1.0 kernel.
Quoted 7 lines
They do it like this in 3.1:
CONFIG_IOMMU_HELPER=yCONFIG_IOMMU_API=yCONFIG_IOMMU_SUPPORT=yCONFIG_DMAR=y
#CONFIG_DMAR_DEFAULT_ONis not set
This is the same config item (it's just been renamed).
Quoted 9 lines
CONFIG_DMAR_FLOPPY_WA=y
#CONFIG_VIRT_DRIVERSis not setQuoted 6 lines
Quoted 5 lines
Are there probably wrong
Kconfigdepencies killing my MMC access??Attached you'll find both of my kernel configs with and without IOMMU enabled. Any idea?
Quoted 6 lines
Quoted 3 lines
You should be able to boot with either intel_iommu=off (disabled) or intel_iommu=on iommu=pt (enabled in passthrough mode, so only useful for pci device assignment to guest virtual machines).
IMHO it should work even with everything is switched on.
Yes, it should. Currently, just a bug (and a quirk in hw that we need to work around in sw).
Quoted 2 lines
I put the MMC people in CC if there's a 'correct' way to handle the Ricoh MMC together with IOMMU (e.g. disable DMA?).