Skip to contentSkip to conversation

DMAR fault by Intel H97 SATA controller since "block: Increase BLK_DEF_MAX_SECTORS_CAP" (6.17-rc1)

REGRESSION Tobias Laas 8 participants 29 messages Nov 23 – Dec 6

Subsystems (5)
Block layer libata IOMMU Regressions +1 more subsystems
lore
Share & tools
lore
#0 lore raw

Hi,

commit 9b8b84879d4adc506b0d3944e20b28d9f3f6994b ("block: Increase BLK_DEF_MAX_SECTORS_CAP" - 6.17-rc1) causes my system based on an ASRock H97M Pro4 mainboard (Intel H97 chipset) to fail to mount the rootfs (XFS) when booted with intel_iommu=on. With intel_iommu=off, the kernel mounts the rootfs without any problems, but I cannot rule out silent data corruption. The SSD with the rootfs is connected to port ata5 of the Intel H97 SATA controller. A similar issue has also been reported at https://askubuntu.com/q/1565093 , but unfortunately the answer provided there does not address the IOMMU-related errors.

The first error messages displayed at boot are (kernel at 4843f6873f7c4835e62f2c73ba0fd538e57a2f22 "Merge tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl")
DMAR: DRHD: handling fault status reg 3
DMAR: [DMA: Write NO_PASID] Request device [0000:00:1f.2] fault addr 0xff400000 [fault reason 0x0c] non-zero reserved fields in PTE
DMAR: DRHD: handling fault status reg 3
DMAR: [DMA: Write NO_PASID] Request device [0000:00:1f.2] fault addr 0xff4a0000 [fault reason 0x0c] non-zero reserved fields in PTE
DMAR: DRHD: handling fault status reg 3
DMAR: [DMA: Write NO_PASID] Request device [0000:00:1f.2] fault addr 0xff450000 [fault reason 0x0c] non-zero reserved fields in PTE
ata5.00: exception Emask 0x70 SAct 0x30000000 SErr 0x440900 action 0x6 frozen
ata5.00: irq_stat 0x28000000, host bus error, interface fatal error
ata5: SError: { UnrecovData HostInt CommWake Handshk }
ata5.00: failed command: WRITE FPDMA QUEUED
ata5.00: cmd 61/f9:e0:68:47:7b/0f:00:18:00:00/40 tag 28 ncq dma 2093568 ou
ata5.00: res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x70 (host bus error)
ata5.00: stats: { DRDY }
ata5.00: failed command: WRITE FPDMA QUEUED
ata5.00: cmd 61/07:e8:61:57:7b/0f:00:18:00:00/40 tag 29 ncq dma 3594 out
ata5.00: res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x70 (host bus error)
ata5.00: stats: { DRDY }
ata5: hard resetting link

The request device in the DMAR fault is the Intel H97 SATA controller:
00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode] (prog-if 01 [AHCI 1.0])
Subsystem: ASRock Incorporation Device 8c82
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin B routed to IRQ 34
IOMMU group: 11
Region 0: I/O ports at f0d0 [size=8]
Region 1: I/O ports at f0c0 [size=4]
Region 2: I/O ports at f0b0 [size=8]
Region 3: I/O ports at f0a0 [size=4]
Region 4: I/O ports at f060 [size=32]
Region 5: Memory at efc39000 (32-bit, non-prefetchable) [size=2K]
Capabilities: <access denied>
Kernel driver in use: ahci
Kernel modules: ahci

I bisected the issue to the value of BLK_DEF_MAX_SECTORS_CAP in block/blk.h, which was increased by the aforementioned commit.
With
#define BLK_DEF_MAX_SECTORS_CAP 4088u
the system boots and mounts the rootfs successfully, but with 4089 and larger there are errors. I have attached a dmesg log from a successful boot with 4088 sectors.

One way forward could be to a new entry to __ata_dev_max_sec_quirks similarly to the recent commit a12cc63129380a5364e787d92b30a3257f66c250 ("ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8"). However, I wonder, whether that would fix the underlying issue or rather be a workaround, because 4088 does not fit the pattern of all other entries, which specify either a power of 2 or a power of 2 minus 1.

Furthermore, the first error messages are DMAR faults, and a SATA SSD that isn't functioning properly shouldn't cause any DMAR faults, because the SATA controller should never read from or write to areas outside its memory region.
Since the issue with mounting the rootfs disappears with intel_iommu=off, I wonder, whether there is a limitation on the maxmium block size either by the hardware or from the configuration of the IOMMU and SATA controller by the kernel. Perhaps this was uncovered by the increase in the maximum number of sectors similarly to af8c27375733fb6a6df9fa484cda77cc3dd0cb80 ("scsi: megaraid_sas: Limit NVMe request size to the PRP chain frame"). Note that I cannot rule out the possibility of silent data corruption, even if the rootfs is mounted successfully, should the SATA controller write to other memory areas with the increased number of sectors—which would not be detected with intel_iommu=off.

I would appreciate it if someone could investigate this issue. Any insights into its possible cause would be greatly appreciated.

Best regards,
Tobias Laas

maintainer
#1 lore raw

Hello Tobias,

Quoted 6 lines · Tobias Laas

One way forward could be to a new entry to __ata_dev_max_sec_quirks similarly to the recent commit a12cc63129380a5364e787d92b30a3257f66c250 ("ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8"). However, I wonder, whether that would fix the underlying issue or rather be a workaround, because 4088 does not fit the pattern of all other entries, which specify either a power of 2 or a power of 2 minus 1.

Your attached kernel log shows that you have a
Samsung SSD 860 PRO 1TB, FW: RVM02B6Q

This SSD is probably quite common, so I somewhat doubt that it is the SSD that is at fault here.

Quoted 9 lines

Furthermore, the first error messages are DMAR faults, and a SATA SSD that isn't functioning properly shouldn't cause any DMAR faults, because the SATA controller should never read from or write to areas outside its memory region.
Since the issue with mounting the rootfs disappears with intel_iommu=off, I wonder, whether there is a limitation on the maxmium block size either by the hardware or from the configuration of the IOMMU and SATA controller by the kernel.

Considering how common your SSD is, my guess is that it is somehow an IOMMU or a BIOS/ACPI bug (since the BIOS generates specific ACPI tables - DMAR on Intel).

We have seen similar reports here:
https://bugzilla.kernel.org/show_bug.cgi?id=220693
https://bugzilla.kernel.org/show_bug.cgi?id=221713

Does it work if you revert:
d373449d8e97 ("iommu/vt-d: Use the generic iommu page table") ?

It would be nice if we could involve some Intel IOMMU experts.

If the ACPI DMAR is at fault, perhaps it is possible for the kernel to patch the ACPI DMAR for your platform.

Kind regards,
Niklas

#2 lore raw
Quoted 53 lines · Niklas Cassel

Hello Tobias,

Quoted 10 lines · Tobias Laas

One way forward could be to a new entry to __ata_dev_max_sec_quirks similarly to the recent commit a12cc63129380a5364e787d92b30a3257f66c250
("ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8"). However,
I wonder, whether that would fix the underlying issue or rather be a
workaround, because 4088 does not fit the pattern of all other entries,
which specify either a power of 2 or a power of 2 minus 1.

Your attached kernel log shows that you have a
Samsung SSD 860 PRO 1TB, FW: RVM02B6Q

This SSD is probably quite common, so I somewhat doubt that it is the SSD that is at fault here.

Quoted 15 lines

Furthermore, the first error messages are DMAR faults, and a SATA SSD that
isn't functioning properly shouldn't cause any DMAR faults, because the SATA
controller should never read from or write to areas outside its memory
region.
Since the issue with mounting the rootfs disappears with intel_iommu=off, I
wonder, whether there is a limitation on the maxmium block size either by
the hardware or from the configuration of the IOMMU and SATA controller by
the kernel.

Considering how common your SSD is, my guess is that it is somehow an IOMMU or a BIOS/ACPI bug (since the BIOS generates specific ACPI tables -
DMAR on Intel).

We have seen similar reports here:
https://bugzilla.kernel.org/show_bug.cgi?id=220693
https://bugzilla.kernel.org/show_bug.cgi?id=221713

Does it work if you revert:
d373449d8e97 ("iommu/vt-d: Use the generic iommu page table") ?

It would be nice if we could involve some Intel IOMMU experts.

Quoted 7 lines

If the ACPI DMAR is at fault, perhaps it is possible for the kernel to
patch the ACPI DMAR for your platform.

Kind regards,
Niklas

Hi Niklas, Tobias,

I tried to help here but (full transparency) I had some LLM help for further ideas after I coul dnot repriduce this on my platform.

I tried to reproduce this on a Coffee Lake desktop (i7-8700, Cannon Lake PCH AHCI 00:17.0) whose INCLUDE_ALL DRHD reports the same relevant capabilities as Tobias's dmar1:

dmar1: cap d2008c40660462 ecap f050da
(SLLPS = 2M|1G, ecap.C = 0, MGAW 39, SAGAW 4-level only)

with intel_iommu=on, DMA-FQ default domain, max_sectors_kb = 4096.

- 6.12-based kernel (pre d373449d8e97, i.e. the old VT-d page table code, with the larger BLK_DEF_MAX_SECTORS_CAP): 2M O_DIRECT reads, clean.
- 7.4.0-rc1 (generic iommu page table): 2M and 4M O_DIRECT reads and 2M writes from hugepage-backed buffers against a SATA SSD, ~15k I/Os, no DMAR or ATA errors. The iommu:map tracepoint shows 2 MiB-aligned iova/paddr mappings, and domain_translation_struct shows 2 MiB leaf PDEs (e.g. 0x000000039c200082, PS set), so the superpage path was exercised.

The 4088 vs 4089 threshold matches exactly the point where a request first needs a full 512-page (2 MiB) IOVA, which is where superpage mappings become possible. All three of Tobias's fault addresses fall in the same 2 MiB window at 0xff400000.

So on this hardware neither the old nor the generic page table code shows the problem, which supports Niklas's suspicion of something platform specific. One difference: on Tobias's system dmar0 reports no superpage support (cap c0000020660462) while dmar1 does; on mine both do.

Tobias, a few things that would maybe help narrow it down:

1. Boot with intel_iommu=on,sp_off and an unmodified cap. If the faults go away, superpages are involved.

2. The full dmesg from a failing boot, including the DMAR/DRHD lines. The faults are reported as DMA Write while the outstanding commands were WRITE FPDMA QUEUED, and I'd like to see what else was in flight.

Regards,
Laurence

#3 lore raw

Am 23.11.2026 22:49 schrieb Laurence Oberman:

Quoted 1 line

Hi Niklas, Tobias,

Hi Torsten, hi Laurence,

I am responding to both of your emails in this email, because you both suggested to check out intel_iommu=on,sp_off.

Quoted 34 lines

I tried to help here but (full transparency) I had some LLM help for further ideas after I coul dnot repriduce this on my platform.

I tried to reproduce this on a Coffee Lake desktop (i7-8700, Cannon Lake PCH AHCI 00:17.0) whose INCLUDE_ALL DRHD reports the same relevant capabilities as Tobias's dmar1:

dmar1: cap d2008c40660462 ecap f050da
(SLLPS = 2M|1G, ecap.C = 0, MGAW 39, SAGAW 4-level only)

with intel_iommu=on, DMA-FQ default domain, max_sectors_kb = 4096.

- 6.12-based kernel (pre d373449d8e97, i.e. the old VT-d page table code, with the larger BLK_DEF_MAX_SECTORS_CAP): 2M O_DIRECT reads, clean.
- 7.4.0-rc1 (generic iommu page table): 2M and 4M O_DIRECT reads and 2M writes from hugepage-backed buffers against a SATA SSD, ~15k I/Os, no DMAR or ATA errors. The iommu:map tracepoint shows 2 MiB-aligned iova/paddr mappings, and domain_translation_struct shows 2 MiB leaf PDEs (e.g. 0x000000039c200082, PS set), so the superpage path was exercised.

The 4088 vs 4089 threshold matches exactly the point where a request first needs a full 512-page (2 MiB) IOVA, which is where superpage mappings become possible. All three of Tobias's fault addresses fall in the same 2 MiB window at 0xff400000.

So on this hardware neither the old nor the generic page table code shows the problem, which supports Niklas's suspicion of something platform specific. One difference: on Tobias's system dmar0 reports no superpage support (cap c0000020660462) while dmar1 does; on mine both do.

Quoted 4 lines

Tobias, a few things that would maybe help narrow it down:

1. Boot with intel_iommu=on,sp_off and an unmodified cap. If the faults go away, superpages are involved.

Very nice. I just tried with a kernel with the cap at 8191, which I had at hand (the new default cap is 8192 IIRC): with intel_iommu=on,sp_off the faults go away, indeed. More on this below.

Quoted 4 lines

2. The full dmesg from a failing boot, including the DMAR/DRHD lines. The faults are reported as DMA Write while the outstanding commands were WRITE FPDMA QUEUED, and I'd like to see what else was in flight.

To be honest, I'd like to avoid having to capture a full log when the error occurs, because I can't think of a good way to save it. Technically, I hope the logs up to the first fault are identical with the various caps. As you can see in the log corresponding to the first screen full of errors in the attachment, there are exactly two WRITE FPDMA QUEUED commands that fail at a time (with the cap at 4089 IIRC), so the log looks very repetitive. After the first couple of errors, the kernel starts reducing the ATA link speed (and later maybe also the UDMA speeds) and continues to do so until it gives up on mounting the rootfs. Then I’m greeted by an initramfs shell prompt, and I’m not sure if I can mount any other filesystem at this point with the slimmed down kernel config I used to speed up the bisection. I’m not sure if I’ve understood you correctly regarding your second sentence: I don’t see any contradiction here—for a WRITE FPDMA QUEUED command, there should be an associated DMA write. The QUEUED just indicates that the SSD can reorder the commands in the queue (NCQ).

