forked from kiler129/relax-intel-rmrr
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create add-relaxable-rmrr-5_15.patch
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- a/drivers/iommu/intel/iommu.c 2022-02-27 12:02:53.958814198 +0100 | ||
+++ b/drivers/iommu/intel/iommu.c 2022-02-27 12:03:07.402842983 +0100 | ||
@@ -338,6 +338,7 @@ | ||
static int intel_iommu_superpage = 1; | ||
static int iommu_identity_mapping; | ||
static int iommu_skip_te_disable; | ||
+static int intel_relaxable_rmrr = 0; | ||
|
||
#define IDENTMAP_GFX 2 | ||
#define IDENTMAP_AZALIA 4 | ||
@@ -442,6 +443,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); | ||
} | ||
@@ -2824,7 +2828,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; |