Skip to content

Commit 1dbf30f

Browse files
jgross1Peter Zijlstra
authored andcommitted
x86/mm/pat: don't collapse pages without PSE set
Collapsing pages to a leaf PMD or PUD should be done only if X86_FEATURE_PSE is available, which is not the case when running e.g. as a Xen PV guest. Fixes: 41d8848 ("x86/mm/pat: restore large ROX pages after fragmentation") Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: Mike Rapoport (Microsoft) <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent 0b3bc01 commit 1dbf30f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/mm/pat/set_memory.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,9 @@ static int collapse_pmd_page(pmd_t *pmd, unsigned long addr,
12571257
pgprot_t pgprot;
12581258
int i = 0;
12591259

1260+
if (!cpu_feature_enabled(X86_FEATURE_PSE))
1261+
return 0;
1262+
12601263
addr &= PMD_MASK;
12611264
pte = pte_offset_kernel(pmd, addr);
12621265
first = *pte;

0 commit comments

Comments
 (0)