lkml.org 
[lkml]   [2018]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kdump, vmcoreinfo: Export value to tell if 5-level is enabled
Date
Userspace utility needs to know if the corrupted kernel is in
5-level paging mode. So write 'pgtable_l5_enabled' to vmcoreinfo.
It covers below three cases:
pgtable_l5_enabled == 0 when
Compile kernel with CONFIG_X86_5LEVEL=n
Compile with CONFIG_X86_5LEVEL=y while cpu has no 'la57' flag

pgtable_l5_enabled != 0 when
Compile with CONFIG_X86_5LEVEL=y and cpu has 'la57' flag

Signed-off-by: Baoquan He <bhe@redhat.com>
---
arch/x86/kernel/machine_kexec_64.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index 1f790cf9d38f..5f3545eaa76a 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -350,6 +350,7 @@ void arch_crash_save_vmcoreinfo(void)
{
VMCOREINFO_NUMBER(phys_base);
VMCOREINFO_SYMBOL(init_top_pgt);
+ VMCOREINFO_NUMBER(pgtable_l5_enabled);

#ifdef CONFIG_NUMA
VMCOREINFO_SYMBOL(node_data);
--
2.13.6
\
 
 \ /
  Last update: 2018-03-02 06:18    [W:0.055 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site