[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



Because the kernel.org 5.10.113 with my stripped down config is running successful, I've rebuilt this kernel.org 5.10.113 with the Debian config /boot/config-5.10.0-14-amd64 via make oldconfig. There are some differences between kernel.org and Debian in the config, I've put the config diff bug-1012210-kernel-config-changes.patch in the attached tar.xz.
This kernel also boots successful.

I think the problem is introduced by a Debian patch which handles the config
  CONFIG_INTEL_IOMMU_DEFAULT_ON_INTGPU_OFF=y
because this is not available in kernel.org 5.10.113.

And the Debian kernel
  linux-image-5.10.0-14-amd64           5.10.113-1
boots successful when I set the boot option
  intel_iommu=on,igfx_off
which is only needed with the Debian kernel and not any version from kernel.org.

In the boot log of Debian kernel are the additional lines
[    0.050433] DMAR: IOMMU enabled
[    0.050434] DMAR: Disable GFX device mapping
...
[    1.373598] DMAR: No ATSR found
[    1.373721] DMAR: dmar2: Using Register based invalidation
[    1.373767] DMAR: dmar0: Using Register based invalidation
[    1.373810] DMAR: dmar3: Using Register based invalidation
...
[    1.391563] DMAR: Intel(R) Virtualization Technology for Directed I/O

The kernel boot logs
  dmesg-5.10.113.txt (kernel.org without any boot options)
dmesg-5.10.0-14-amd64.txt (Debian with boot option intel_iommu=on,igfx_off)
are also in the attached tar.xz.

In the patches

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

there is introduced the kernel config option
  INTEL_IOMMU_DEFAULT_ON_INTGPU_OFF
but it is not handled anywhere in the code.

I think you have mixed up the defaults of the configuration and settings of igfx_off and intgpu_off somehow which sets something up resulting in a wrong config for my boot. intgpu_off boot config itself doesn't change anything, with the Debian kernel I need igfx_off.

At
https://salsa.debian.org/kernel-team/linux/-/blob/bullseye-security/debian/patches/features/x86/intel-iommu-add-option-to-exclude-integrated-gpu-only.patch#L66 you should compare 10 chars and not only 8, but is more or less correctness.

Maybe this
static int dmar_map_intgpu = IS_ENABLED(CONFIG_INTEL_IOMMU_DEFAULT_ON);
at
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#L74
should be
static int dmar_map_intgpu = IS_ENABLED(INTEL_IOMMU_DEFAULT_ON_INTGPU_OFF); or the negated value, not sure at the moment, what a y or n should mean in this config and if the assignments of 0 or 1 are correct everywhere.

Attachment: bug-1012210-kernel-logs.tar.xz
Description: application/xz


Reply to: