]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
x86/mm: Disable 1GB direct mappings when disabling 2MB mappings
authorVlastimil Babka <vbabka@suse.cz>
Mon, 12 Jun 2017 07:21:30 +0000 (09:21 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 13 Jun 2017 06:33:00 +0000 (08:33 +0200)
commitd9ee35acfabbc909c3be4360cd5655a006628b2e
tree63e917752db67d24d0f2c37f8116ee8463e11c5c
parent8a524f803a3e0290cdba6d373361b2cef9752934
x86/mm: Disable 1GB direct mappings when disabling 2MB mappings

The kmemleak and debug_pagealloc features both disable using huge pages for
direct mappings so they can do cpa() on page level granularity in any context.

However they only do that for 2MB pages, which means 1GB pages can still be
used if the CPU supports it, unless disabled by a boot param, which is
non-obvious. Disable also 1GB pages when disabling 2MB pages.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vegard Nossum <vegardno@ifi.uio.no>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/2be70c78-6130-855d-3dfa-d87bd1dd4fda@suse.cz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/init.c