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 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 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; 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;