Add 0003-skip-pat-check.patch for VFIO

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-05-08 01:20:06 +01:00
parent dad504a5e1
commit 4bc37ad584
2 changed files with 54 additions and 1 deletions

51
0003-skip-pat-check.patch Normal file
View File

@@ -0,0 +1,51 @@
--- a/arch/x86/mm/pat/memtype_interval.c 2022-10-30 23:19:28.000000000 +0100
+++ b/arch/x86/mm/pat/memtype_interval.c 2022-11-03 20:49:00.370271855 +0100
@@ -33,6 +33,16 @@
* memtype_lock protects the rbtree.
*/
+int skip_pat_enable = 0;
+
+static int __init skip_pat_check(char *str)
+{
+ skip_pat_enable = 1;
+ pr_info("Disabled PAT check type (experimental)\n");
+ return 0;
+}
+early_param("skippatcheck", skip_pat_check);
+
static inline u64 interval_start(struct memtype *entry)
{
return entry->start;
@@ -86,19 +96,22 @@
if (entry_match == NULL)
goto success;
- if (entry_match->type != found_type && newtype == NULL)
- goto failure;
-
- dprintk("Overlap at 0x%Lx-0x%Lx\n", entry_match->start, entry_match->end);
- found_type = entry_match->type;
-
- entry_match = interval_iter_next(entry_match, start, end-1);
- while (entry_match) {
- if (entry_match->type != found_type)
+ if (!skip_pat_enable) {
+ if (entry_match->type != found_type && newtype == NULL)
goto failure;
+ dprintk("Overlap at 0x%Lx-0x%Lx\n", entry_match->start, entry_match->end);
+ found_type = entry_match->type;
+
entry_match = interval_iter_next(entry_match, start, end-1);
+ while (entry_match) {
+ if (entry_match->type != found_type)
+ goto failure;
+
+ entry_match = interval_iter_next(entry_match, start, end-1);
+ }
}
+
success:
if (newtype)
*newtype = found_type;

View File

@@ -20,6 +20,7 @@ source=(
config # the main kernel config file
0001-add-acs-overrides.patch
0002-i915-vga-arbiter.patch
0003-skip-pat-check.patch
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
@@ -30,7 +31,8 @@ validpgpkeys=(
sha256sums=('SKIP'
'c16920da137fc99ad5ec379d9be60546fc2c50fd9fbbb506d944f012d11b032d'
'd61f77fad364ca02b14d04ace86c149c40350db4c803e5a5045139fa7eede2cb'
'750c57539f17332cafe01a978a0133fc9500dbe37a411b823dad2eee66652cfc')
'750c57539f17332cafe01a978a0133fc9500dbe37a411b823dad2eee66652cfc'
'd37258e84eb1d55c6206300acfc5f12ca4f97aa2e9d9f7cd446451428f7dc1b6')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase