Skip to contentSkip to conversation

iommu/intel: disable DMAR for Q35 integrated gfx

PATCH In review Kees Cook 2 participants 5 messages Dec 5, 2016 IOMMU

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 iommu/intel: disable DMAR for Q35 integrated gfx

This blacklists the Q35 integrated graphics so IOMMU can be otherwise enabled. Without this, a Q35 system can only enable IOMMU when booting with "intel_iommu=on,igfx_off" but not "intel_iommu=on".

00:02.0 0300: 8086:29b2 (rev 02) (prog-if 00 [VGA controller])
Subsystem: 8086:4f4a
Flags: bus master, fast devsel, latency 0, IRQ 32 Memory at e0380000 (32-bit, non-prefetchable) [size=512K] I/O ports at 2460 [size=8]
Memory at d0000000 (32-bit, prefetchable) [size=256M] Memory at e0200000 (32-bit, non-prefetchable) [size=1M] Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915

---
 drivers/iommu/intel-iommu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/intel-iommu.c +1 -0
index d8376c2d18b3..24e5b06834ae 100644
@@ -5327,6 +5327,7 @@ static void quirk_iommu_g4x_gfx(struct pci_dev *dev)
 	dmar_map_gfx = 0;
 }
 
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x29b2, quirk_iommu_g4x_gfx);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_g4x_gfx);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_g4x_gfx);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e10, quirk_iommu_g4x_gfx);
Signature · 10 lines
2.7.4


-- 
Kees Cook
Nexus Security
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 3 lines · Kees Cook

This blacklists the Q35 integrated graphics so IOMMU can be otherwise enabled. Without this, a Q35 system can only enable IOMMU when booting with "intel_iommu=on,igfx_off" but not "intel_iommu=on".

Hm, is this definitely the same bug? Or is it something different, and perhaps a BIOS issue? There are many of those...

Signature · 1 line
dwmw2
author
#2 lore raw
Quoted 7 lines · David Woodhouse
Quoted 3 lines · Kees Cook

This blacklists the Q35 integrated graphics so IOMMU can be otherwise enabled. Without this, a Q35 system can only enable IOMMU when booting with "intel_iommu=on,igfx_off" but not "intel_iommu=on".

Hm, is this definitely the same bug? Or is it something different, and perhaps a BIOS issue? There are many of those...

Hm, I have no idea. :) What would I look for in the BIOS?

I figured since g4 was busted, surely q35 was too, since it's even older...

-Kees

Signature · 6 lines
Kees Cook
Nexus Security
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 1 line · Kees Cook

Hm, I have no idea. :) What would I look for in the BIOS?

For a start, what is the actual failure mode?

Quoted 2 lines

I figured since g4 was busted, surely q35 was too, since it's even older...

Oh no, they all have different failures. Intel never actually *tested* their graphics hardware before shipping it, but IIRC it was only Q4x where we concluded the hardware was just too broken to live.

author
#4 lore raw
Quoted 4 lines · David Woodhouse
Quoted 1 line · Kees Cook

Hm, I have no idea. :) What would I look for in the BIOS?

For a start, what is the actual failure mode?

Based on initial testing (not that I've spent tons of time with it, since I need that machine running): at graphics init, entire system hangs. :P

Quoted 6 lines
Quoted 2 lines

I figured since g4 was busted, surely q35 was too, since it's even older...

Oh no, they all have different failures. Intel never actually *tested* their graphics hardware before shipping it, but IIRC it was only Q4x where we concluded the hardware was just too broken to live.

Wheee!

-Kees

Signature · 2 lines
Kees Cook
Nexus Security