Am 24.11.2026 09:55 schrieb Thorsten Leemhuis:

Quoted 10 lines

I just a few days privately was told that "intel_iommu=on,sp_off" solved problems wrt to one unresolved regression related to iommu with a similar generation intel hardware. The user wrote "[kernel] code improperly thinking that the CPU supports something called "superpages", which it does, but only when the integrated GPU is disabled (speciality of Intel Haswell)."

Could that maybe related? Do you use the iGPU? Does that parameter prevent the problems? It's a long shot, but quickly tested, so I thought it was worth mentioning.

Yes, it could very well be related. My CPU is a Haswell (Refresh) Desktop processor, and I do use the iGPU. And sp_off seems to prevent the problems, see above.

But what I still don't understand is why DMAR faults occur. There are dmar0 and dmar1, and as Laurence explained, dmar0 does not support superpages on my board. I guess this is because the iGPU is supposed to be associated with dmar0 (The BIOS might configure this differently when I install a PCIe GPU and deactivate the iGPU). Is there any conflict if dmar1 uses superpages and dmar0 doesn't? Or does the kernel not respect that dmar0 does not support superpages? Or is the iGPU associated with dmar1? Who determines this: the kernel or the BIOS?

Best regards,
Tobias Laas

#4 lore raw
Quoted 120 lines · Tobias Laas

Am 23.11.2026 22:49 schrieb Laurence Oberman:

Quoted 1 line

Hi Niklas, Tobias,

Hi Torsten, hi Laurence,

I am responding to both of your emails in this email, because you both
suggested to check out intel_iommu=on,sp_off.

Quoted 39 lines

I tried to help here but (full transparency) I had some LLM help for
further ideas after I coul dnot repriduce this on my platform.

I tried to reproduce this on a Coffee Lake desktop (i7-8700, Cannon Lake PCH AHCI 00:17.0) whose INCLUDE_ALL DRHD reports the same relevant capabilities as Tobias's dmar1:

  dmar1: cap d2008c40660462 ecap f050da
  (SLLPS = 2M|1G, ecap.C = 0, MGAW 39, SAGAW 4-level only)

with intel_iommu=on, DMA-FQ default domain, max_sectors_kb = 4096.

- 6.12-based kernel (pre d373449d8e97, i.e. the old VT-d page table code, with the larger BLK_DEF_MAX_SECTORS_CAP): 2M O_DIRECT reads,
  clean.
- 7.4.0-rc1 (generic iommu page table): 2M and 4M O_DIRECT reads and
  2M writes from hugepage-backed buffers against a SATA SSD, ~15k I/Os, no DMAR or ATA errors. The iommu:map tracepoint shows 2 MiB-aligned iova/paddr mappings, and domain_translation_struct shows 2 MiB leaf PDEs (e.g. 0x000000039c200082, PS set), so the superpage path was exercised.

The 4088 vs 4089 threshold matches exactly the point where a request
first needs a full 512-page (2 MiB) IOVA, which is where superpage mappings become possible. All three of Tobias's fault addresses fall
in the same 2 MiB window at 0xff400000.

So on this hardware neither the old nor the generic page table code shows the problem, which supports Niklas's suspicion of something platform specific. One difference: on Tobias's system dmar0 reports no superpage support (cap c0000020660462) while dmar1 does; on mine both do.

Quoted 4 lines

Tobias, a few things that would maybe help narrow it down:

  1. Boot with intel_iommu=on,sp_off and an unmodified cap. If the faults go away, superpages are involved.

Very nice. I just tried with a kernel with the cap at 8191, which I had
at hand (the new default cap is 8192 IIRC): with intel_iommu=on,sp_off
the faults go away, indeed. More on this below.

Quoted 6 lines

  2. The full dmesg from a failing boot, including the DMAR/DRHD lines. The faults are reported as DMA Write while the outstanding
     commands were WRITE FPDMA QUEUED, and I'd like to see what else
     was in flight.

To be honest, I'd like to avoid having to capture a full log when the error occurs, because I can't think of a good way to save it. Technically, I hope the logs up to the first fault are identical with the various caps. As you can see in the log corresponding to the first
screen full of errors in the attachment, there are exactly two WRITE FPDMA QUEUED commands that fail at a time (with the cap at 4089 IIRC),
so the log looks very repetitive. After the first couple of errors, the
kernel starts reducing the ATA link speed (and later maybe also the UDMA
speeds) and continues to do so until it gives up on mounting the rootfs.
Then I’m greeted by an initramfs shell prompt, and I’m not sure if I can
mount any other filesystem at this point with the slimmed down kernel config I used to speed up the bisection.
I’m not sure if I’ve understood you correctly regarding your second
sentence: I don’t see any contradiction here—for a WRITE FPDMA QUEUED command, there should be an associated DMA write. The QUEUED just indicates that the SSD can reorder the commands in the queue (NCQ).

Am 24.11.2026 09:55 schrieb Thorsten Leemhuis:

Quoted 10 lines

I just a few days privately was told that "intel_iommu=on,sp_off" solved
problems wrt to one unresolved regression related to iommu with a similar generation intel hardware. The user wrote "[kernel] code improperly thinking that the CPU supports something called "superpages",
which it does, but only when the integrated GPU is disabled (speciality
of Intel Haswell)."

Quoted 4 lines

Could that maybe related? Do you use the iGPU? Does that parameter prevent the problems? It's a long shot, but quickly tested, so I thought
it was worth mentioning.

Yes, it could very well be related. My CPU is a Haswell (Refresh) Desktop processor, and I do use the iGPU. And sp_off seems to prevent the problems, see above.

But what I still don't understand is why DMAR faults occur. There are dmar0 and dmar1, and as Laurence explained, dmar0 does not support superpages on my board. I guess this is because the iGPU is supposed to
be associated with dmar0 (The BIOS might configure this differently when
I install a PCIe GPU and deactivate the iGPU). Is there any conflict if
dmar1 uses superpages and dmar0 doesn't? Or does the kernel not respect
that dmar0 does not support superpages? Or is the iGPU associated with
dmar1? Who determines this: the kernel or the BIOS?

Quoted 2 lines

Best regards,
Tobias Laas

Hi Tobias, Thorsten,

Againe, I had LLM help here trying to get clarification.

Thanks Tobias, the sp_off result confirms that superpage mappings are involved. No need for the full failing log; the question about DMA Write vs. WRITE FPDMA no longer matters given this.

To your questions: the BIOS defines which devices each DRHD covers, via the ACPI DMAR table. On your board dmar0 (flags 0x0) covers only the iGPU (00:02.0), and dmar1 (INCLUDE_PCI_ALL) covers everything else, including the SATA controller at 00:1f.2. The iGPU is not behind dmar1.

If I read the history right, this comes from three things combining:

- Before v6.13, intel-iommu used the lowest common superpage level across all active IOMMUs (domain_update_iommu_superpage()). Since your dmar0 reports no superpage support (cap c0000020660462), superpages were never used anywhere on your system.

- 5bdd86ec5d19 ("iommu/vt-d: Remove domain_update_iommu_superpage()", v6.13-rc1) made superpage support per-IOMMU, so dmar1 started using its advertised 2M pages (cap d2008c20660462, SLLPS = 2M|1G).

- 9b8b84879d4a ("block: Increase BLK_DEF_MAX_SECTORS_CAP", v6.17-rc1) raised the default cap from 2560 sectors (1.25 MiB) to 4 MiB. Block I/O can now produce 2 MiB-aligned 512-page mappings, which is the first time AHCI DMA hits the superpage path by default. That explains both the bisect result and the 4088/4089
threshold: 4088 sectors is exactly 511 pages, 4089 needs a full 2 MiB mapping.

All three of your fault addresses (0xff400000, 0xff4a0000, 0xff450000) fall in the same 2 MiB IOVA window, and fault reason 0x0c (non-zero reserved fields in PTE) at scattered 4K addresses inside it would fit the IOMMU not handling the 2M leaf entry correctly. That is similar to the Geminilake igfx superpage issue fixed a few years ago.

For comparison, I could not reproduce this on a Coffee Lake system (i7-8700, Cannon Lake PCH AHCI) where both DRHDs report SLLPS = 2M|1G (dmar1 cap d2008c40660462, ecap f050da). On 7.4.0-rc1 with intel_iommu=on and max_sectors_kb = 4096, against a SATA SSD:

- O_DIRECT 2M/4M reads and 2M writes from hugepage-backed buffers (~15k I/Os); domain_translation_struct confirms 2 MiB leaf PDEs were installed (e.g. 0x000000039c200082, PS set)
- 60s of concurrent 2M sequential + 4k random O_DIRECT reads
- buffered XFS write/read/copy of 8 GiB, with ~2000 4 MiB mappings in the iommu:map trace

all completed without DMAR or ATA errors. A 6.12-based kernel with the larger cap was also clean. That is consistent with the problem being specific to the dmar0/dmar1 superpage asymmetry on Haswell with the iGPU enabled, as Thorsten's report suggests.

Tobias, if you have time, a confirmation test: on a 6.13-6.16 kernel, raising max_sectors_kb to 4096 via sysfs on the SSD should reproduce the faults, while 6.12 with the same setting should not.

Lu, is there a known Haswell erratum here? If so, a platform quirk that disables superpages (or restores the common-denominator rule) when the igfx DRHD lacks superpage support seems like the right fix, along the lines of the earlier Geminilake igfx superpage quirk, rather than limiting max_sectors in libata.

Regards,
Laurence

maintainer
#5 lore raw
Quoted 2 lines · Laurence Oberman

Lu, is there a known Haswell erratum here? If so, a platform quirk that disables superpages (or restores the common-denominator rule)

No, I haven't seen any erratum on this. A quirk for the affected platforms seems to be a right approach.

Quoted 3 lines

when the igfx DRHD lacks superpage support seems like the right fix, along the lines of the earlier Geminilake igfx superpage quirk, rather than limiting max_sectors in libata.

Thanks,
baolu

#6 lore raw
In reply to Niklas Cassel

Am 23.11.2026 22:15 schrieb Niklas Cassel:

Quoted 10 lines

Hello Tobias,

Quoted 6 lines · Tobias Laas

One way forward could be to a new entry to __ata_dev_max_sec_quirks similarly to the recent commit a12cc63129380a5364e787d92b30a3257f66c250 ("ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8"). However, I wonder, whether that would fix the underlying issue or rather be a workaround, because 4088 does not fit the pattern of all other entries, which specify either a power of 2 or a power of 2 minus 1.

Quoted 5 lines

Your attached kernel log shows that you have a
Samsung SSD 860 PRO 1TB, FW: RVM02B6Q

This SSD is probably quite common, so I somewhat doubt that it is the SSD that is at fault here.

Hello Niklas,

thanks for the the quick reply. Indeed the Samsung SSD 860 PRO series is quite common.

Quoted 17 lines
Quoted 10 lines

Furthermore, the first error messages are DMAR faults, and a SATA SSD that isn't functioning properly shouldn't cause any DMAR faults, because the SATA controller should never read from or write to areas outside its memory region.
Since the issue with mounting the rootfs disappears with intel_iommu=off, I wonder, whether there is a limitation on the maxmium block size either by the hardware or from the configuration of the IOMMU and SATA controller by the kernel.

Considering how common your SSD is, my guess is that it is somehow an IOMMU or a BIOS/ACPI bug (since the BIOS generates specific ACPI tables -
DMAR on Intel).

Quoted 3 lines

We have seen similar reports here:
https://bugzilla.kernel.org/show_bug.cgi?id=220693
https://bugzilla.kernel.org/show_bug.cgi?id=221713

Thanks for the pointer. The first report sounds as if it discusses several issues. I agree with Ivan's comment at https://bugzilla.kernel.org/show_bug.cgi?id=220693#c42 .

I am afraid the second report is specific to HP server mainboards. In contrast to the logs in the Debian bug report, I have never seen the following error:
DMAR: DRHD: handling fault status reg 2
DMAR: [INTR-REMAP] Request device [01:00.0] fault index 0x1c [fault reason 0x26] Blocked an interrupt request due to source-id verification failure. On my mainboard, I have only observed DMAR errors with [fault reason 0x0c] non-zero reserved fields in PTE.

Quoted 3 lines

Does it work if you revert:https://posteo.de/webmail/?_task=mail&_id=4553111306b0538dd90e75&_action=compose# d373449d8e97 ("iommu/vt-d: Use the generic iommu page table") ?

To be honest I built many kernel versions between the increase in BLK_DEF_MAX_SECTORS_CAP (~ 6.17-rc1) and HEAD for the bisection, and since the change you mention was not included until 6.19-rc1, I have tested kernels with and without this change, so I doubt a revert would help.

Best regards,
Tobias Laas

Quoted 9 lines

It would be nice if we could involve some Intel IOMMU experts.

If the ACPI DMAR is at fault, perhaps it is possible for the kernel to patch the ACPI DMAR for your platform.

Kind regards,
Niklas

#7 lore raw
In reply to Niklas Cassel

[Reminder, this is not my area of expertise, so this might be sending everyone in the wrong direction -- so handle it carefully]

Quoted 7 lines · Niklas Cassel
Quoted 4 lines

Since the issue with mounting the rootfs disappears with intel_iommu=off, I wonder, whether there is a limitation on the maxmium block size either by the hardware or from the configuration of the IOMMU and SATA controller by the kernel.

Considering how common your SSD is, my guess is that it is somehow an IOMMU or a BIOS/ACPI bug (since the BIOS generates specific ACPI tables - DMAR on Intel).

