summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/mtrr
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2023-05-02 14:09:30 +0200
committerBorislav Petkov (AMD) <bp@alien8.de>2023-06-01 15:04:33 +0200
commit12f0dd8df14285a5604f35ed3af8b8c33e8fd97f (patch)
treee4f9b1e89503c63dde760ace4ef7e4ed7d1ab226 /arch/x86/kernel/cpu/mtrr
parent973df1942068c0cc72244ce7dce5e5aeca03ad5f (diff)
x86/mm: Only check uniform after calling mtrr_type_lookup()
Today pud_set_huge() and pmd_set_huge() test for the MTRR type to be WB or INVALID after calling mtrr_type_lookup(). Those tests can be dropped as the only reason not to use a large mapping would be uniform being 0. Any MTRR type can be accepted as long as it applies to the whole memory range covered by the mapping, as the alternative would only be to map the same region with smaller pages instead, using the same PAT type as for the large mapping. [ bp: Massage commit message. ] Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Tested-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/20230502120931.20719-16-jgross@suse.com Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr')
0 files changed, 0 insertions, 0 deletions