From 63d133f8e01d65aa715d91295e5f3a955d2bd3ff Mon Sep 17 00:00:00 2001 From: OrpheeGT Date: Sat, 26 Feb 2022 14:37:04 +0100 Subject: [PATCH 1/4] add dwarves dependency --- build/proxmox/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/proxmox/build.sh b/build/proxmox/build.sh index acaddb1..d6d4243 100755 --- a/build/proxmox/build.sh +++ b/build/proxmox/build.sh @@ -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 From d46193c19eb498e916f02a0fc5496e7a4792630d Mon Sep 17 00:00:00 2001 From: OrpheeGT Date: Sat, 26 Feb 2022 14:38:12 +0100 Subject: [PATCH 2/4] PVE 7.1-10 OIMMU patch --- patches/add-relaxable-rmrr-5_13.patch | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 patches/add-relaxable-rmrr-5_13.patch diff --git a/patches/add-relaxable-rmrr-5_13.patch b/patches/add-relaxable-rmrr-5_13.patch new file mode 100644 index 0000000..427eed2 --- /dev/null +++ b/patches/add-relaxable-rmrr-5_13.patch @@ -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; From 38fa9496d38a3b3d7271092ffb8037f9857a779a Mon Sep 17 00:00:00 2001 From: OrpheeGT Date: Sat, 26 Feb 2022 14:38:59 +0100 Subject: [PATCH 3/4] Build 7.1-10 script --- build/proxmox/build7.1-10.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 build/proxmox/build7.1-10.sh diff --git a/build/proxmox/build7.1-10.sh b/build/proxmox/build7.1-10.sh new file mode 100644 index 0000000..e3c15f3 --- /dev/null +++ b/build/proxmox/build7.1-10.sh @@ -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 From 3fc331b6584d7c55ed83bf3176475066f3c4d949 Mon Sep 17 00:00:00 2001 From: OrpheeGT Date: Sun, 27 Feb 2022 12:11:08 +0100 Subject: [PATCH 4/4] Create add-relaxable-rmrr-5_15.patch --- patches/add-relaxable-rmrr-5_15.patch | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 patches/add-relaxable-rmrr-5_15.patch diff --git a/patches/add-relaxable-rmrr-5_15.patch b/patches/add-relaxable-rmrr-5_15.patch new file mode 100644 index 0000000..365061d --- /dev/null +++ b/patches/add-relaxable-rmrr-5_15.patch @@ -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;