I just a few days privately was told that "intel_iommu=on,sp_off" solved problems wrt to one unresolved regression related to iommu with a similar generation intel hardware. The user wrote "[kernel] code improperly thinking that the CPU supports something called "superpages", which it does, but only when the integrated GPU is disabled (speciality of Intel Haswell)."

Could that maybe related? Do you use the iGPU? Does that parameter prevent the problems? It's a long shot, but quickly tested, so I thought it was worth mentioning.

Ciao, Thorsten

#8 lore raw
Quoted 8 lines · Thorsten Leemhuis

[Reminder, this is not my area of expertise, so this might be sending everyone in the wrong direction -- so handle it carefully]

Quoted 4 lines · Niklas Cassel
Quoted 4 lines

Since the issue with mounting the rootfs disappears with intel_iommu=off, I wonder, whether there is a limitation on the maxmium block size either by the hardware or from the configuration of the IOMMU and SATA controller by the kernel.

Quoted 7 lines
Quoted 3 lines

Considering how common your SSD is, my guess is that it is somehow an IOMMU or a BIOS/ACPI bug (since the BIOS generates specific ACPI tables - DMAR on Intel).

I just a few days privately was told that "intel_iommu=on,sp_off" solved problems wrt to one unresolved regression related to iommu with a similar generation intel hardware. [...]

For completeness, Šimon Pospíchal (now CCed) shared findings and a WIP fix (both with the help of a LLM) meanwhile here:

https://lore.kernel.org/all/QISmXFlpPMgvFUKmdIBDwqn4JHHXt2NZeJzerMLHF_5icLo0lPKVlN0Ig9v8Vb52NmCeSFdyrao4x8KoN1DCXtDlnZS7eRIClC6vZyu-hPU%[email protected]/

Ciao, Thorsten

#9 lore raw
Quoted 4 lines · Thorsten Leemhuis

For completeness, Šimon Pospíchal (now CCed) shared findings and a WIP fix (both with the help of a LLM) meanwhile here:

https://lore.kernel.org/all/QISmXFlpPMgvFUKmdIBDwqn4JHHXt2NZeJzerMLHF_5icLo0lPKVlN0Ig9v8Vb52NmCeSFdyrao4x8KoN1DCXtDlnZS7eRIClC6vZyu-hPU%[email protected]/

Thanks Thorsten for having shared that link. The LLM I'm using doesn't like that patch and came up with the patch shown below. Untested.

Bart.

Subject: [PATCH] iommu/vt-d: Disable superpages on Haswell with integrated graphics

Disable Intel VT-d superpages on bare-metal Haswell client systems when integrated graphics (0000:00:02.0) is enabled and an active remapping unit advertises superpage support (CAP.SLLPS).

Per the 4th Generation Intel Core Processor Family datasheets (document 328897, section 3.1.2), the integrated graphics VT-d engine does not support super-pages and BIOS must disable super-pages in the default VT-d engine when integrated graphics is enabled. Several Haswell BIOSes leave CAP.SLLPS set on the default engine (dmar1). Whenever Linux installs a 2 MiB or 1 GiB leaf entry (PS=1) on dmar1, hardware aborts DMA with fault reason 0x0c ("non-zero reserved fields in PTE"), breaking VFIO passthrough, discrete GPUs, audio, and AHCI storage (exposed by default once BLK_DEF_MAX_SECTORS_CAP increased to 4 MiB in v6.17).

Prior to commit c376a3456d8b ("iommu/vt-d: Remove domain_update_iommu_cap()"), domain_update_iommu_superpage() intersected superpage support across all active IOMMUs, so the IGD unit (SLLPS=0) masked off superpages on dmar1. After that commit, dmar1 domains started honoring dmar1's advertised CAP.SLLPS.

Detect bare-metal Haswell client CPUs (INTEL_HASWELL, INTEL_HASWELL_L, INTEL_HASWELL_G), verify that the Intel integrated graphics device at 0000:00:02.0 is present and not on an untrusted PCI link, and clear intel_iommu_superpage during intel_iommu_init() before allocating any paging domains if an active IOMMU advertises CAP.SLLPS.

---
 drivers/iommu/intel/iommu.c | 53 +++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
drivers/iommu/intel/iommu.c +53 -0
index 5a2e705a2f2e..dd37aa25e287 100644
@@ -24,6 +24,8 @@
 #include <linux/tboot.h>
 #include <uapi/linux/iommufd.h>
 
+#include <asm/cpu_device_id.h>
+
 #include "iommu.h"
 #include "../dma-iommu.h"
 #include "../irq_remapping.h"
@@ -43,6 +45,7 @@
 
 #define DEFAULT_DOMAIN_ADDRESS_WIDTH 57
 
+static void __init check_haswell_igfx_superpage(void);
 static void __init check_tylersburg_isoch(void);
 static int intel_iommu_set_dirty_tracking(struct iommu_domain *domain,
 					  bool enable);
@@ -2762,6 +2765,7 @@ int __init intel_iommu_init(void)
 		pr_info("No SATC found\n");
 
 	init_no_remapping_devices();
+	check_haswell_igfx_superpage();
 
 	ret = init_dmars();
 	if (ret) {
@@ -4266,6 +4270,55 @@ static void __init check_tylersburg_isoch(void)
 	       vtisochctrl);
 }
 
+static const struct x86_cpu_id haswell_cpu_ids[] __initconst = {
+	X86_MATCH_VFM(INTEL_HASWELL, NULL),
+	X86_MATCH_VFM(INTEL_HASWELL_L, NULL),
+	X86_MATCH_VFM(INTEL_HASWELL_G, NULL),
+	{}
+};
+
+/*
+ * Per the 4th Generation Intel Core Processor Family datasheets (e.g.
+ * document 328897, section 3.1.2), the integrated graphics VT-d engine
+ * does not support super-pages and BIOS must disable super-pages in the
+ * default VT-d engine when integrated graphics is enabled. Some Haswell
+ * BIOSes leave CAP.SLLPS set on the default engine, causing fault reason
+ * 0x0c (non-zero reserved fields in PTE) when a 2 MiB or 1 GiB superpage
+ * mapping is used.
+ */
+static void __init check_haswell_igfx_superpage(void)
+{
+	struct dmar_drhd_unit *drhd;
+	struct intel_iommu *iommu;
+	struct pci_dev *pdev;
+
+	if (!intel_iommu_superpage)
+		return;
+
+	if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR) ||
+	    !x86_match_cpu(haswell_cpu_ids))
+		return;
+
+	pdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(2, 0));
+	if (!pdev)
+		return;
+
+	if (pdev->vendor != PCI_VENDOR_ID_INTEL || !IS_GFX_DEVICE(pdev) ||
+	    risky_device(pdev)) {
+		pci_dev_put(pdev);
+		return;
+	}
+	pci_dev_put(pdev);
+
+	for_each_active_iommu(iommu, drhd) {
+		if (cap_super_page_val(iommu->cap)) {
+			intel_iommu_superpage = 0;
+			pr_info("Disabling superpages on Haswell with integrated graphics\n");
+			break;
+		}
+	}
+}
+
 /*
  * Here we deal with a device TLB defect where device may 

inadvertently issue ATS
* invalidation completion before posted writes initiated with
translated address

#10 lore raw
Quoted 157 lines · Bart Van Assche
Quoted 5 lines · Thorsten Leemhuis

For completeness, Šimon Pospíchal (now CCed) shared findings and a WIP
fix (both with the help of a LLM) meanwhile here:

https://lore.kernel.org/all/QISmXFlpPMgvFUKmdIBDwqn4JHHXt2NZeJzerMLHF_5icLo0lPKVlN0Ig9v8Vb52NmCeSFdyrao4x8KoN1DCXtDlnZS7eRIClC6vZyu-hPU%[email protected]/

Thanks Thorsten for having shared that link. The LLM I'm using doesn't
like that patch and came up with the patch shown below. Untested.

Bart.

Subject: [PATCH] iommu/vt-d: Disable superpages on Haswell with integrated graphics

Disable Intel VT-d superpages on bare-metal Haswell client systems when
integrated graphics (0000:00:02.0) is enabled and an active remapping unit advertises superpage support (CAP.SLLPS).

Per the 4th Generation Intel Core Processor Family datasheets (document
328897, section 3.1.2), the integrated graphics VT-d engine does not support super-pages and BIOS must disable super-pages in the default VT-d engine when integrated graphics is enabled. Several Haswell BIOSes
leave CAP.SLLPS set on the default engine (dmar1). Whenever Linux installs
a 2 MiB or 1 GiB leaf entry (PS=1) on dmar1, hardware aborts DMA with fault reason 0x0c ("non-zero reserved fields in PTE"), breaking VFIO passthrough, discrete GPUs, audio, and AHCI storage (exposed by default
once BLK_DEF_MAX_SECTORS_CAP increased to 4 MiB in v6.17).

Prior to commit c376a3456d8b ("iommu/vt-d: Remove domain_update_iommu_cap()"), domain_update_iommu_superpage() intersected
superpage support across all active IOMMUs, so the IGD unit (SLLPS=0) masked off superpages on dmar1. After that commit, dmar1 domains started
honoring dmar1's advertised CAP.SLLPS.

Detect bare-metal Haswell client CPUs (INTEL_HASWELL, INTEL_HASWELL_L,
INTEL_HASWELL_G), verify that the Intel integrated graphics device at 0000:00:02.0 is present and not on an untrusted PCI link, and clear intel_iommu_superpage during intel_iommu_init() before allocating any paging domains if an active IOMMU advertises CAP.SLLPS.

Fixes c376a3456d8b ("iommu/vt-d: Remove domain_update_iommu_cap()")

Closes:
https://lore.kernel.org/linux-block/[email protected]/

Closes:
https://lore.kernel.org/r/HYhMd0Klo0XE_yiVY7XmsgyKKFDwKHfKRy22KrycLcYd0V_ykA4xdbBMJXkA07YX3os6qK-NhMIVi6ITo-CkNIIF0e-GcI0UwwZmdDhAJ0I=@protonmail.com
Cc: [email protected]
---
  drivers/iommu/intel/iommu.c | 53
+++++++++++++++++++++++++++++++++++++

  1 file changed, 53 insertions(+)
drivers/iommu/intel/iommu.c +3 -0
index 5a2e705a2f2e..dd37aa25e287 100644
@@ -24,6 +24,8 @@
   #include <linux/tboot.h>
   #include <uapi/linux/iommufd.h>
 
+#include <asm/cpu_device_id.h>
+
   #include "iommu.h"
   #include "../dma-iommu.h"
   #include "../irq_remapping.h"
@@ -43,6 +45,7 @@
 
   #define DEFAULT_DOMAIN_ADDRESS_WIDTH 57
 
+static void __init check_haswell_igfx_superpage(void);
   static void __init check_tylersburg_isoch(void);

  static int intel_iommu_set_dirty_tracking(struct iommu_domain *domain,
     bool enable);

drivers/iommu/intel/iommu.c +10 -0
@@ -2762,6 +2765,7 @@ int __init intel_iommu_init(void)
   		pr_info("No SATC found\n");
 
   	init_no_remapping_devices();
+	check_haswell_igfx_superpage();
 
   	ret = init_dmars();
   	if (ret) {
@@ -4266,6 +4270,55 @@ static void __init
 check_tylersburg_isoch(void)
   	       vtisochctrl);
   }
 
+static const struct x86_cpu_id haswell_cpu_ids[] __initconst = {
+	X86_MATCH_VFM(INTEL_HASWELL, NULL),
+	X86_MATCH_VFM(INTEL_HASWELL_L, NULL),
+	X86_MATCH_VFM(INTEL_HASWELL_G, NULL),
+	{}
+};
+
+/*
+ * Per the 4th Generation Intel Core Processor Family datasheets

(e.g.
+ * document 328897, section 3.1.2), the integrated graphics VT-d engine
+ * does not support super-pages and BIOS must disable super-pages in the
+ * default VT-d engine when integrated graphics is enabled. Some Haswell
+ * BIOSes leave CAP.SLLPS set on the default engine, causing fault reason
+ * 0x0c (non-zero reserved fields in PTE) when a 2 MiB or 1 GiB superpage
+ * mapping is used.
+ */

