From caa841360134f863987f2d4f77b8dc2fbb7596f8 Mon Sep 17 00:00:00 2001 From: Nadav Amit Date: Sat, 4 May 2019 18:11:24 -0700 Subject: x86/mm: Initialize PGD cache during mm initialization Poking-mm initialization might require to duplicate the PGD in early stage. Initialize the PGD cache earlier to prevent boot failures. Reported-by: kernel test robot Signed-off-by: Nadav Amit Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rick Edgecombe Cc: Rik van Riel Cc: Stephen Rothwell Cc: Thomas Gleixner Fixes: 4fc19708b165 ("x86/alternatives: Initialize temporary mm for patching") Link: http://lkml.kernel.org/r/20190505011124.39692-1-namit@vmware.com Signed-off-by: Ingo Molnar --- init/main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'init/main.c') diff --git a/init/main.c b/init/main.c index 95dd9406ee31..9dc2f3b4f753 100644 --- a/init/main.c +++ b/init/main.c @@ -506,6 +506,8 @@ void __init __weak mem_encrypt_init(void) { } void __init __weak poking_init(void) { } +void __init __weak pgd_cache_init(void) { } + bool initcall_debug; core_param(initcall_debug, initcall_debug, bool, 0644); @@ -537,6 +539,7 @@ static void __init mm_init(void) init_espfix_bsp(); /* Should be run after espfix64 is set up. */ pti_init(); + pgd_cache_init(); } void __init __weak arch_call_rest_init(void) -- cgit v1.2.3