]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0009-allow-opt-in-to-allow-pass-through-on-broken-hardwar.patch
update submodule and patches for 24.04 Noble based kernel
[pve-kernel.git] / patches / kernel / 0009-allow-opt-in-to-allow-pass-through-on-broken-hardwar.patch
CommitLineData
8ff596f2 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
1acfcad2 2From: kiler129 <grzegorz@noflash.pl>
8ff596f2
TL
3Date: Mon, 18 Sep 2023 15:19:26 +0200
4Subject: [PATCH] allow opt-in to allow pass-through on broken hardware..
1acfcad2
FG
5
6adapted from https://github.com/kiler129/relax-intel-rmrr , licensed under MIT or GPL 2.0+
fbb25a86
TL
7
8Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8ff596f2
TL
9---
10 drivers/iommu/intel/iommu.c | 6 +++++-
11 1 file changed, 5 insertions(+), 1 deletion(-)
1acfcad2 12
8ff596f2 13diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
27616934 14index a788062820df..4020c5336369 100644
1acfcad2
FG
15--- a/drivers/iommu/intel/iommu.c
16+++ b/drivers/iommu/intel/iommu.c
27616934 17@@ -159,6 +159,7 @@ static int dmar_map_gfx = 1;
1acfcad2
FG
18 static int dmar_map_ipu = 1;
19 static int intel_iommu_superpage = 1;
20 static int iommu_identity_mapping;
21+static int intel_relaxable_rmrr = 0;
22 static int iommu_skip_te_disable;
23
24 #define IDENTMAP_GFX 2
27616934 25@@ -221,6 +222,9 @@ static int __init intel_iommu_setup(char *str)
1acfcad2
FG
26 } else if (!strncmp(str, "tboot_noforce", 13)) {
27 pr_info("Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");
28 intel_iommu_tboot_noforce = 1;
29+ } else if (!strncmp(str, "relax_rmrr", 10)) {
30+ pr_info("Intel-IOMMU: assuming all RMRRs are relaxable. This can lead to instability or data loss\n");
31+ intel_relaxable_rmrr = 1;
32 } else {
33 pr_notice("Unknown option - '%s'\n", str);
34 }
27616934 35@@ -2395,7 +2399,7 @@ static bool device_rmrr_is_relaxable(struct device *dev)
1acfcad2
FG
36 return false;
37
38 pdev = to_pci_dev(dev);
39- if (IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev))
40+ if (intel_relaxable_rmrr || IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev))
41 return true;
42 else
43 return false;