drivers/iommu/intel/iommu.c +18 -0
+static void __init check_haswell_igfx_superpage(void)
+{
+	struct dmar_drhd_unit *drhd;
+	struct intel_iommu *iommu;
+	struct pci_dev *pdev;
+
+	if (!intel_iommu_superpage)
+		return;
+
+	if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR) ||
+	    !x86_match_cpu(haswell_cpu_ids))
+		return;
+
+	pdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(2, 0));
+	if (!pdev)
+		return;
+
+	if (pdev->vendor != PCI_VENDOR_ID_INTEL ||

!IS_GFX_DEVICE(pdev) ||

drivers/iommu/intel/iommu.c +10 -0
+	    risky_device(pdev)) {
+		pci_dev_put(pdev);
+		return;
+	}
+	pci_dev_put(pdev);
+
+	for_each_active_iommu(iommu, drhd) {
+		if (cap_super_page_val(iommu->cap)) {
+			intel_iommu_superpage = 0;
+			pr_info("Disabling superpages on Haswell

with integrated graphics\n");

drivers/iommu/intel/iommu.c +5 -0
+			break;
+		}
+	}
+}
+
Quoted 5 lines

  /*
   * Here we deal with a device TLB defect where device may inadvertently issue ATS
   * invalidation completion before posted writes initiated with translated address

Hi Bart,

Tested on a non-affected platform to check the quirk does not
misfire: Coffee Lake i7-8700, Cannon Lake PCH AHCI, both DRHDs report SLLPS = 2M|1G (dmar0 cap 1c0000c40660462, dmar1 cap d2008c40660462), 7.4.0-rc1 with intel_iommu=on. The quirk does not trigger, superpages remain in use (2 MiB leaf PDEs, e.g. 0x000000018f400082, confirmed via domain_translation_struct during 2M O_DIRECT reads), and there are no DMAR or ATA errors. I don't have Haswell hardware, so Tobias's test is the one that confirms the fix itself.

The Fixes: tag looks right to me. c376a3456d8b is the commit that stopped intersecting superpage support across IOMMUs at attach time. In my earlier mail I pointed at 5bdd86ec5d19, which only removed the remaining hotplug user of domain_update_iommu_superpage(); both are in v6.13-rc1.

Regards,
Laurence

#11 lore raw

Hello,

as I mentioned in the referenced regression thread I reported, the patch I sent out was basically an example to show that it works for my use case. I wrote that I don't think the patch is ideal (in fact, I think it's an absolutely terrible solution to fix this). This is also the reason, why I just sent it as a snippet of code.

Please take a look at the code before the regression started to occur. It was implemented universally. These vibe coded patches are horrible compared to the original code. We are literally making an exemption for a specific CPU in a place where it shouldn't be. The actual correct solution would be to make a patch which works similarly to the pre-regression state.

If we are going to merge something that is made by a LLM we should at least make it good. Ideally made by an actual human.

Thanks for listening to my opinion.

Best regards,
Šimon Pospíchal

#12 lore raw
Quoted 13 lines · On 11/25/26 2:51 PM, 70sp wrote:

as I mentioned in the referenced regression thread I reported, the patch I sent out was basically an example to show that it works for my use case. I wrote that I don't think the patch is ideal (in fact, I think it's an absolutely terrible solution to fix this). This is also the reason, why I just sent it as a snippet of code.

Please take a look at the code before the regression started to occur. It was implemented universally. These vibe coded patches are horrible compared to the original code. We are literally making an exemption for a specific CPU in a place where it shouldn't be. The actual correct solution would be to make a patch which works similarly to the pre-regression state.

Quoted 2 lines

If we are going to merge something that is made by a LLM we should at least make it good. Ideally made by an actual human.

(+Lu, Jason and Joerg, signers/reviewers of the patch mentioned in the
Fixes: tag)

Is a better solution possible than the patch "iommu/vt-d: Disable
superpages on Haswell with integrated graphics" I posted here:
https://lore.kernel.org/linux-block/uJluFNYGCCrdvnYT3MatN_4Om8UczTJX_dzxumJxyCAC7F-Ubrekb7LPwlRxhCW0J91UBf-TqeRoJQfgYIYBRvMsPmE-Qs1eAg5zbDP0s58=@protonmail.com/T/#mc147f250c5356e3742ab3d30ccf6b4a3a8c4196b ?

Thanks,

Bart.

#13 lore raw
Quoted 27 lines · Bart Van Assche
Quoted 14 lines · On 11/25/26 2:51 PM, 70sp wrote:

as I mentioned in the referenced regression thread I reported, the patch I sent out was basically an example to show that it works for my use case. I wrote that I don't think the patch is ideal (in fact,
I think it's an absolutely terrible solution to fix this). This is also the reason, why I just sent it as a snippet of code.

Please take a look at the code before the regression started to occur. It was implemented universally. These vibe coded patches are horrible compared to the original code. We are literally making an exemption for a specific CPU in a place where it shouldn't be. The actual correct solution would be to make a patch which works similarly to the pre-regression state.

Quoted 2 lines

If we are going to merge something that is made by a LLM we should at least make it good. Ideally made by an actual human.

(+Lu, Jason and Joerg, signers/reviewers of the patch mentioned in the
Fixes: tag)

Is a better solution possible than the patch "iommu/vt-d: Disable superpages on Haswell with integrated graphics" I posted here:
https://lore.kernel.org/linux-block/uJluFNYGCCrdvnYT3MatN_4Om8UczTJX_dzxumJxyCAC7F-Ubrekb7LPwlRxhCW0J91UBf-TqeRoJQfgYIYBRvMsPmE-Qs1eAg5zbDP0s58=@protonmail.com/T/#mc147f250c5356e3742ab3d30ccf6b4a3a8c4196b

?

Quoted 3 lines

Thanks,

Bart.

@Simon,
To be clear, What I tested was the patch Bart suggested. Not your original suggestion. We will still need a test from Tobias to make sure.

Thanks
Laurence

#14 lore raw
Quoted 7 lines

@Simon,
To be clear, What I tested was the patch Bart suggested. Not your original suggestion. We will still need a test from Tobias to make sure.

Thanks
Laurence

I know. Mine and Barts patches work on the same basis. I just said my opinion in general about this solution. I know we need a test from Tobias to confirm whether it's exactly this and not something else related to superpages. I just wanted to make sure everyone knows that it was just a patch made to confirm the exact issue, not the one that should be in mainline.

Thank you.

Šimon Pospíchal

#15 lore raw

Hi all,

I have taken a look at the patches and the entire problem much more in depth, and there probably isn't a significantly better variant to do this.

In the state before the regression, the kernel was assigning smaller page sizes for some cases, so it wasn't ideal as I thought. I also haven't found a better place for the quirk to belong as there are already exemptions for specific platforms in the code (I thought there weren't). This one is probably fine.

I am sorry to Bart and Laurence who had to handle this. I thought my patch was bad, so I thought the same about Barts, but it looks like it's the correct way to approach it.

I was told to repost my patch formally by Lu Baolu ( https://lore.kernel.org/regressions/[email protected]/ ), probably because it fixes at least my case.

I think we should wait for confirmation from Tobias and if it's positive, we can send out the final patch closing both cases.

Thank you for listening to me.

Best regards,
Šimon Pospíchal

#16 lore raw
Quoted 14 lines · On 11/27/26 5:57 AM, 70sp wrote:

I have taken a look at the patches and the entire problem much more in depth, and there probably isn't a significantly better variant to do this.

In the state before the regression, the kernel was assigning smaller page sizes for some cases, so it wasn't ideal as I thought. I also haven't found a better place for the quirk to belong as there are already exemptions for specific platforms in the code (I thought there weren't). This one is probably fine.

I am sorry to Bart and Laurence who had to handle this. I thought my patch was bad, so I thought the same about Barts, but it looks like it's the correct way to approach it.

Quoted 7 lines

I was told to repost my patch formally by Lu Baolu ( https://
lore.kernel.org/regressions/d931a389-c143-4a6a-931c- [email protected]/ ), probably because it fixes at least my case.

I think we should wait for confirmation from Tobias and if it's positive, we can send out the final patch closing both cases.

My LLM came up with the (entirely untested) patch below after I asked it to generalize an earlier patch:

Subject: [PATCH] iommu/vt-d: Disable superpages when legacy IGD engine lacks them

Disable Intel VT-d superpages on bare-metal systems when the Intel integrated graphics device (0000:00:02.0) is behind a dedicated legacy (non-scalable-mode) VT-d engine that reports CAP.SLLPS == 0 while an active remapping unit advertises superpage support.

Per Intel Core processor datasheets (e.g. document 328897, section 3.1.2 for 4th Generation Core / Haswell), the integrated graphics VT-d engine does not support super-pages and BIOS must disable super-pages in the default VT-d engine while integrated graphics is enabled. Several BIOSes leave CAP.SLLPS set on the default engine (dmar1). Whenever Linux installs a 2 MiB or 1 GiB leaf entry (PS=1) on dmar1, hardware aborts DMA with fault reason 0x0c ("non-zero reserved fields in PTE"), breaking VFIO passthrough, discrete GPUs, audio, and AHCI storage (exposed by default once BLK_DEF_MAX_SECTORS_CAP increased to 4 MiB in v6.17).

Prior to commit c376a3456d8b ("iommu/vt-d: Remove domain_update_iommu_cap()"), domain_update_iommu_superpage() intersected superpage support across all active IOMMUs, so the IGD unit (SLLPS=0) masked off superpages on dmar1. After that commit, dmar1 domains started honoring dmar1's advertised CAP.SLLPS.

Check the hardware capability directly instead of matching hardcoded CPU model IDs. During intel_iommu_init(), look up the Intel integrated graphics device at 0000:00:02.0, find its matched non-INCLUDE_ALL DRHD unit, and clear intel_iommu_superpage before allocating any paging domains if that unit is a legacy engine (ECAP.SMTS == 0) without superpage support (CAP.SLLPS == 0) while an active IOMMU advertises CAP.SLLPS. Skip virtualized guests, untrusted PCI devices, systems without integrated graphics, and newer generations whose IGD VT-d engine supports superpages or scalable mode.

---
 drivers/iommu/intel/iommu.c | 48 +++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
drivers/iommu/intel/iommu.c +48 -0
index 5a2e705a2f2e..d2c03bec22e9 100644
@@ -43,6 +43,7 @@
 
 #define DEFAULT_DOMAIN_ADDRESS_WIDTH 57
 
+static void __init check_igfx_superpage(void);
 static void __init check_tylersburg_isoch(void);
 static int intel_iommu_set_dirty_tracking(struct iommu_domain *domain,
 					  bool enable);
@@ -2762,6 +2763,7 @@ int __init intel_iommu_init(void)
 		pr_info("No SATC found\n");
 
 	init_no_remapping_devices();
+	check_igfx_superpage();
 
 	ret = init_dmars();
 	if (ret) {
@@ -4266,6 +4268,52 @@ static void __init check_tylersburg_isoch(void)
 	       vtisochctrl);
 }
 
+/*
+ * Per Intel Core processor datasheets (e.g. document 328897, section 3.1.2),
+ * when the integrated graphics VT-d engine does not support super-pages
+ * (CAP.SLLPS == 0), BIOS must disable super-pages in the default VT-d engine
+ * while integrated graphics is enabled. Some BIOSes leave CAP.SLLPS set on
+ * the default engine, causing fault reason 0x0c (non-zero reserved fields in
+ * PTE) when a 2 MiB or 1 GiB superpage mapping is used.
+ */
+static void __init check_igfx_superpage(void)
+{
+	struct dmar_drhd_unit *drhd, *igfx_drhd;
+	struct intel_iommu *iommu;
+	struct pci_dev *pdev;
+
+	if (!intel_iommu_superpage ||
+	    cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
+		return;
+
+	pdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(2, 0));
+	if (!pdev)
+		return;
+
+	if (pdev->vendor != PCI_VENDOR_ID_INTEL || !IS_GFX_DEVICE(pdev) ||
+	    risky_device(pdev)) {
+		pci_dev_put(pdev);
+		return;
+	}
+
+	igfx_drhd = dmar_find_matched_drhd_unit(pdev);
+	pci_dev_put(pdev);
+	if (!igfx_drhd || !igfx_drhd->iommu || igfx_drhd->include_all)
+		return;
+
+	if (ecap_smts(igfx_drhd->iommu->ecap) ||
+	    cap_super_page_val(igfx_drhd->iommu->cap))
+		return;
+
+	for_each_active_iommu(iommu, drhd) {
+		if (cap_super_page_val(iommu->cap)) {
+			intel_iommu_superpage = 0;
+			pr_info("Disabling superpages because integrated graphics VT-d engine lacks superpage support\n");
+			break;
+		}
+	}
+}
+
 /*
  * Here we deal with a device TLB defect where device may 

inadvertently issue ATS
* invalidation completion before posted writes initiated with
translated address

#17 lore raw
Quoted 171 lines · Bart Van Assche
Quoted 17 lines · On 11/27/26 5:57 AM, 70sp wrote:

I have taken a look at the patches and the entire problem much more in depth, and there probably isn't a significantly better variant to
do this.

In the state before the regression, the kernel was assigning smaller
page sizes for some cases, so it wasn't ideal as I thought. I also haven't found a better place for the quirk to belong as there are already exemptions for specific platforms in the code (I thought there weren't). This one is probably fine.

I am sorry to Bart and Laurence who had to handle this. I thought my
patch was bad, so I thought the same about Barts, but it looks like it's the correct way to approach it.

Quoted 7 lines

I was told to repost my patch formally by Lu Baolu ( https://
lore.kernel.org/regressions/d931a389-c143-4a6a-931c- [email protected]/ ), probably because it fixes at least my case.

I think we should wait for confirmation from Tobias and if it's positive, we can send out the final patch closing both cases.

My LLM came up with the (entirely untested) patch below after I asked it to generalize an earlier patch:

Subject: [PATCH] iommu/vt-d: Disable superpages when legacy IGD engine
lacks them

Disable Intel VT-d superpages on bare-metal systems when the Intel integrated graphics device (0000:00:02.0) is behind a dedicated legacy
(non-scalable-mode) VT-d engine that reports CAP.SLLPS == 0 while an active remapping unit advertises superpage support.

Per Intel Core processor datasheets (e.g. document 328897, section 3.1.2
for 4th Generation Core / Haswell), the integrated graphics VT-d engine
does not support super-pages and BIOS must disable super-pages in the default VT-d engine while integrated graphics is enabled. Several BIOSes
leave CAP.SLLPS set on the default engine (dmar1). Whenever Linux installs
a 2 MiB or 1 GiB leaf entry (PS=1) on dmar1, hardware aborts DMA with fault reason 0x0c ("non-zero reserved fields in PTE"), breaking VFIO passthrough, discrete GPUs, audio, and AHCI storage (exposed by default
once BLK_DEF_MAX_SECTORS_CAP increased to 4 MiB in v6.17).

Prior to commit c376a3456d8b ("iommu/vt-d: Remove domain_update_iommu_cap()"), domain_update_iommu_superpage() intersected
superpage support across all active IOMMUs, so the IGD unit (SLLPS=0) masked off superpages on dmar1. After that commit, dmar1 domains started
honoring dmar1's advertised CAP.SLLPS.

Check the hardware capability directly instead of matching hardcoded CPU
model IDs. During intel_iommu_init(), look up the Intel integrated graphics device at 0000:00:02.0, find its matched non-INCLUDE_ALL DRHD
unit, and clear intel_iommu_superpage before allocating any paging domains if that unit is a legacy engine (ECAP.SMTS == 0) without superpage support (CAP.SLLPS == 0) while an active IOMMU advertises CAP.SLLPS. Skip virtualized guests, untrusted PCI devices, systems without integrated graphics, and newer generations whose IGD VT-d engine
supports superpages or scalable mode.

Fixes c376a3456d8b ("iommu/vt-d: Remove domain_update_iommu_cap()")

Closes:
https://lore.kernel.org/linux-block/[email protected]/

Closes:
https://lore.kernel.org/r/HYhMd0Klo0XE_yiVY7XmsgyKKFDwKHfKRy22KrycLcYd0V_ykA4xdbBMJXkA07YX3os6qK-NhMIVi6ITo-CkNIIF0e-GcI0UwwZmdDhAJ0I=@protonmail.com
Cc: [email protected]
---
  drivers/iommu/intel/iommu.c | 48
+++++++++++++++++++++++++++++++++++++

  1 file changed, 48 insertions(+)
drivers/iommu/intel/iommu.c +1 -0
index 5a2e705a2f2e..d2c03bec22e9 100644
@@ -43,6 +43,7 @@
 
   #define DEFAULT_DOMAIN_ADDRESS_WIDTH 57
 
+static void __init check_igfx_superpage(void);
   static void __init check_tylersburg_isoch(void);

  static int intel_iommu_set_dirty_tracking(struct iommu_domain *domain,
     bool enable);

drivers/iommu/intel/iommu.c +3 -0
@@ -2762,6 +2763,7 @@ int __init intel_iommu_init(void)
   		pr_info("No SATC found\n");
 
   	init_no_remapping_devices();
+	check_igfx_superpage();
 
   	ret = init_dmars();
   	if (ret) {
@@ -4266,6 +4268,52 @@ static void __init
 check_tylersburg_isoch(void)
   	       vtisochctrl);
   }
 
+/*
+ * Per Intel Core processor datasheets (e.g. document 328897,

section
3.1.2),
+ * when the integrated graphics VT-d engine does not support super- pages
+ * (CAP.SLLPS == 0), BIOS must disable super-pages in the default VT-d
engine
+ * while integrated graphics is enabled. Some BIOSes leave CAP.SLLPS set on
+ * the default engine, causing fault reason 0x0c (non-zero reserved fields in
+ * PTE) when a 2 MiB or 1 GiB superpage mapping is used.
+ */

