From 7e6893968ecef50b85e0832927b501fd46d31eeb Mon Sep 17 00:00:00 2001 From: Bruno Kraychete da Costa <1355373+brunokc@users.noreply.github.com> Date: Mon, 26 Jun 2023 15:02:44 -0700 Subject: [PATCH] Fix bad tab/space conversion in patch Note to self: don't copy & paste between terminals. --- .../9900-add-relaxable-rmrr-6.2.16.patch | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/patches/kernel/master/9900-add-relaxable-rmrr-6.2.16.patch b/patches/kernel/master/9900-add-relaxable-rmrr-6.2.16.patch index 189b194..13dd398 100644 --- a/patches/kernel/master/9900-add-relaxable-rmrr-6.2.16.patch +++ b/patches/kernel/master/9900-add-relaxable-rmrr-6.2.16.patch @@ -6,24 +6,24 @@ static int iommu_identity_mapping; +static int intel_relaxable_rmrr = 0; static int iommu_skip_te_disable; - - #define IDENTMAP_GFX 2 + + #define IDENTMAP_GFX 2 @@ -358,6 +359,9 @@ - } else if (!strncmp(str, "tboot_noforce", 13)) { - pr_info("Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n"); - intel_iommu_tboot_noforce = 1; -+ } else if (!strncmp(str, "relax_rmrr", 10)) { -+ pr_info("Intel-IOMMU: assuming all RMRRs are relaxable. This can lead to instability or data loss\n"); -+ intel_relaxable_rmrr = 1; - } else { - pr_notice("Unknown option - '%s'\n", str); - } + } else if (!strncmp(str, "tboot_noforce", 13)) { + pr_info("Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n"); + intel_iommu_tboot_noforce = 1; ++ } else if (!strncmp(str, "relax_rmrr", 10)) { ++ pr_info("Intel-IOMMU: assuming all RMRRs are relaxable. This can lead to instability or data loss\n"); ++ intel_relaxable_rmrr = 1; + } else { + pr_notice("Unknown option - '%s'\n", str); + } @@ -2538,7 +2542,7 @@ - return false; - - pdev = to_pci_dev(dev); -- if (IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev)) -+ if (intel_relaxable_rmrr || IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev)) - return true; - else - return false; + return false; + + pdev = to_pci_dev(dev); +- if (IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev)) ++ if (intel_relaxable_rmrr || IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev)) + return true; + else + return false;