Re: [REGRESSION] DMAR fault by Intel H97 SATA controller since "block: Increase BLK_DEF_MAX_SECTORS_CAP" (6.17-rc1)
From: Tobias Laas
Date: Sun Dec 06 2026 - 08:06:27 EST
Am 04.12.2026 14:22 schrieb Laurence Oberman:
On Fri, 2026-12-04 at 12:47 +0000, Tobias Laas wrote:Hi Laurence,
Am 4. Dezember 2026 09:51:41 MEZ schrieb Thorsten Leemhuis
<regressions@xxxxxxxxxxxxx>:
> On 12/1/26 10:04, Baolu Lu wrote:
> > On 11/26/26 07:27, Bart Van Assche wrote:
> > > 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.
> > > >
> > > > 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 ?
> >
> > I noticed that there is a similar fix here
> >
> > https://lore.kernel.org/linux-iommu/20260929151832.80069-1-
> > johnathanc@xxxxxxxxxxxxxxx/
>
> 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.
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
> 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.
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.
3. Generate large I/O on the SATA SSD (normal boot plus a largeYes this is clean: the quirk only needs to apply with the igfx enabled.
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.
To be honest, among the proposed patches, I like Johnathan's approach ( https://lore.kernel.org/linux-iommu/20260929151832.80069-1-johnathanc@xxxxxxxxxxxxxxx/ ) 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
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 5a2e705a2f2e..28ead5dfa009 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -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)
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