drivers/iommu/intel/iommu.c +15 -0
+static void __init check_igfx_superpage(void)
+{
+	struct dmar_drhd_unit *drhd, *igfx_drhd;
+	struct intel_iommu *iommu;
+	struct pci_dev *pdev;
+
+	if (!intel_iommu_superpage ||
+	    cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
+		return;
+
+	pdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(2, 0));
+	if (!pdev)
+		return;
+
+	if (pdev->vendor != PCI_VENDOR_ID_INTEL ||

!IS_GFX_DEVICE(pdev) ||

drivers/iommu/intel/iommu.c +8 -0
+	    risky_device(pdev)) {
+		pci_dev_put(pdev);
+		return;
+	}
+
+	igfx_drhd = dmar_find_matched_drhd_unit(pdev);
+	pci_dev_put(pdev);
+	if (!igfx_drhd || !igfx_drhd->iommu || igfx_drhd-
Quoted 1 line

include_all)

drivers/iommu/intel/iommu.c +10 -0
+		return;
+
+	if (ecap_smts(igfx_drhd->iommu->ecap) ||
+	    cap_super_page_val(igfx_drhd->iommu->cap))
+		return;
+
+	for_each_active_iommu(iommu, drhd) {
+		if (cap_super_page_val(iommu->cap)) {
+			intel_iommu_superpage = 0;
+			pr_info("Disabling superpages because

integrated graphics VT-d
engine lacks superpage support\n");

drivers/iommu/intel/iommu.c +5 -0
+			break;
+		}
+	}
+}
+
Quoted 8 lines

  /*
   * Here we deal with a device TLB defect where device may inadvertently issue ATS
   * invalidation completion before posted writes initiated with translated address

Hi Bart,

Tested your generalized version (check_igfx_superpage) on v7.4-rc5 on a non-affected platform, to check it does not misfire: Coffee Lake i7-8700, Cannon Lake PCH AHCI, intel_iommu=on.

  dmar0 (igfx): cap 1c0000c40660462 ecap 19e2ff0505e  (SLLPS = 2M|1G)
  dmar1:        cap d2008c40660462  ecap f050da       (SLLPS = 2M|1G)

As expected, the quirk does not trigger (the igfx DRHD reports superpage support, so it returns early). Superpages remain in use:
domain_translation_struct shows 2 MiB leaf PDEs (e.g. 0x0000000136a00082) during 2M O_DIRECT reads from hugepage-backed buffers against a SATA SSD, with no DMAR or ATA errors.

I don't have affected hardware, so Tobias's results (iGPU enabled and disabled) are what confirm the fix itself.

Regards,
Laurence

#18 lore raw

Hello,

Just a quick update from me. Broadwell might also be affected. It has some sort of workaround for iGPUs and I'll try to dig up more information about it.

I found the completely same paragraph in both documentations:
Intel VT-d superpage: support of Intel VT-d superpage (2 MB, 1 GB) for the default Intel VT-d engine (that covers all devices except IGD) IGD Intel VT-d engine does not support superpage and BIOS should disable superpage in default Intel VT-d engine when iGFX is enabled.

Haswell:
Page 43
https://cdrdv2-public.intel.com/328897/4th-gen-core-family-desktop-vol-1-datasheet.pdf

Broadwell:
Page 43
https://m.media-amazon.com/images/I/B1coNJwn%2BlS.pdf

#19 lore raw
Quoted 8 lines · On Saturday, December 5th, 2026 at 1:12 PM, 70sp <[email protected]> wrote:

Hello,

Just a quick update from me. Broadwell might also be affected. It has some sort of workaround for iGPUs and I'll try to dig up more information about it.

I found the completely same paragraph in both documentations:
Intel VT-d superpage: support of Intel VT-d superpage (2 MB, 1 GB) for the default Intel VT-d engine (that covers all devices except IGD) IGD Intel VT-d engine does not support superpage and BIOS should disable superpage in default Intel VT-d engine when iGFX is enabled.

Quoted 7 lines

Haswell:
Page 43
https://cdrdv2-public.intel.com/328897/4th-gen-core-family-desktop-vol-1-datasheet.pdf

Broadwell:
Page 43
https://m.media-amazon.com/images/I/B1coNJwn%2BlS.pdf

I've found that this exactly same paragraph is actually present at least from Ivy Bridge to Rocket Lake. We know that the issue is definitely not present on some of these CPUs. I am a little confused. Will continue looking into this.

#20 lore raw
In reply to 70sp

Am 27.11.2026 14:57 schrieb 70sp:

Quoted 12 lines

Hi all,

I have taken a look at the patches and the entire problem much more in depth, and there probably isn't a significantly better variant to do this.

In the state before the regression, the kernel was assigning smaller page sizes for some cases, so it wasn't ideal as I thought. I also haven't found a better place for the quirk to belong as there are already exemptions for specific platforms in the code (I thought there weren't). This one is probably fine.

Quoted 7 lines

I am sorry to Bart and Laurence who had to handle this. I thought my patch was bad, so I thought the same about Barts, but it looks like it's the correct way to approach it.

I was told to repost my patch formally by Lu Baolu (
https://lore.kernel.org/regressions/[email protected]/
), probably because it fixes at least my case.

Hi Šimon,

thanks for the update. I highly appreciate your high standards.

I see that your patch sets intel_iommu_superpage=0 similarly to the sp_off command line parameter on Haswell desktop&mobile, whose datasheets (volume 1) all say: "IGD Intel VT-d engine does not support superpage and BIOS should disable superpage in default Intel VT-d engine when iGFX is enabled." I just wonder whether one can use superpages in the default VT-d engine when the iGFX is disabled. If this was the case, an additional check whether the iGFX is enabled similarly to Bart's patch (or by checking bit 4 of the DEVEN register, see section 3.1.14 of volume 2 of the datasheets) would be great.

Quoted 2 lines

I think we should wait for confirmation from Tobias and if it's positive, we can send out the final patch closing both cases.

From what I can tell, the patch is highly likely to fix the issue, because it automatically sets intel_iommu_superpage=0 similarly to the sp_off command line parameter that I tested, which resolved the problem. I am afraid I have only limited access to the system at the moment, and other than my question above, I don't want to delay the process, because the patch works correctly on your Haswell system as far as I have understood, and because setting intel_iommu_superpage=0 with your patch is the same for all Haswell systems.

Best regards,
Tobias Laas

Quoted 4 lines

Thank you for listening to me.

Best regards,
Šimon Pospíchal

#21 lore raw

Hello Tobias,

Quoted 1 line

thanks for the update. I highly appreciate your high standards.

Thank you.

Quoted 9 lines

I see that your patch sets intel_iommu_superpage=0 similarly to the sp_off command line parameter on Haswell desktop&mobile, whose datasheets (volume 1) all say: "IGD Intel VT-d engine does not support superpage and BIOS should disable superpage in default Intel VT-d engine when iGFX is enabled." I just wonder whether one can use superpages in the default VT-d engine when the iGFX is disabled. If this was the case, an additional check whether the iGFX is enabled similarly to Bart's patch (or by checking bit 4 of the DEVEN register, see section 3.1.14 of volume 2 of the datasheets) would be great.

Superpages should theoretically work as expected when the iGPU is disabled. I haven't tested it though.

Bart's patch is more universal than what I sent out in my regression thread, after all, as I already said, I generated that one just to test it. I'd like to take a deeper look at possible approaches to this.

Quoted 11 lines
Quoted 2 lines

I think we should wait for confirmation from Tobias and if it's positive, we can send out the final patch closing both cases.

From what I can tell, the patch is highly likely to fix the issue,
because it automatically sets intel_iommu_superpage=0 similarly to the sp_off command line parameter that I tested, which resolved the problem. I am afraid I have only limited access to the system at the moment, and other than my question above, I don't want to delay the process, because the patch works correctly on your Haswell system as far as I have understood, and because setting intel_iommu_superpage=0 with your patch is the same for all Haswell systems.

Quoted 2 lines

Best regards,
Tobias Laas

Since the "intel_iommu=on,sp_off" kernel parameter fixed your issue, I agree that it is highly likely that the patch will do the same. The only difference in the patch are the checks compared to just using the kernel parameter. I wanted to double check just in case something unbeknownst to us was going on.

I would really like to work on the final patch, but I sadly cannot do so until Friday. I am not going to have access to the affected machine or enough time for this until then.

So to conclude, if anybody makes a patch, feel free to send it here and I'll test it when I can.

It's also possible to use any of the patches that were already sent out here, but right now I cannot evaluate which one would be the best or how we could alter them to make them better.

If Bart or anyone else wants to submit their patch for review, there’s no need to wait for me.

Thanks to everybody.

Best regards,
Šimon Pospíchal

#22 lore raw
In reply to Bart Van Assche
Quoted 14 lines · Bart Van Assche
Quoted 13 lines · On 11/25/26 2:51 PM, 70sp wrote:

as I mentioned in the referenced regression thread I reported, the patch I sent out was basically an example to show that it works for my use case. I wrote that I don't think the patch is ideal (in fact, I think it's an absolutely terrible solution to fix this). This is also the reason, why I just sent it as a snippet of code.

Please take a look at the code before the regression started to occur. It was implemented universally. These vibe coded patches are horrible compared to the original code. We are literally making an exemption for a specific CPU in a place where it shouldn't be. The actual correct solution would be to make a patch which works similarly to the pre-regression state.

Quoted 8 lines
Quoted 2 lines

If we are going to merge something that is made by a LLM we should at least make it good. Ideally made by an actual human.

(+Lu, Jason and Joerg, signers/reviewers of the patch mentioned in the
Fixes: tag)

Is a better solution possible than the patch "iommu/vt-d: Disable
superpages on Haswell with integrated graphics" I posted here:
https://lore.kernel.org/linux-block/ uJluFNYGCCrdvnYT3MatN_4Om8UczTJX_dzxumJxyCAC7F-Ubrekb7LPwlRxhCW0J91UBf- [email protected]/T/ #mc147f250c5356e3742ab3d30ccf6b4a3a8c4196b ?

I noticed that there is a similar fix here

https://lore.kernel.org/linux-iommu/[email protected]/

Thanks,
baolu

#23 lore raw
Quoted 28 lines · Baolu Lu
Quoted 19 lines · Bart Van Assche
Quoted 13 lines · On 11/25/26 2:51 PM, 70sp wrote:

as I mentioned in the referenced regression thread I reported, the patch I sent out was basically an example to show that it works for my use case. I wrote that I don't think the patch is ideal (in fact, I think it's an absolutely terrible solution to fix this). This is also the reason, why I just sent it as a snippet of code.

Please take a look at the code before the regression started to occur. It was implemented universally. These vibe coded patches are horrible compared to the original code. We are literally making an exemption for a specific CPU in a place where it shouldn't be. The actual correct solution would be to make a patch which works similarly to the pre-regression state.

Quoted 2 lines

If we are going to merge something that is made by a LLM we should at least make it good. Ideally made by an actual human.

(+Lu, Jason and Joerg, signers/reviewers of the patch mentioned in the
Fixes: tag)

Quoted 7 lines

Is a better solution possible than the patch "iommu/vt-d: Disable superpages on Haswell with integrated graphics" I posted here:
https://lore.kernel.org/linux-block/
uJluFNYGCCrdvnYT3MatN_4Om8UczTJX_dzxumJxyCAC7F- Ubrekb7LPwlRxhCW0J91UBf- TqeRoJQfgYIYBRvMsPmE- [email protected]/T/ #mc147f250c5356e3742ab3d30ccf6b4a3a8c4196b ?

Quoted 4 lines

I noticed that there is a similar fix here

https://lore.kernel.org/linux-iommu/20260929151832.80069-1-
[email protected]/

I might have missed something, but it looks like this is stalled again. And no wonder, even I feel uncertain here, as there are multiple threads and fixes (some of them similar) for the problem. Will likely be similar for maintainers, so I suspect none will take a closer look at those fixes unless someone re-submits one as the agreed on path forward freshly, containing all Reported-by and Links to earlier discussions (the one from Bart gets close already from what I see, unless I missed/misunderstood something, which is quite possible).

Baolu Lu, could you maybe take care of this, given that you authored the culprit, even if that was quite a while ago? Unless somebody has a better idea.

Ciao, Thorsten

#24 lore raw

Am 4. Dezember 2026 09:51:41 MEZ schrieb Thorsten Leemhuis <[email protected]>:

Quoted 43 lines · Baolu Lu
Quoted 28 lines · Bart Van Assche
Quoted 19 lines · On 11/25/26 2:51 PM, 70sp wrote:
Quoted 13 lines

as I mentioned in the referenced regression thread I reported, the patch I sent out was basically an example to show that it works for my use case. I wrote that I don't think the patch is ideal (in fact, I think it's an absolutely terrible solution to fix this). This is also the reason, why I just sent it as a snippet of code.

Please take a look at the code before the regression started to occur. It was implemented universally. These vibe coded patches are horrible compared to the original code. We are literally making an exemption for a specific CPU in a place where it shouldn't be. The actual correct solution would be to make a patch which works similarly to the pre-regression state.

Quoted 2 lines

If we are going to merge something that is made by a LLM we should at least make it good. Ideally made by an actual human.

(+Lu, Jason and Joerg, signers/reviewers of the patch mentioned in the
Fixes: tag)

Quoted 7 lines

Is a better solution possible than the patch "iommu/vt-d: Disable superpages on Haswell with integrated graphics" I posted here:
https://lore.kernel.org/linux-block/
uJluFNYGCCrdvnYT3MatN_4Om8UczTJX_dzxumJxyCAC7F- Ubrekb7LPwlRxhCW0J91UBf- TqeRoJQfgYIYBRvMsPmE- [email protected]/T/ #mc147f250c5356e3742ab3d30ccf6b4a3a8c4196b ?

Quoted 4 lines

I noticed that there is a similar fix here

https://lore.kernel.org/linux-iommu/20260929151832.80069-1-
[email protected]/

I might have missed something, but it looks like this is stalled again. And no wonder, even I feel uncertain here, as there are multiple threads and fixes (some of them similar) for the problem. Will likely be similar for maintainers, so I suspect none will take a closer look at those fixes unless someone re-submits one as the agreed on path forward freshly, containing all Reported-by and Links to earlier discussions (the one from Bart gets close already from what I see, unless I missed/misunderstood something, which is quite possible).

Quoted 3 lines

Baolu Lu, could you maybe take care of this, given that you authored the culprit, even if that was quite a while ago? Unless somebody has a better idea.

Hi Thorsten,

I am afraid it is not clear yet whether superpages also need to be disabled when the iGFX is disabled. Please bear with me. I would like to test this over the weekend.

Best regards,
Tobias Laas

Quoted 1 line

Ciao, Thorsten

#25 lore raw
Quoted 66 lines · Tobias Laas

Am 4. Dezember 2026 09:51:41 MEZ schrieb Thorsten Leemhuis <[email protected]>:

Quoted 58 lines · Baolu Lu
Quoted 39 lines · Bart Van Assche
Quoted 29 lines · On 11/25/26 2:51 PM, 70sp wrote:
Quoted 21 lines

as I mentioned in the referenced regression thread I reported, the
patch I sent out was basically an example to show that it works for
my use case. I wrote that I don't think the patch is ideal (in fact,
I think it's an absolutely terrible solution to fix this). This is
also the reason, why I just sent it as a snippet of code.

Please take a look at the code before the regression started to
occur. It was implemented universally. These vibe coded patches are
horrible compared to the original code. We are literally making an
exemption for a specific CPU in a place where it shouldn't be. The
actual correct solution would be to make a patch which works similarly to the pre-regression state.

Quoted 3 lines

If we are going to merge something that is made by a LLM we should
at least make it good. Ideally made by an actual human.

(+Lu, Jason and Joerg, signers/reviewers of the patch mentioned in the
Fixes: tag)

Quoted 8 lines

Is a better solution possible than the patch "iommu/vt-d:
Disable
superpages on Haswell with integrated graphics" I posted here:
https://lore.kernel.org/linux-block/
uJluFNYGCCrdvnYT3MatN_4Om8UczTJX_dzxumJxyCAC7F- Ubrekb7LPwlRxhCW0J91UBf- TqeRoJQfgYIYBRvMsPmE- [email protected]/T/ #mc147f250c5356e3742ab3d30ccf6b4a3a8c4196b ?

Quoted 4 lines

I noticed that there is a similar fix here

https://lore.kernel.org/linux-iommu/20260929151832.80069-1-
[email protected]/

I might have missed something, but it looks like this is stalled again.
And no wonder, even I feel uncertain here, as there are multiple threads
and fixes (some of them similar) for the problem. Will likely be similar
for maintainers, so I suspect none will take a closer look at those fixes unless someone re-submits one as the agreed on path forward freshly, containing all Reported-by and Links to earlier discussions
(the one from Bart gets close already from what I see, unless I missed/misunderstood something, which is quite possible).

Quoted 4 lines

Baolu Lu, could you maybe take care of this, given that you authored the
culprit, even if that was quite a while ago? Unless somebody has a better idea.

Quoted 10 lines

Hi Thorsten,

I am afraid it is not clear yet whether superpages also need to be disabled when the iGFX is disabled.
Please bear with me. I would like to test this over the weekend.

Best regards,
Tobias Laas

Quoted 1 line

Ciao, Thorsten

Hi Tobias,

Thanks, that is a useful thing to settle, because Bart's generalized patch keys on the iGPU being present: with the iGPU disabled in BIOS, 00:02.0 normally disappears and the quirk does not trigger, so superpages stay enabled.

A suggested test, so the result answers the question directly:

1. Disable the iGPU in BIOS, boot an unpatched kernel with intel_iommu=on (no sp_off) and the default 4 MiB cap.
2. Capture:
dmesg | grep -E 'DMAR: (DRHD|dmar[0-9])'
lspci -s 00:02.0
It would be interesting to see whether the BIOS then drops the igfx DRHD entirely and/or changes CAP.SLLPS on the remaining unit.
3. Generate large I/O on the SATA SSD (normal boot plus a large

     sequential read is enough; with hugepages, e.g.
       fio --name=sp --filename=/dev/sdX --direct=1 --readonly \
           --rw=read --bs=2M --iomem=mmaphuge --iodepth=8 \
           --ioengine=libaio --runtime=30 --time_based
     after echo 64 > /proc/sys/vm/nr_hugepages) and check for DMAR
     fault reason 0x0c.

If that is clean, the quirk only needs to apply while the iGPU is enabled, which matches the datasheet wording and Bart's v2. If it still faults, the quirk would need to key on the platform rather than on the presence of the iGPU.

I'm building Bart's generalized version now and will confirm it is a no-op on a non-affected platform (Coffee Lake, both DRHDs report SLLPS = 2M|1G), as I did for the first version.

Regards,
Laurence

#26 lore raw

Am 04.12.2026 14:22 schrieb Laurence Oberman:

Quoted 85 lines · Tobias Laas
Quoted 64 lines

Am 4. Dezember 2026 09:51:41 MEZ schrieb Thorsten Leemhuis <[email protected]>:

Quoted 58 lines · Baolu Lu
Quoted 39 lines · Bart Van Assche
Quoted 29 lines · On 11/25/26 2:51 PM, 70sp wrote:
Quoted 21 lines

as I mentioned in the referenced regression thread I reported, the
patch I sent out was basically an example to show that it works for
my use case. I wrote that I don't think the patch is ideal (in fact,
I think it's an absolutely terrible solution to fix this). This is
also the reason, why I just sent it as a snippet of code.

Please take a look at the code before the regression started to
occur. It was implemented universally. These vibe coded patches are
horrible compared to the original code. We are literally making an
exemption for a specific CPU in a place where it shouldn't be. The
actual correct solution would be to make a patch which works similarly to the pre-regression state.

Quoted 3 lines

If we are going to merge something that is made by a LLM we should
at least make it good. Ideally made by an actual human.

(+Lu, Jason and Joerg, signers/reviewers of the patch mentioned in the
Fixes: tag)

Quoted 8 lines

Is a better solution possible than the patch "iommu/vt-d:
Disable
superpages on Haswell with integrated graphics" I posted here:
https://lore.kernel.org/linux-block/
uJluFNYGCCrdvnYT3MatN_4Om8UczTJX_dzxumJxyCAC7F- Ubrekb7LPwlRxhCW0J91UBf- TqeRoJQfgYIYBRvMsPmE- [email protected]/T/ #mc147f250c5356e3742ab3d30ccf6b4a3a8c4196b ?

Quoted 4 lines

I noticed that there is a similar fix here

https://lore.kernel.org/linux-iommu/20260929151832.80069-1-
[email protected]/

I might have missed something, but it looks like this is stalled again.
And no wonder, even I feel uncertain here, as there are multiple threads
and fixes (some of them similar) for the problem. Will likely be similar
for maintainers, so I suspect none will take a closer look at those fixes unless someone re-submits one as the agreed on path forward freshly, containing all Reported-by and Links to earlier discussions
(the one from Bart gets close already from what I see, unless I missed/misunderstood something, which is quite possible).

Quoted 4 lines

Baolu Lu, could you maybe take care of this, given that you authored the
culprit, even if that was quite a while ago? Unless somebody has a better idea.

Quoted 10 lines

Hi Thorsten,

I am afraid it is not clear yet whether superpages also need to be disabled when the iGFX is disabled.
Please bear with me. I would like to test this over the weekend.

Best regards,
Tobias Laas

Quoted 1 line

Ciao, Thorsten

Hi Tobias,

Thanks, that is a useful thing to settle, because Bart's generalized patch keys on the iGPU being present: with the iGPU disabled in BIOS, 00:02.0 normally disappears and the quirk does not trigger, so superpages stay enabled.

A suggested test, so the result answers the question directly:

Quoted 7 lines

1. Disable the iGPU in BIOS, boot an unpatched kernel with intel_iommu=on (no sp_off) and the default 4 MiB cap.
2. Capture:
dmesg | grep -E 'DMAR: (DRHD|dmar[0-9])'
lspci -s 00:02.0
It would be interesting to see whether the BIOS then drops the igfx DRHD entirely and/or changes CAP.SLLPS on the remaining unit.

Hi Laurence,

with Bart's patch (v1) applied and the igfx enabled, dmesg | grep DMAR shows:

[    0.007882] ACPI: DMAR 0x00000000AD612860 0000B8 (v01 INTEL  BDW      00000001 INTL 00000001)
[    0.007894] ACPI: Reserving DMAR table memory at [mem 0xad612860-0xad612917]
[    0.018342] DMAR: IOMMU enabled
[    0.060021] DMAR: Host address width 39
[    0.060023] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[    0.060028] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c0000020660462 ecap f0101a
[    0.060032] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[    0.060036] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c20660462 ecap f010da
[    0.060039] DMAR: RMRR base: 0x000000ade9f000 end: 0x000000adeadfff
[    0.060042] DMAR: RMRR base: 0x000000af000000 end: 0x000000bf1fffff
[    0.060045] DMAR-IR: IOAPIC id 8 under DRHD base  0xfed91000 IOMMU 1
[    0.060048] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[    0.060050] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt out bit.
[    0.060051] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the BIOS setting.
[    0.060535] DMAR-IR: Enabled IRQ remapping in xapic mode
[    2.264853] DMAR: No ATSR found
[    2.264854] DMAR: No SATC found
[    2.264857] DMAR: Disabling superpages on Haswell with integrated graphics
[    2.264859] DMAR: dmar0: Using Queued invalidation
[    2.264865] DMAR: dmar1: Using Queued invalidation
[    2.267816] DMAR: Intel(R) Virtualization Technology for Directed I/O
[    7.969686] i915 0000:00:02.0: [drm] DMAR active, disabling use of stolen memory
and with the igfx disabled:
[    0.007714] ACPI: DMAR 0x00000000CE612860 000080 (v01 INTEL  BDW      00000001 INTL 00000001)
[    0.007725] ACPI: Reserving DMAR table memory at [mem 0xce612860-0xce6128df]
[    0.018851] DMAR: IOMMU enabled
[    0.061424] DMAR: Host address width 39
[    0.061426] DMAR: DRHD base: 0x000000fed90000 flags: 0x1
[    0.061432] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap d2008c20660462 ecap f010da
[    0.061435] DMAR: RMRR base: 0x000000cee9f000 end: 0x000000ceeadfff
[    0.061439] DMAR-IR: IOAPIC id 8 under DRHD base  0xfed90000 IOMMU 0
[    0.061442] DMAR-IR: HPET id 0 under DRHD base 0xfed90000
[    0.061444] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt out bit.
[    0.061445] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the BIOS setting.
[    0.061727] DMAR-IR: Enabled IRQ remapping in xapic mode
[    2.272842] DMAR: No ATSR found
[    2.272844] DMAR: No SATC found
[    2.272847] DMAR: dmar0: Using Queued invalidation
[    2.273427] DMAR: Intel(R) Virtualization Technology for Directed I/O

This means that when the igfx is disabled in the BIOS, it drops the corresponding DMAR unit entirely, but the capabilities stay the same.

Quoted 8 lines

3. Generate large I/O on the SATA SSD (normal boot plus a large

     sequential read is enough; with hugepages, e.g.
       fio --name=sp --filename=/dev/sdX --direct=1 --readonly \
           --rw=read --bs=2M --iomem=mmaphuge --iodepth=8 \
           --ioengine=libaio --runtime=30 --time_based
     after echo 64 > /proc/sys/vm/nr_hugepages) and check for DMAR
     fault reason 0x0c.
Quoted 4 lines

If that is clean, the quirk only needs to apply while the iGPU is enabled, which matches the datasheet wording and Bart's v2. If it still faults, the quirk would need to key on the platform rather than on the presence of the iGPU.

Yes this is clean: the quirk only needs to apply with the igfx enabled.
To be honest, among the proposed patches, I like Johnathan's approach ( https://lore.kernel.org/linux-iommu/[email protected]/ ) with the PCI fixup header best, because it runs earlier during boot than Šimon and Bart's approach:

[    0.007754] ACPI: DMAR 0x00000000AD612860 0000B8 (v01 INTEL  BDW      00000001 INTL 00000001)
[    0.007766] ACPI: Reserving DMAR table memory at [mem 0xad612860-0xad612917]
[    0.060655] DMAR: Host address width 39
[    0.060657] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[    0.060662] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c0000020660462 ecap f0101a
[    0.060666] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[    0.060670] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c20660462 ecap f010da
[    0.060673] DMAR: RMRR base: 0x000000ade9f000 end: 0x000000adeadfff
[    0.060676] DMAR: RMRR base: 0x000000af000000 end: 0x000000bf1fffff
[    0.060679] DMAR-IR: IOAPIC id 8 under DRHD base  0xfed91000 IOMMU 1
[    0.060682] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[    0.060684] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt out bit.
[    0.060685] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the BIOS setting.
[    0.061156] DMAR-IR: Enabled IRQ remapping in xapic mode
[    0.209289] pci 0000:00:02.0: DMAR: Disabling IOMMU superpages
[    2.268829] DMAR: No ATSR found
[    2.268830] DMAR: No SATC found
[    2.268832] DMAR: dmar0: Using Queued invalidation
[    2.268838] DMAR: dmar1: Using Queued invalidation
[    2.271780] DMAR: Intel(R) Virtualization Technology for Directed I/O
[    7.012104] i915 0000:00:02.0: [drm] DMAR active, disabling use of stolen memory

I have adapted it to match all Haswell igfx PCI IDs (see https://elixir.bootlin.com/linux/v7.4-rc2/source/include/drm/intel/pciids.h#L266 ) rather than the host bridge IDs, see below. I'd appreciate any feedback or suggestions for improvement.

Best regards,
Tobias Laas

drivers/iommu/intel/iommu.c +0 -0
index 5a2e705a2f2e..28ead5dfa009 100644
@@ -4143,6 +4143,76 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e30, quirk_iommu_rwbf);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e40, 

quirk_iommu_rwbf);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e90,
quirk_iommu_rwbf);

+static void quirk_iommu_no_superpage(struct pci_dev *dev)
+{
+ if (risky_device(dev))
+ return;
+ pci_info(dev, "Disabling IOMMU superpages\n");
+ intel_iommu_superpage = 0;
+}
+
+/* Haswell requires superpages to be disabled when integrated graphics is enabled */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A02, quirk_iommu_no_superpage); /* ULT GT1 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A06, quirk_iommu_no_superpage); /* ULT GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A0A, quirk_iommu_no_superpage); /* ULT GT1 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A0B, quirk_iommu_no_superpage); /* ULT GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A0E, quirk_iommu_no_superpage); /* ULX GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0402, quirk_iommu_no_superpage); /* GT1 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0406, quirk_iommu_no_superpage); /* GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x040A, quirk_iommu_no_superpage); /* GT1 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x040B, quirk_iommu_no_superpage); /* GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x040E, quirk_iommu_no_superpage); /* GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C02, quirk_iommu_no_superpage); /* SDV GT1 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C06, quirk_iommu_no_superpage); /* SDV GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C0A, quirk_iommu_no_superpage); /* SDV GT1 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C0B, quirk_iommu_no_superpage); /* SDV GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C0E, quirk_iommu_no_superpage); /* SDV GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D02, quirk_iommu_no_superpage); /* CRW GT1 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D06, quirk_iommu_no_superpage); /* CRW GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D0A, quirk_iommu_no_superpage); /* CRW GT1 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D0B, quirk_iommu_no_superpage); /* CRW GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D0E, quirk_iommu_no_superpage); /* CRW GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A12, quirk_iommu_no_superpage); /* ULT GT2 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A16, quirk_iommu_no_superpage); /* ULT GT2 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A1A, quirk_iommu_no_superpage); /* ULT GT2 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A1B, quirk_iommu_no_superpage); /* ULT GT2 reserved */\
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A1E, quirk_iommu_no_superpage); /* ULX GT2 mobile */\
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0412, quirk_iommu_no_superpage); /* GT2 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0416, quirk_iommu_no_superpage); /* GT2 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x041A, quirk_iommu_no_superpage); /* GT2 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x041B, quirk_iommu_no_superpage); /* GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x041E, quirk_iommu_no_superpage); /* GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C12, quirk_iommu_no_superpage); /* SDV GT2 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C16, quirk_iommu_no_superpage); /* SDV GT2 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C1A, quirk_iommu_no_superpage); /* SDV GT2 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C1B, quirk_iommu_no_superpage); /* SDV GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C1E, quirk_iommu_no_superpage); /* SDV GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D12, quirk_iommu_no_superpage); /* CRW GT2 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D16, quirk_iommu_no_superpage); /* CRW GT2 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D1A, quirk_iommu_no_superpage); /* CRW GT2 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D1B, quirk_iommu_no_superpage); /* CRW GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D1E, quirk_iommu_no_superpage); /* CRW GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A22, quirk_iommu_no_superpage); /* ULT GT3 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A26, quirk_iommu_no_superpage); /* ULT GT3 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A2A, quirk_iommu_no_superpage); /* ULT GT3 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A2B, quirk_iommu_no_superpage); /* ULT GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A2E, quirk_iommu_no_superpage); /* ULT GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0422, quirk_iommu_no_superpage); /* GT3 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0426, quirk_iommu_no_superpage); /* GT3 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x042A, quirk_iommu_no_superpage); /* GT3 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x042B, quirk_iommu_no_superpage); /* GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x042E, quirk_iommu_no_superpage); /* GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C22, quirk_iommu_no_superpage); /* SDV GT3 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C26, quirk_iommu_no_superpage); /* SDV GT3 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C2A, quirk_iommu_no_superpage); /* SDV GT3 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C2B, quirk_iommu_no_superpage); /* SDV GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C2E, quirk_iommu_no_superpage); /* SDV GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D22, quirk_iommu_no_superpage); /* CRW GT3 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D26, quirk_iommu_no_superpage); /* CRW GT3 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D2A, quirk_iommu_no_superpage); /* CRW GT3 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D2B, quirk_iommu_no_superpage); /* CRW GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D2E, quirk_iommu_no_superpage); /* CRW GT3 reserved */ +
#define GGC 0x52
#define GGC_MEMORY_SIZE_MASK (0xf << 8)
#define GGC_MEMORY_SIZE_NONE (0x0 << 8)

