From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796567120; b=El3b++OhVpqwRaNjcdUV5O+NxpLPCIqJDUehZirraNe0v3gxME4/6KsBHuXyTwCFGqA3 Lo6X4gafemVWBgQPtnM4jhPbfpSotGKkb99iWTlfkBY9cXj9aX7kaKpCXXR9D8p4EbQRB eS8rSXgJ9Y3KFiPvW5yzf9T9pde7C8r0QHBS5c1RuybH8NtuA9GleAa7Uv5hTfe6CoB4l 6mIqv47Nr4G2OI0LXSDKbzH6GncKZ1h0WUG3XnfgFOuBnehYsv5c7to/ZsZ5ah5BvUWCk cNps5UCGB5mQKtPAxzB/OivOt16g9OgAou1KSptvNqRCQ3Qc/QcZEjv3M6SFtg3ghfQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796567120; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received: X-Received:Received:Message-ID:Subject:From:To:Cc:Date:In-Reply-To: References:Content-Type:Content-Transfer-Encoding:User-Agent: MIME-Version; bh=8G+dcQrhVYixZGEC7WUBfxqrFrFrSLOZfcA1E+dOP5E=; b=zBplvwTDYFlBHfUHRQ1x5ynqWVn22HdMUU44jetMHgV3r00QUKviVknQFXuAkbSrSD+M kJ3Ra3dwl/3EFZ3Ozxp/Pfm1I/jkrGMpj/CoW2I0gc01T52DmX2/lqbicefKRKZKXaFcg G3SYSwgMvSg7IceHY5lWLaanvQxs754w+j6okTyQOxD3G2Sp/xE6J4fDXx6U2EH5hBp1A y2F76Qwau2FWDcJVhPdSO+2Gxxp0xihk1JugOa9xWMg84uAliXXASRwq56dE5AzLhEg5I xhfzqB10N2q/DeNBzzUQFfI0kMnC+rO7HBn1RInKUQfdnt0pb2d6xxyLeilukiXBpTg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TDKTHM0h; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=c9zuqjR5; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7F16606A322 for ; Sun, 6 Dec 2026 14:25:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E7F16606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TDKTHM0h; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=c9zuqjR5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796567118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8G+dcQrhVYixZGEC7WUBfxqrFrFrSLOZfcA1E+dOP5E=; b=TDKTHM0hmbjVDQ6OILuy4FdtF58iFioFfS3VIi9yFkvDEpIDrVhk9+NJXU6IxnpWk8cM8o WD/Xec8970gay3C7Cx0EyhhNA/bN4vV6gtXalzcb/xpNAoyxhgsSgtGml4JqPjjq9McvN0 FkyVP7xsPlI5BcG8Asw76cyYZvyy9vw= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-445-QwA_L4iMNLadWIiKt7fF7Q-1; Sun, 6 Dec 2026 14:25:15 +0000 X-MC-Unique: QwA_L4iMNLadWIiKt7fF7Q-1 X-Mimecast-MFC-AGG-ID: QwA_L4iMNLadWIiKt7fF7Q_1796567115 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-921d248bf3eso46029666d6.2 for ; Sun, 06 Dec 2026 06:25:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1796567115; x=1797171915; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to:content-type; bh=8G+dcQrhVYixZGEC7WUBfxqrFrFrSLOZfcA1E+dOP5E=; b=c9zuqjR5IakGfK5QnzmAxi2hEmb38b9SGoaN6kEuiQ2ajhJfpmhWFxStUMSIHY+Ykv 7eksk0F0GuImAXruqM/7JMTru8/ce79boTE8Fo57giZhJMOTnv3UJrzcTlozTqPQgpFb H44R+xpTjU6MKjt8+66mg+k/gRhEAWiT+7TeHRHBS35IvYjNOjp+ph5nWFx4s+wukwdN +f6KI3emLPCib+D2jiUeJTZgE1H4Q/Ac6nsATtxk2GeerNJSNLqlSJIIk8k31BxoBQ4r cyq/oOwPPvh/CiQR8yPniRn2/BfF0Yn+ujsrkJ+XW0WNDv0oWYRCgN+xC6wvQggUHH2H 741A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796567115; x=1797171915; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8G+dcQrhVYixZGEC7WUBfxqrFrFrSLOZfcA1E+dOP5E=; b=qKqNpQOfFkQ/0WXVQuytd/HkC5oBK6Pl1l+pvdr0U+APvKr7pw0h91jUvuds9tpM6Z voO1xBv+KO191nul36nu5yZhUOTb/blPiTK23m6YVpm3x2AdMuB/l2/QRMZxdYKRrGK0 UVD2hsLom/RIFbyxCEYMgyqXG3f6FpEiKoKmqZKkBwH4r6dTijC9yb4yryUcQVcayv92 izIw1RDk4S4p2j47xX9Kb41lHR5eg5gVqJHGD15VSrGbwqKDizCdfaQQs3Sc16P/xjOv a66jenrwPBjmvZ0ziLvwz5MqFEVipnxxHm5jpRDrUfsfsnmUEeGssKsxuAQI6057Zzwn lqfA== X-Forwarded-Encrypted: i=1; AL+hErEzRV8xcA+FoPemFqUOY029QkxHq1qscxiU1Nkpm57dWsFpKDSPh15Th9A2logCCWsGmK4oRIOdSUkdwXI=@vger.kernel.org X-Gm-Message-State: AB4q+uHBkXmAc1G1dqUQmb6yCL3Yio55fndizT930p8zedUUpEsLQBOd Tx0RiODzOefo87knbZAhTLzy7JjibxMz2rBX3xgAdAP6GGyWfxz6N+z1HSu4R67HG9FdyKnFdVw +XYDSTKyPuMOmRfURoaYSsQf5Soxh+nNv340scLYoQOlxI7TxJxBnRe0i1y2xlCTnPw== X-Gm-Gg: AZFdTZdCsCwiS6Txo/tfR+oxm32d0fNt5yze/AwZK4LKwsVEKMhyEPKc0CHhehhW2us omZeXFCOsK1a4xXa7N6nY86XTjK1Sa4vQBtJflBLwnmGzjyetITjDzqdXsw7vuI4zBTt7U8P8p2 vf3ZFXWDO3ewcpxMpPcNMWGP7xYOk4NH20AWcV2FCYgklj9udEvNJ2nWdcdWfvreTsWSF2JRVjZ MgtJQOd0a51VzggCLnaVbSz1pXT4hZss7X9niy+fqvVX8clsKiwCrJNywNpA/QB/fWm7GxD1ZCd BuRRTMjnuM0LxbP6u4B+Kk2VgJJQ8NAHHf2Jd+HCcSQ/hs7EAZvEJk23QlTLQFlyzCehLvBocVU c+2C28SBuTxbjXH2RR68nIHysM2BaUxGe8oEC6y8oSLgQexbG2eNLrrpno1RDJpWcUWQDi9SI9l BpOcAhnzEYEz0gXVjGoYCzmMdOfsWK0BsMyN6LIBPePxDvvQh4jom/9iLe2JQG+Z+mQsCMDQ== X-Received: by 2002:a05:6214:4b0f:b0:921:1e9b:a7a9 with SMTP id 6a1803df08f44-921e2472dc7mr129724906d6.42.1796567114811; Sun, 06 Dec 2026 06:25:14 -0800 (PST) X-Received: by 2002:a05:6214:4b0f:b0:921:1e9b:a7a9 with SMTP id 6a1803df08f44-921e2472dc7mr129724246d6.42.1796567114070; Sun, 06 Dec 2026 06:25:14 -0800 (PST) Received: from loberman-thinkpadp1gen5.rmtusma.csb ([2600:6c65:2440:d8c:929c:b769:6def:faa3]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-921e05934e1sm69728596d6.24.2026.12.06.06.25.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2026 06:25:13 -0800 (PST) Message-ID: Subject: Re: [REGRESSION] DMAR fault by Intel H97 SATA controller since "block: Increase BLK_DEF_MAX_SECTORS_CAP" (6.17-rc1) From: Laurence Oberman To: Tobias Laas Cc: Thorsten Leemhuis , Baolu Lu , Bart Van Assche , Lu Baolu , Jason Gunthorpe , Joerg Roedel , 70sp <70sp@protonmail.com>, Damien Le Moal , Jens Axboe , regressions@lists.linux.dev, linux-block@vger.kernel.org, linux-ide@vger.kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, David Woodhouse , Will Deacon , Niklas Cassel , Johnathan Chan Date: Sun, 06 Dec 2026 09:25:11 -0500 In-Reply-To: <8be5db5c24af59ff7f83a1b9de978953@posteo.de> References: <5ad27a97aafbc08a8702d5b90d09cd59@posteo.de> <87b1bbd8-8113-4890-8623-738b19a9cc7b@leemhuis.info> <2adaf0ef9e1a2fa18590f7d8dbf203c0f7de2be7.camel@redhat.com> <0edb9525-5068-42e6-b6c3-a1dcebcbcea7@acm.org> <672d7d54-a485-4e5b-9d5e-d2fd87fe292f@linux.dev> <82B1AB2F-EC1F-4A79-B791-9C14FAFD6F62@posteo.de> <8be5db5c24af59ff7f83a1b9de978953@posteo.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 (3.60.2-3.fc44) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 On Sun, 2026-12-06 at 13:06 +0000, Tobias Laas wrote: > Am 04.12.2026 14:22 schrieb Laurence Oberman: > > On Fri, 2026-12-04 at 12:47 +0000, Tobias Laas wrote: > > > Am 4. Dezember 2026 09:51:41 MEZ schrieb Thorsten Leemhuis > > > : > > > > 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. > > > > > > >=20 > > > > > > > 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. > > > > > > >=20 > > > > > > > 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) > > > > > >=20 > > > > > > 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=3D@protonmail.com/T/ > > > > > > #mc147f250c5356e3742ab3d30ccf6b4a3a8c4196b ? > > > > >=20 > > > > > I noticed that there is a similar fix here > > > > >=20 > > > > > https://lore.kernel.org/linux-iommu/20260929151832.80069-1- > > > > > johnathanc@novasilicon.dev/ > > > >=20 > > > > 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). > > > >=20 > > > > 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, > > >=20 > > > 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. > > >=20 > > > Best regards, > > > Tobias Laas > > >=20 > > > > Ciao, Thorsten > >=20 > > Hi Tobias, > >=20 > > 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. > >=20 > > A suggested test, so the result answers the question directly: > >=20 > > =C2=A0 1. Disable the iGPU in BIOS, boot an unpatched kernel with > > =C2=A0=C2=A0=C2=A0=C2=A0 intel_iommu=3Don (no sp_off) and the default 4= MiB cap. > > =C2=A0 2. Capture: > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dmesg | grep -E 'DMAR: (DRHD|dmar[= 0-9])' > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 lspci -s 00:02.0 > > =C2=A0=C2=A0=C2=A0=C2=A0 It would be interesting to see whether the BIO= S then drops the > > =C2=A0=C2=A0=C2=A0=C2=A0 igfx DRHD entirely and/or changes CAP.SLLPS on= the remaining > > unit. > Hi Laurence, >=20 > with Bart's patch (v1) applied and the igfx enabled, dmesg | grep > DMAR=20 > shows: > [=C2=A0=C2=A0=C2=A0 0.007882] ACPI: DMAR 0x00000000AD612860 0000B8 (v01 I= NTEL=C2=A0 > BDW=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > 00000001 INTL 00000001) > [=C2=A0=C2=A0=C2=A0 0.007894] ACPI: Reserving DMAR table memory at [mem= =20 > 0xad612860-0xad612917] > [=C2=A0=C2=A0=C2=A0 0.018342] DMAR: IOMMU enabled > [=C2=A0=C2=A0=C2=A0 0.060021] DMAR: Host address width 39 > [=C2=A0=C2=A0=C2=A0 0.060023] DMAR: DRHD base: 0x000000fed90000 flags: 0x= 0 > [=C2=A0=C2=A0=C2=A0 0.060028] DMAR: dmar0: reg_base_addr fed90000 ver 1:0= cap=20 > c0000020660462 ecap f0101a > [=C2=A0=C2=A0=C2=A0 0.060032] DMAR: DRHD base: 0x000000fed91000 flags: 0x= 1 > [=C2=A0=C2=A0=C2=A0 0.060036] DMAR: dmar1: reg_base_addr fed91000 ver 1:0= cap=20 > d2008c20660462 ecap f010da > [=C2=A0=C2=A0=C2=A0 0.060039] DMAR: RMRR base: 0x000000ade9f000 end: > 0x000000adeadfff > [=C2=A0=C2=A0=C2=A0 0.060042] DMAR: RMRR base: 0x000000af000000 end: > 0x000000bf1fffff > [=C2=A0=C2=A0=C2=A0 0.060045] DMAR-IR: IOAPIC id 8 under DRHD base=C2=A0 = 0xfed91000 IOMMU > 1 > [=C2=A0=C2=A0=C2=A0 0.060048] DMAR-IR: HPET id 0 under DRHD base 0xfed910= 00 > [=C2=A0=C2=A0=C2=A0 0.060050] DMAR-IR: x2apic is disabled because BIOS se= ts x2apic > opt=20 > out bit. > [=C2=A0=C2=A0=C2=A0 0.060051] DMAR-IR: Use 'intremap=3Dno_x2apic_optout' = to override > the=20 > BIOS setting. > [=C2=A0=C2=A0=C2=A0 0.060535] DMAR-IR: Enabled IRQ remapping in xapic mod= e > [=C2=A0=C2=A0=C2=A0 2.264853] DMAR: No ATSR found > [=C2=A0=C2=A0=C2=A0 2.264854] DMAR: No SATC found > [=C2=A0=C2=A0=C2=A0 2.264857] DMAR: Disabling superpages on Haswell with = integrated=20 > graphics > [=C2=A0=C2=A0=C2=A0 2.264859] DMAR: dmar0: Using Queued invalidation > [=C2=A0=C2=A0=C2=A0 2.264865] DMAR: dmar1: Using Queued invalidation > [=C2=A0=C2=A0=C2=A0 2.267816] DMAR: Intel(R) Virtualization Technology fo= r Directed > I/O > [=C2=A0=C2=A0=C2=A0 7.969686] i915 0000:00:02.0: [drm] DMAR active, disab= ling use of > stolen memory > and with the igfx disabled: > [=C2=A0=C2=A0=C2=A0 0.007714] ACPI: DMAR 0x00000000CE612860 000080 (v01 I= NTEL=C2=A0 > BDW=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > 00000001 INTL 00000001) > [=C2=A0=C2=A0=C2=A0 0.007725] ACPI: Reserving DMAR table memory at [mem= =20 > 0xce612860-0xce6128df] > [=C2=A0=C2=A0=C2=A0 0.018851] DMAR: IOMMU enabled > [=C2=A0=C2=A0=C2=A0 0.061424] DMAR: Host address width 39 > [=C2=A0=C2=A0=C2=A0 0.061426] DMAR: DRHD base: 0x000000fed90000 flags: 0x= 1 > [=C2=A0=C2=A0=C2=A0 0.061432] DMAR: dmar0: reg_base_addr fed90000 ver 1:0= cap=20 > d2008c20660462 ecap f010da > [=C2=A0=C2=A0=C2=A0 0.061435] DMAR: RMRR base: 0x000000cee9f000 end: > 0x000000ceeadfff > [=C2=A0=C2=A0=C2=A0 0.061439] DMAR-IR: IOAPIC id 8 under DRHD base=C2=A0 = 0xfed90000 IOMMU > 0 > [=C2=A0=C2=A0=C2=A0 0.061442] DMAR-IR: HPET id 0 under DRHD base 0xfed900= 00 > [=C2=A0=C2=A0=C2=A0 0.061444] DMAR-IR: x2apic is disabled because BIOS se= ts x2apic > opt=20 > out bit. > [=C2=A0=C2=A0=C2=A0 0.061445] DMAR-IR: Use 'intremap=3Dno_x2apic_optout' = to override > the=20 > BIOS setting. > [=C2=A0=C2=A0=C2=A0 0.061727] DMAR-IR: Enabled IRQ remapping in xapic mod= e > [=C2=A0=C2=A0=C2=A0 2.272842] DMAR: No ATSR found > [=C2=A0=C2=A0=C2=A0 2.272844] DMAR: No SATC found > [=C2=A0=C2=A0=C2=A0 2.272847] DMAR: dmar0: Using Queued invalidation > [=C2=A0=C2=A0=C2=A0 2.273427] DMAR: Intel(R) Virtualization Technology fo= r Directed > I/O >=20 > This means that when the igfx is disabled in the BIOS, it drops the=20 > corresponding DMAR unit entirely, but the capabilities stay the same. >=20 > > =C2=A0 3. Generate large I/O on the SATA SSD (normal boot plus a large > > =C2=A0=C2=A0=C2=A0=C2=A0 sequential read is enough; with hugepages, e.g= . > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fio --name=3Dsp --filename=3D/dev/= sdX --direct=3D1 --readonly \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --rw=3Drea= d --bs=3D2M --iomem=3Dmmaphuge --iodepth=3D8 \ > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --ioengine= =3Dlibaio --runtime=3D30 --time_based > > =C2=A0=C2=A0=C2=A0=C2=A0 after echo 64 > /proc/sys/vm/nr_hugepages) and= check for DMAR > > =C2=A0=C2=A0=C2=A0=C2=A0 fault reason 0x0c. > >=20 > > 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 > (=20 > https://lore.kernel.org/linux-iommu/20260929151832.80069-1-johnathanc@nov= asilicon.dev/ > =C2=A0 > ) with the PCI fixup header best, because it runs earlier during boot > than =C5=A0imon and Bart's approach: > [=C2=A0=C2=A0=C2=A0 0.007754] ACPI: DMAR 0x00000000AD612860 0000B8 (v01 I= NTEL=C2=A0 > BDW=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 > 00000001 INTL 00000001) > [=C2=A0=C2=A0=C2=A0 0.007766] ACPI: Reserving DMAR table memory at [mem= =20 > 0xad612860-0xad612917] > [=C2=A0=C2=A0=C2=A0 0.060655] DMAR: Host address width 39 > [=C2=A0=C2=A0=C2=A0 0.060657] DMAR: DRHD base: 0x000000fed90000 flags: 0x= 0 > [=C2=A0=C2=A0=C2=A0 0.060662] DMAR: dmar0: reg_base_addr fed90000 ver 1:0= cap=20 > c0000020660462 ecap f0101a > [=C2=A0=C2=A0=C2=A0 0.060666] DMAR: DRHD base: 0x000000fed91000 flags: 0x= 1 > [=C2=A0=C2=A0=C2=A0 0.060670] DMAR: dmar1: reg_base_addr fed91000 ver 1:0= cap=20 > d2008c20660462 ecap f010da > [=C2=A0=C2=A0=C2=A0 0.060673] DMAR: RMRR base: 0x000000ade9f000 end: > 0x000000adeadfff > [=C2=A0=C2=A0=C2=A0 0.060676] DMAR: RMRR base: 0x000000af000000 end: > 0x000000bf1fffff > [=C2=A0=C2=A0=C2=A0 0.060679] DMAR-IR: IOAPIC id 8 under DRHD base=C2=A0 = 0xfed91000 IOMMU > 1 > [=C2=A0=C2=A0=C2=A0 0.060682] DMAR-IR: HPET id 0 under DRHD base 0xfed910= 00 > [=C2=A0=C2=A0=C2=A0 0.060684] DMAR-IR: x2apic is disabled because BIOS se= ts x2apic > opt=20 > out bit. > [=C2=A0=C2=A0=C2=A0 0.060685] DMAR-IR: Use 'intremap=3Dno_x2apic_optout' = to override > the=20 > BIOS setting. > [=C2=A0=C2=A0=C2=A0 0.061156] DMAR-IR: Enabled IRQ remapping in xapic mod= e > [=C2=A0=C2=A0=C2=A0 0.209289] pci 0000:00:02.0: DMAR: Disabling IOMMU sup= erpages > [=C2=A0=C2=A0=C2=A0 2.268829] DMAR: No ATSR found > [=C2=A0=C2=A0=C2=A0 2.268830] DMAR: No SATC found > [=C2=A0=C2=A0=C2=A0 2.268832] DMAR: dmar0: Using Queued invalidation > [=C2=A0=C2=A0=C2=A0 2.268838] DMAR: dmar1: Using Queued invalidation > [=C2=A0=C2=A0=C2=A0 2.271780] DMAR: Intel(R) Virtualization Technology fo= r Directed > I/O > [=C2=A0=C2=A0=C2=A0 7.012104] i915 0000:00:02.0: [drm] DMAR active, disab= ling use of > stolen memory >=20 > I have adapted it to match all Haswell igfx PCI IDs (see=20 > https://elixir.bootlin.com/linux/v7.4-rc2/source/include/drm/intel/pciids= .h#L266 > =C2=A0 > ) rather than the host bridge IDs, see below. I'd appreciate any=20 > feedback or suggestions for improvement. >=20 > Best regards, > Tobias Laas >=20 > 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,=20 > 0x2e30, quirk_iommu_rwbf); > =C2=A0 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e40,=20 > quirk_iommu_rwbf); > =C2=A0 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e90,=20 > quirk_iommu_rwbf); >=20 > +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 =3D 0; > +} > + > +/* Haswell requires superpages to be disabled when integrated > graphics=20 > is enabled */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A02,=20 > quirk_iommu_no_superpage); /* ULT GT1 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A06,=20 > quirk_iommu_no_superpage); /* ULT GT1 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A0A,=20 > quirk_iommu_no_superpage); /* ULT GT1 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A0B,=20 > quirk_iommu_no_superpage); /* ULT GT1 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A0E,=20 > quirk_iommu_no_superpage); /* ULX GT1 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0402,=20 > quirk_iommu_no_superpage); /* GT1 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0406,=20 > quirk_iommu_no_superpage); /* GT1 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x040A,=20 > quirk_iommu_no_superpage); /* GT1 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x040B,=20 > quirk_iommu_no_superpage); /* GT1 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x040E,=20 > quirk_iommu_no_superpage); /* GT1 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C02,=20 > quirk_iommu_no_superpage); /* SDV GT1 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C06,=20 > quirk_iommu_no_superpage); /* SDV GT1 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C0A,=20 > quirk_iommu_no_superpage); /* SDV GT1 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C0B,=20 > quirk_iommu_no_superpage); /* SDV GT1 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C0E,=20 > quirk_iommu_no_superpage); /* SDV GT1 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D02,=20 > quirk_iommu_no_superpage); /* CRW GT1 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D06,=20 > quirk_iommu_no_superpage); /* CRW GT1 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D0A,=20 > quirk_iommu_no_superpage); /* CRW GT1 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D0B,=20 > quirk_iommu_no_superpage); /* CRW GT1 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D0E,=20 > quirk_iommu_no_superpage); /* CRW GT1 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A12,=20 > quirk_iommu_no_superpage); /* ULT GT2 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A16,=20 > quirk_iommu_no_superpage); /* ULT GT2 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A1A,=20 > quirk_iommu_no_superpage); /* ULT GT2 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A1B,=20 > quirk_iommu_no_superpage); /* ULT GT2 reserved */\ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A1E,=20 > quirk_iommu_no_superpage); /* ULX GT2 mobile */\ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0412,=20 > quirk_iommu_no_superpage); /* GT2 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0416,=20 > quirk_iommu_no_superpage); /* GT2 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x041A,=20 > quirk_iommu_no_superpage); /* GT2 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x041B,=20 > quirk_iommu_no_superpage); /* GT2 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x041E,=20 > quirk_iommu_no_superpage); /* GT2 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C12,=20 > quirk_iommu_no_superpage); /* SDV GT2 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C16,=20 > quirk_iommu_no_superpage); /* SDV GT2 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C1A,=20 > quirk_iommu_no_superpage); /* SDV GT2 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C1B,=20 > quirk_iommu_no_superpage); /* SDV GT2 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C1E,=20 > quirk_iommu_no_superpage); /* SDV GT2 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D12,=20 > quirk_iommu_no_superpage); /* CRW GT2 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D16,=20 > quirk_iommu_no_superpage); /* CRW GT2 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D1A,=20 > quirk_iommu_no_superpage); /* CRW GT2 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D1B,=20 > quirk_iommu_no_superpage); /* CRW GT2 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D1E,=20 > quirk_iommu_no_superpage); /* CRW GT2 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A22,=20 > quirk_iommu_no_superpage); /* ULT GT3 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A26,=20 > quirk_iommu_no_superpage); /* ULT GT3 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A2A,=20 > quirk_iommu_no_superpage); /* ULT GT3 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A2B,=20 > quirk_iommu_no_superpage); /* ULT GT3 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0A2E,=20 > quirk_iommu_no_superpage); /* ULT GT3 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0422,=20 > quirk_iommu_no_superpage); /* GT3 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0426,=20 > quirk_iommu_no_superpage); /* GT3 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x042A,=20 > quirk_iommu_no_superpage); /* GT3 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x042B,=20 > quirk_iommu_no_superpage); /* GT3 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x042E,=20 > quirk_iommu_no_superpage); /* GT3 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C22,=20 > quirk_iommu_no_superpage); /* SDV GT3 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C26,=20 > quirk_iommu_no_superpage); /* SDV GT3 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C2A,=20 > quirk_iommu_no_superpage); /* SDV GT3 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C2B,=20 > quirk_iommu_no_superpage); /* SDV GT3 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0C2E,=20 > quirk_iommu_no_superpage); /* SDV GT3 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D22,=20 > quirk_iommu_no_superpage); /* CRW GT3 desktop */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D26,=20 > quirk_iommu_no_superpage); /* CRW GT3 mobile */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D2A,=20 > quirk_iommu_no_superpage); /* CRW GT3 server */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D2B,=20 > quirk_iommu_no_superpage); /* CRW GT3 reserved */ > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0D2E,=20 > quirk_iommu_no_superpage); /* CRW GT3 reserved */ > + > =C2=A0 #define GGC 0x52 > =C2=A0 #define GGC_MEMORY_SIZE_MASK (0xf << 8) > =C2=A0 #define GGC_MEMORY_SIZE_NONE (0x0 << 8) >=20 >=20 > > 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 =3D 2M|1G), as I did for the first version. > >=20 > > Regards, > > Laurence Hi Tobias, =C5=A0imon, 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. =C5=A0imon, 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 =3D 0 (cap c0000020660462). On my Coffee Lake (i7-8700) the igfx DRHD (dmar0, scope 0000:00:02.0 only) reports SLLPS =3D 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 =3D 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