Re: Question about iommu on x86_64 and radeon driver.

From: Konrad Rzeszutek Wilk
Date: Mon May 23 2011 - 18:05:57 EST

On Sun, May 22, 2011 at 10:56:27PM +0100, Daniel Haid wrote:
> Hello,
> I have an x86_64 system with a VIA chipset and 4GB of RAM. The
> mainboard
> is an ASUS M2V where the bios-setup has an option called "Map around
> memory hole" and I have an "ATI Technologies Inc RV710 [Radeon HD

There had to be more than 'Map around memory hole'? Was it called

> 4350]"
> graphics card according to lspci.
> Now one of the following things happen to my system:
> 1) With the bios-option enabled and no kernel parameters I get the
> following error:
> [drm:r600_ring_test] *ERROR* radeon: ring test failed
> (scratch(0x8504)=0xCAFEDEAD)
> radeon 0000:02:00.0: disabling GPU acceleration
> and then I can not use any 3d-acceleration. I also get the message

The problem you are hitting (I think) is that the AMD GART poor-man IOMMU is turned off
and the SWIOTLB is used instead. If you would like some technical
details, take a look at:
(the point #2 is what you are hitting).

> Looks like a VIA chipset. Disabling IOMMU. Override with iommu=allowed
> 2) With the bios-option enabled and "mem=3072M" I can not use only
> 3GB of RAM,
> but the radeon card works.
> 3) With the bios-option enabled and "iommu=allowed" I get 4GB of RAM
> and
> the radeon card works. But I wonder whether this can have any bad
> effects?

Not sure why the AMD GART IOMMU gets disabled on VIA chipsets. You might
want to use 'git gui blame arch/x86/kernel/early-quirks.c' and look
at the code in question to figure that out.

> 4) Without the bios-option (and without any kernel parameters) I do not
> get the "Looks like a VIA chipset. Disabling IOMMU. Override with
> iommu=allowed"
> message, but strangely linux shows only about 3GB of RAM.
> I did not try other combinations. Now my questions are
> A) Is this a bug in the radeon driver? Or maybe not, since
> Documentation/x86/x86_64/boot-options.txt
> seems to imply that for >3GB an iommu is required?

Correct, and an IOMMU does get turned on. The SWIOTLB one.
> B) Is it safe to use iommu=allowed in my case ? If not, what
> problems will I encounter and what
> options should I use instead? Will I be stuck with 3GB of RAM?

Well, if everything works.... but you might just want to use
the git gui blame to take a look at the back-story of why the quirk
was added.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at