Quoted 6 lines

I'm building Bart's generalized version now and will confirm it is a no-op on a non-affected platform (Coffee Lake, both DRHDs report SLLPS = 2M|1G), as I did for the first version.

Regards,
Laurence

#27 lore raw
Quoted 390 lines · Tobias Laas

Am 04.12.2026 14:22 schrieb Laurence Oberman:

Quoted 102 lines · Tobias Laas
Quoted 80 lines

Am 4. Dezember 2026 09:51:41 MEZ schrieb Thorsten Leemhuis <[email protected]>:

Quoted 71 lines · Baolu Lu
Quoted 47 lines · Bart Van Assche
Quoted 36 lines · On 11/25/26 2:51 PM, 70sp wrote:
Quoted 26 lines

as I mentioned in the referenced regression thread I reported, the
patch I sent out was basically an example to show that it works for
my use case. I wrote that I don't think the patch is ideal
(in fact,
I think it's an absolutely terrible solution to fix this).
This is
also the reason, why I just sent it as a snippet of code.

Please take a look at the code before the regression started
to
occur. It was implemented universally. These vibe coded patches are
horrible compared to the original code. We are literally making an
exemption for a specific CPU in a place where it shouldn't
be. The
actual correct solution would be to make a patch which works
similarly to the pre-regression state.

Quoted 4 lines

If we are going to merge something that is made by a LLM we
should
at least make it good. Ideally made by an actual human.

(+Lu, Jason and Joerg, signers/reviewers of the patch mentioned
in the
Fixes: tag)

Quoted 9 lines

Is a better solution possible than the patch "iommu/vt-d:
Disable
superpages on Haswell with integrated graphics" I posted here:
https://lore.kernel.org/linux-block/
uJluFNYGCCrdvnYT3MatN_4Om8UczTJX_dzxumJxyCAC7F- Ubrekb7LPwlRxhCW0J91UBf- TqeRoJQfgYIYBRvMsPmE- [email protected]/T/ #mc147f250c5356e3742ab3d30ccf6b4a3a8c4196b ?

Quoted 4 lines

I noticed that there is a similar fix here

https://lore.kernel.org/linux-iommu/20260929151832.80069-1-
[email protected]/

I might have missed something, but it looks like this is stalled
again.
And no wonder, even I feel uncertain here, as there are multiple
threads
and fixes (some of them similar) for the problem. Will likely be
similar
for maintainers, so I suspect none will take a closer look at those
fixes unless someone re-submits one as the agreed on path forward
freshly, containing all Reported-by and Links to earlier discussions
(the one from Bart gets close already from what I see, unless I missed/misunderstood something, which is quite possible).

Quoted 5 lines

Baolu Lu, could you maybe take care of this, given that you authored the
culprit, even if that was quite a while ago? Unless somebody has a
better idea.

Hi Thorsten,

Quoted 9 lines

I am afraid it is not clear yet whether superpages also need to be
disabled when the iGFX is disabled.
Please bear with me. I would like to test this over the weekend.

Best regards,
Tobias Laas

Quoted 1 line

Ciao, Thorsten

Hi Tobias,

Thanks, that is a useful thing to settle, because Bart's generalized
patch keys on the iGPU being present: with the iGPU disabled in BIOS,
00:02.0 normally disappears and the quirk does not trigger, so superpages stay enabled.

A suggested test, so the result answers the question directly:

Quoted 8 lines

  1. Disable the iGPU in BIOS, boot an unpatched kernel with intel_iommu=on (no sp_off) and the default 4 MiB cap.
  2. Capture:
       dmesg | grep -E 'DMAR: (DRHD|dmar[0-9])'
       lspci -s 00:02.0
     It would be interesting to see whether the BIOS then drops the igfx DRHD entirely and/or changes CAP.SLLPS on the remaining unit.

Hi Laurence,

with Bart's patch (v1) applied and the igfx enabled, dmesg | grep DMAR
shows:
[    0.007882] ACPI: DMAR 0x00000000AD612860 0000B8 (v01 INTEL BDW
00000001 INTL 00000001)
[    0.007894] ACPI: Reserving DMAR table memory at [mem 0xad612860-0xad612917]
[    0.018342] DMAR: IOMMU enabled
[    0.060021] DMAR: Host address width 39
[    0.060023] DMAR: DRHD base: 0x000000fed90000 flags: 0x0 [    0.060028] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c0000020660462 ecap f0101a
[    0.060032] DMAR: DRHD base: 0x000000fed91000 flags: 0x1 [    0.060036] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c20660462 ecap f010da
[    0.060039] DMAR: RMRR base: 0x000000ade9f000 end:
0x000000adeadfff
[    0.060042] DMAR: RMRR base: 0x000000af000000 end:
0x000000bf1fffff
[    0.060045] DMAR-IR: IOAPIC id 8 under DRHD base  0xfed91000 IOMMU 1
[    0.060048] DMAR-IR: HPET id 0 under DRHD base 0xfed91000 [    0.060050] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt
out bit.
[    0.060051] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the
BIOS setting.
[    0.060535] DMAR-IR: Enabled IRQ remapping in xapic mode [    2.264853] DMAR: No ATSR found
[    2.264854] DMAR: No SATC found
[    2.264857] DMAR: Disabling superpages on Haswell with integrated graphics
[    2.264859] DMAR: dmar0: Using Queued invalidation
[    2.264865] DMAR: dmar1: Using Queued invalidation
[    2.267816] DMAR: Intel(R) Virtualization Technology for Directed I/O
[    7.969686] i915 0000:00:02.0: [drm] DMAR active, disabling use of stolen memory
and with the igfx disabled:
[    0.007714] ACPI: DMAR 0x00000000CE612860 000080 (v01 INTEL BDW
00000001 INTL 00000001)
[    0.007725] ACPI: Reserving DMAR table memory at [mem 0xce612860-0xce6128df]
[    0.018851] DMAR: IOMMU enabled
[    0.061424] DMAR: Host address width 39
[    0.061426] DMAR: DRHD base: 0x000000fed90000 flags: 0x1 [    0.061432] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap d2008c20660462 ecap f010da
[    0.061435] DMAR: RMRR base: 0x000000cee9f000 end:
0x000000ceeadfff
[    0.061439] DMAR-IR: IOAPIC id 8 under DRHD base  0xfed90000 IOMMU 0
[    0.061442] DMAR-IR: HPET id 0 under DRHD base 0xfed90000 [    0.061444] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt
out bit.
[    0.061445] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the
BIOS setting.
[    0.061727] DMAR-IR: Enabled IRQ remapping in xapic mode [    2.272842] DMAR: No ATSR found
[    2.272844] DMAR: No SATC found
[    2.272847] DMAR: dmar0: Using Queued invalidation
[    2.273427] DMAR: Intel(R) Virtualization Technology for Directed I/O

This means that when the igfx is disabled in the BIOS, it drops the corresponding DMAR unit entirely, but the capabilities stay the same.

Quoted 8 lines

  3. Generate large I/O on the SATA SSD (normal boot plus a large sequential read is enough; with hugepages, e.g. fio --name=sp --filename=/dev/sdX --direct=1 --readonly \
           --rw=read --bs=2M --iomem=mmaphuge --iodepth=8 \
           --ioengine=libaio --runtime=30 --time_based after echo 64 > /proc/sys/vm/nr_hugepages) and check for DMAR fault reason 0x0c.

Quoted 5 lines

If that is clean, the quirk only needs to apply while the iGPU is enabled, which matches the datasheet wording and Bart's v2. If it still faults, the quirk would need to key on the platform rather than
on the presence of the iGPU.

Yes this is clean: the quirk only needs to apply with the igfx enabled.
To be honest, among the proposed patches, I like Johnathan's approach (
https://lore.kernel.org/linux-iommu/[email protected]/

) with the PCI fixup header best, because it runs earlier during boot than Šimon and Bart's approach:
[    0.007754] ACPI: DMAR 0x00000000AD612860 0000B8 (v01 INTEL BDW
00000001 INTL 00000001)
[    0.007766] ACPI: Reserving DMAR table memory at [mem 0xad612860-0xad612917]
[    0.060655] DMAR: Host address width 39
[    0.060657] DMAR: DRHD base: 0x000000fed90000 flags: 0x0 [    0.060662] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c0000020660462 ecap f0101a
[    0.060666] DMAR: DRHD base: 0x000000fed91000 flags: 0x1 [    0.060670] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c20660462 ecap f010da
[    0.060673] DMAR: RMRR base: 0x000000ade9f000 end:
0x000000adeadfff
[    0.060676] DMAR: RMRR base: 0x000000af000000 end:
0x000000bf1fffff
[    0.060679] DMAR-IR: IOAPIC id 8 under DRHD base  0xfed91000 IOMMU 1
[    0.060682] DMAR-IR: HPET id 0 under DRHD base 0xfed91000 [    0.060684] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt
out bit.
[    0.060685] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the
BIOS setting.
[    0.061156] DMAR-IR: Enabled IRQ remapping in xapic mode [    0.209289] pci 0000:00:02.0: DMAR: Disabling IOMMU superpages [    2.268829] DMAR: No ATSR found
[    2.268830] DMAR: No SATC found
[    2.268832] DMAR: dmar0: Using Queued invalidation
[    2.268838] DMAR: dmar1: Using Queued invalidation
[    2.271780] DMAR: Intel(R) Virtualization Technology for Directed I/O
[    7.012104] i915 0000:00:02.0: [drm] DMAR active, disabling use of stolen memory

