]> git.proxmox.com Git - pve-kernel.git/blob - patches/kernel/0014-add-relaxable-rmrr.patch
update sources to Ubuntu-6.2.0-34.34
[pve-kernel.git] / patches / kernel / 0014-add-relaxable-rmrr.patch
1 From: kiler129 <grzegorz@noflash.pl>
2
3 allow opt-in to allow pass-through on broken hardware..
4
5 adapted from https://github.com/kiler129/relax-intel-rmrr , licensed under MIT or GPL 2.0+
6
7 --- a/drivers/iommu/intel/iommu.c
8 +++ b/drivers/iommu/intel/iommu.c
9 @@ -297,6 +297,7 @@
10 static int dmar_map_ipu = 1;
11 static int intel_iommu_superpage = 1;
12 static int iommu_identity_mapping;
13 +static int intel_relaxable_rmrr = 0;
14 static int iommu_skip_te_disable;
15
16 #define IDENTMAP_GFX 2
17 @@ -358,6 +359,9 @@
18 } else if (!strncmp(str, "tboot_noforce", 13)) {
19 pr_info("Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");
20 intel_iommu_tboot_noforce = 1;
21 + } else if (!strncmp(str, "relax_rmrr", 10)) {
22 + pr_info("Intel-IOMMU: assuming all RMRRs are relaxable. This can lead to instability or data loss\n");
23 + intel_relaxable_rmrr = 1;
24 } else {
25 pr_notice("Unknown option - '%s'\n", str);
26 }
27 @@ -2538,7 +2542,7 @@
28 return false;
29
30 pdev = to_pci_dev(dev);
31 - if (IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev))
32 + if (intel_relaxable_rmrr || IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev))
33 return true;
34 else
35 return false;