Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built for 7.1-10 #1

Merged
merged 4 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/proxmox/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ apt -y update
apt -y install git nano screen patch fakeroot build-essential devscripts libncurses5 libncurses5-dev libssl-dev bc \
flex bison libelf-dev libaudit-dev libgtk2.0-dev libperl-dev asciidoc xmlto gnupg gnupg2 rsync lintian debhelper \
libdw-dev libnuma-dev libslang2-dev sphinx-common asciidoc-base automake cpio dh-python file gcc kmod libiberty-dev \
libpve-common-perl libtool perl-modules python3-minimal sed tar zlib1g-dev lz4 curl zstd
libpve-common-perl libtool perl-modules python3-minimal sed tar zlib1g-dev lz4 curl zstd dwarves



Expand Down
9 changes: 9 additions & 0 deletions build/proxmox/build7.1-10.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e

export PVE_KERNEL_BRANCH=pve-kernel-5.13
export RELAX_INTEL_GIT_REPO="https://github.com/OrpheeGT/relax-intel-rmrr.git"
export RELAX_PATCH="add-relaxable-rmrr-5_13.patch"
export PROXMOX_PATCH="proxmox7.patch"

./build.sh
29 changes: 29 additions & 0 deletions patches/add-relaxable-rmrr-5_13.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- a/drivers/iommu/intel/iommu.c 2022-02-26 13:51:33.821885509 +0100
+++ b/drivers/iommu/intel/iommu.c 2022-02-26 13:58:27.231463792 +0100
@@ -364,6 +364,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
@@ -465,6 +466,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);
}
@@ -2846,7 +2850,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;
29 changes: 29 additions & 0 deletions patches/add-relaxable-rmrr-5_15.patch
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;