I have adapted it to match all Haswell igfx PCI IDs (see
https://elixir.bootlin.com/linux/v7.4-rc2/source/include/drm/intel/pciids.h#L266

) rather than the host bridge IDs, see below. I'd appreciate any feedback or suggestions for improvement.

Best regards,
Tobias Laas

drivers/iommu/intel/iommu.c +9 -0
index 5a2e705a2f2e..28ead5dfa009 100644
@@ -4143,6 +4143,76 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 
 0x2e30, quirk_iommu_rwbf);
   DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e40, 
 quirk_iommu_rwbf);
   DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e90, 
 quirk_iommu_rwbf);
 
+static void quirk_iommu_no_superpage(struct pci_dev *dev)
+{
+	if (risky_device(dev))
+		return;
+	pci_info(dev, "Disabling IOMMU superpages\n");
+	intel_iommu_superpage = 0;
+}
+
+/* Haswell requires superpages to be disabled when integrated

graphics
is enabled */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A02, quirk_iommu_no_superpage); /* ULT GT1 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A06, quirk_iommu_no_superpage); /* ULT GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A0A, quirk_iommu_no_superpage); /* ULT GT1 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A0B, quirk_iommu_no_superpage); /* ULT GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A0E, quirk_iommu_no_superpage); /* ULX GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0402, quirk_iommu_no_superpage); /* GT1 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0406, quirk_iommu_no_superpage); /* GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x040A, quirk_iommu_no_superpage); /* GT1 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x040B, quirk_iommu_no_superpage); /* GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x040E, quirk_iommu_no_superpage); /* GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C02, quirk_iommu_no_superpage); /* SDV GT1 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C06, quirk_iommu_no_superpage); /* SDV GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C0A, quirk_iommu_no_superpage); /* SDV GT1 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C0B, quirk_iommu_no_superpage); /* SDV GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C0E, quirk_iommu_no_superpage); /* SDV GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D02, quirk_iommu_no_superpage); /* CRW GT1 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D06, quirk_iommu_no_superpage); /* CRW GT1 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D0A, quirk_iommu_no_superpage); /* CRW GT1 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D0B, quirk_iommu_no_superpage); /* CRW GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D0E, quirk_iommu_no_superpage); /* CRW GT1 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A12, quirk_iommu_no_superpage); /* ULT GT2 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A16, quirk_iommu_no_superpage); /* ULT GT2 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A1A, quirk_iommu_no_superpage); /* ULT GT2 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A1B, quirk_iommu_no_superpage); /* ULT GT2 reserved */\
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A1E, quirk_iommu_no_superpage); /* ULX GT2 mobile */\
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0412, quirk_iommu_no_superpage); /* GT2 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0416, quirk_iommu_no_superpage); /* GT2 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x041A, quirk_iommu_no_superpage); /* GT2 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x041B, quirk_iommu_no_superpage); /* GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x041E, quirk_iommu_no_superpage); /* GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C12, quirk_iommu_no_superpage); /* SDV GT2 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C16, quirk_iommu_no_superpage); /* SDV GT2 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C1A, quirk_iommu_no_superpage); /* SDV GT2 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C1B, quirk_iommu_no_superpage); /* SDV GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C1E, quirk_iommu_no_superpage); /* SDV GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D12, quirk_iommu_no_superpage); /* CRW GT2 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D16, quirk_iommu_no_superpage); /* CRW GT2 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D1A, quirk_iommu_no_superpage); /* CRW GT2 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D1B, quirk_iommu_no_superpage); /* CRW GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D1E, quirk_iommu_no_superpage); /* CRW GT2 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A22, quirk_iommu_no_superpage); /* ULT GT3 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A26, quirk_iommu_no_superpage); /* ULT GT3 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A2A, quirk_iommu_no_superpage); /* ULT GT3 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A2B, quirk_iommu_no_superpage); /* ULT GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A2E, quirk_iommu_no_superpage); /* ULT GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0422, quirk_iommu_no_superpage); /* GT3 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0426, quirk_iommu_no_superpage); /* GT3 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x042A, quirk_iommu_no_superpage); /* GT3 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x042B, quirk_iommu_no_superpage); /* GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x042E, quirk_iommu_no_superpage); /* GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C22, quirk_iommu_no_superpage); /* SDV GT3 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C26, quirk_iommu_no_superpage); /* SDV GT3 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C2A, quirk_iommu_no_superpage); /* SDV GT3 server */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C2B, quirk_iommu_no_superpage); /* SDV GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C2E, quirk_iommu_no_superpage); /* SDV GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D22, quirk_iommu_no_superpage); /* CRW GT3 desktop */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D26, quirk_iommu_no_superpage); /* CRW GT3 mobile */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D2A, quirk_iommu_no_superpage); /* CRW GT3 server */

