From d4dcf2b536cc84e76d2d3f8d42b866cd47034e26 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Tue, 26 Nov 2024 17:36:36 +0100 Subject: [PATCH] revert Ubuntu patch disabling IOMMU functionality for Skylake iGPU This change breaks passthrough of the iGPU on older Intel Plattforms (Skylake) https://forum.proxmox.com/threads/.157266 The patch was orignally applied by Ubuntu upstream for an issue unrelated to passthrough - flickering of the display with these chips, where some comments suggest that setting intel_iommu=igfx_off does not fix the issue, while the patch explicitly says it does the same as setting intel_iommu=igfx_off - my quick glance at the code agrees with the patch author, with the downside that with the patch you cannot enable it again via kernel_cmdline. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2062951 As this is a regression, and our user-base does not seem to have encountered the issue with flickering displays simply revert the change for now. A proper fix seems to be in the makings in linux upstream (according to the launchpad issue) I tested this on an old machine we had lying around - reverting the patch suppressed the message: pci 0000:00:02.0: DMAR: Disabling IOMMU for graphics on this chipset (also did not notice any flickering in a short graphic session (wayland+kde)). I'd suggest pulling this also into our 6.8 kernel (but this can also happen after we get some feedback that it indeed fixes the issue of the reporters in the forum) Signed-off-by: Stoiko Ivanov --- ...UCE-iommu-intel-disable-DMAR-for-SKL.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 patches/kernel/0017-Revert-UBUNTU-SAUCE-iommu-intel-disable-DMAR-for-SKL.patch diff --git a/patches/kernel/0017-Revert-UBUNTU-SAUCE-iommu-intel-disable-DMAR-for-SKL.patch b/patches/kernel/0017-Revert-UBUNTU-SAUCE-iommu-intel-disable-DMAR-for-SKL.patch new file mode 100644 index 0000000..2c1a265 --- /dev/null +++ b/patches/kernel/0017-Revert-UBUNTU-SAUCE-iommu-intel-disable-DMAR-for-SKL.patch @@ -0,0 +1,53 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Stoiko Ivanov +Date: Mon, 25 Nov 2024 11:10:35 +0100 +Subject: [PATCH] Revert "UBUNTU: SAUCE: iommu/intel: disable DMAR for SKL + integrated gfx" + +Some of our users use the iGPU for PCI-passthrough on those +plattforms, which seems broken with this commit added. +https://forum.proxmox.com/threads/.157266 + +This reverts commit b310f5f58c83756fc164f7d391d76f0df9cc65c3. +--- + drivers/iommu/intel/iommu.c | 27 --------------------------- + 1 file changed, 27 deletions(-) + +diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c +index 34c8b02ca7878..a27cbc22148fa 100644 +--- a/drivers/iommu/intel/iommu.c ++++ b/drivers/iommu/intel/iommu.c +@@ -4766,33 +4766,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx); + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163A, quirk_iommu_igfx); + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163D, quirk_iommu_igfx); + +-/* SKL */ +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1906, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1913, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x190E, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1915, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1902, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x190A, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x190B, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1917, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1916, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1921, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x191E, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1912, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x191A, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x191B, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x191D, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1923, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1926, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1927, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x192A, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x192B, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x192D, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1932, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x193A, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x193B, quirk_iommu_igfx); +-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x193D, quirk_iommu_igfx); +- + /* disable IPU dmar support */ + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_iommu_ipu); +