1 From: kiler129 <grzegorz@noflash.pl>
3 allow opt-in to allow pass-through on broken hardware..
5 adapted from https://github.com/kiler129/relax-intel-rmrr , licensed under MIT or GPL 2.0+
7 --- a/drivers/iommu/intel/iommu.c
8 +++ b/drivers/iommu/intel/iommu.c
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;
16 #define IDENTMAP_GFX 2
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;
25 pr_notice("Unknown option - '%s'\n", str);
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))