Quoted 17 lines

+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D2B, quirk_iommu_no_superpage); /* CRW GT3 reserved */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D2E, quirk_iommu_no_superpage); /* CRW GT3 reserved */ +
  #define GGC 0x52
  #define GGC_MEMORY_SIZE_MASK (0xf << 8)
  #define GGC_MEMORY_SIZE_NONE (0x0 << 8)

Quoted 7 lines

I'm building Bart's generalized version now and will confirm it is a
no-op on a non-affected platform (Coffee Lake, both DRHDs report SLLPS = 2M|1G), as I did for the first version.

Regards,
Laurence

Hi Tobias, Šimon,

Thanks Tobias, that settles the scope: with the iGPU disabled the BIOS drops the igfx DRHD, the remaining unit keeps the same SLLPS, and superpages work. So the quirk only needs to apply while the iGPU is enabled, which both Bart's versions already do.

Šimon, regarding the datasheet paragraph appearing from Ivy Bridge to Rocket Lake: one possible explanation is that the requirement only matters when the igfx VT-d engine itself lacks superpage support, and that differs across generations. On Tobias's Haswell the igfx DRHD reports SLLPS = 0 (cap c0000020660462). On my Coffee Lake (i7-8700) the igfx DRHD (dmar0, scope 0000:00:02.0 only) reports SLLPS = 2M|1G (cap 1c0000c40660462), and the platform is not affected. If that holds, only generations where the igfx engine lacks superpages and the BIOS left them enabled on the default engine would show the problem. dmar cap lines from an Ivy Bridge or Broadwell system with the iGPU enabled would confirm or refute this.

That is also the case for Bart's v2 checking the capabilities rather than CPU or device IDs: it covers any generation with that combination and skips the rest. For what it's worth, I tested v2 on v7.4-rc5 on the Coffee Lake system: it does not trigger, superpages stay in use (2 MiB leaf PDEs confirmed via domain_translation_struct), and there are no DMAR or ATA errors.

Tobias, on the PCI fixup approach: I don't think running earlier makes a functional difference, since intel_iommu_superpage is only consulted when paging domains are allocated, after intel_iommu_init(). The capability check also cannot run from a header fixup: the DRHD device scopes are populated by dmar_dev_scope_init(), which walks the PCI devices after enumeration, so they are not available while the header fixups run. The ID list is precise for Haswell, but would miss other generations if their igfx engines also report SLLPS = 0. Small
thing: two lines in your diff end with a stray backslash after the comment (0x0A1B and 0x0A1E).

Lu, either approach fixes Tobias's system; it's your call which you prefer.

Regards,
Laurence

#28 lore raw
Quoted 37 lines · Laurence Oberman

Hi Tobias, Šimon,

Thanks Tobias, that settles the scope: with the iGPU disabled the BIOS drops the igfx DRHD, the remaining unit keeps the same SLLPS, and superpages work. So the quirk only needs to apply while the iGPU is enabled, which both Bart's versions already do.

Šimon, regarding the datasheet paragraph appearing from Ivy Bridge to Rocket Lake: one possible explanation is that the requirement only matters when the igfx VT-d engine itself lacks superpage support, and that differs across generations. On Tobias's Haswell the igfx DRHD reports SLLPS = 0 (cap c0000020660462). On my Coffee Lake (i7-8700) the igfx DRHD (dmar0, scope 0000:00:02.0 only) reports SLLPS = 2M|1G (cap 1c0000c40660462), and the platform is not affected. If that holds, only generations where the igfx engine lacks superpages and the BIOS left them enabled on the default engine would show the problem. dmar cap lines from an Ivy Bridge or Broadwell system with the iGPU enabled would confirm or refute this.

That is also the case for Bart's v2 checking the capabilities rather than CPU or device IDs: it covers any generation with that combination and skips the rest. For what it's worth, I tested v2 on v7.4-rc5 on the Coffee Lake system: it does not trigger, superpages stay in use (2 MiB leaf PDEs confirmed via domain_translation_struct), and there are no DMAR or ATA errors.

Tobias, on the PCI fixup approach: I don't think running earlier makes a functional difference, since intel_iommu_superpage is only consulted when paging domains are allocated, after intel_iommu_init(). The capability check also cannot run from a header fixup: the DRHD device scopes are populated by dmar_dev_scope_init(), which walks the PCI devices after enumeration, so they are not available while the header fixups run. The ID list is precise for Haswell, but would miss other generations if their igfx engines also report SLLPS = 0. Small
thing: two lines in your diff end with a stray backslash after the comment (0x0A1B and 0x0A1E).

Quoted 5 lines

Lu, either approach fixes Tobias's system; it's your call which you prefer.

Regards,
Laurence

Hello Tobias and Laurence,

I think the issue with the documentation is that they just copy-pasted it. The paragraph says "The processor supports the following added new Intel VT-d features", which is straight up wrong when the paragraph is the same for 10 years.

I like the solution from Tobias because it should contain (hopefully) all affected CPUs. From what I managed to find, it should be all types of Haswell CPUs and it looks like Tobias listed them all. Otherwise it's very readable and easily quirkable.

I found that all generations before Haswell (Ivy bridge and older) don't support superpages at all and generations newer than Haswell (Broadwell and newer) support superpages on both the iGPU VT-d unit and the default VT-d unit. Haswell seems to be the only special one.

I had a solution in mind that would be universal, since the code is currently written in a way that doesn't work with different size superpages on different VT-d units. It would check SLLPS on all DMAR units and if their capabilities wouldn't match, then it would disable superpages. I can't work on this issue fast enough so I'll just let it be. If anybody thinks this might be better I can make it though.

Thanks to everybody.

Best regards,
Šimon Pospíchal