[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1012210: linux-image-5.10.0-14-amd64: Kernels of Bullseye and Testing (5.10 and 5.17) hang at boot



Am 02.06.2022 23:26, schrieb Markus Kolb:
Am 2. Juni 2022 13:42:54 UTC schrieb Markus Kolb <debian@tower-net.de>:
[...]
https://salsa.debian.org/kernel-team/linux/-/blob/bullseye-security/debian/patches/features/x86/intel-iommu-add-kconfig-option-to-exclude-igpu-by-default.patch
https://salsa.debian.org/kernel-team/linux/-/blob/bullseye-security/debian/patches/features/x86/intel-iommu-add-option-to-exclude-integrated-gpu-only.patch
[...]
I've patched the kernel.org 5.10.113 just with these 2 Debian patches
and at least I can confirm, that these changes are the cause.
Although I don't understand at the moment where the difference of
intel_iommu=on with patch and the defaults without patch could be.
Will have a closer look tomorrow.

I've found the difference, somehow I've had the opinion that with the kernel.org and Debian Buster kernel dmar_disabled would be set to false by default or CONFIG_INTEL_IOMMU_DEFAULT_ON would be enabled by default. But this is not the case. So dmar_disabled is true there without boot config. With the Debian patch in Bullseye and newer this has been enabled implicitly via CONFIG_INTEL_IOMMU_DEFAULT_ON_INTGPU_OFF=y and dmar_disabled became false. With the older kernels you had to enable it per boot config, and now you need to disable it.

So added now this to drivers/iommu/intel/iommu.c and my computer boots without any required kernel boot option with Debian kernels:

--- a/drivers/iommu/intel/iommu.c	2022-06-03 14:50:52.248268257 +0200
+++ b/drivers/iommu/intel/iommu.c	2022-06-03 14:48:12.695769217 +0200
@@ -6186,6 +6186,9 @@
 	dmar_map_gfx = 0;
 }

+/* Q35 integrated gfx dmar support is totally busted. */
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x29b2, quirk_iommu_igfx);
+
 /* G4x/GM45 integrated gfx dmar support is totally busted. */
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_igfx); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_igfx);


The only related to problem, I've found, is this discussion without result 5 years ago:
https://lore.kernel.org/linux-iommu/20161205215841.GA20819@beast/

And this nearly 4 year old bug report without attention:
https://bugzilla.kernel.org/show_bug.cgi?id=201185

I've opened https://bugzilla.kernel.org/show_bug.cgi?id=216064

Would you add this patch to Debian kernels?


Reply to: