OSDN Git Service

kdump, vmcoreinfo: Export pgtable_l5_enabled value
authorBaoquan He <bhe@redhat.com>
Fri, 2 Mar 2018 05:18:01 +0000 (13:18 +0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 12 Mar 2018 08:43:56 +0000 (09:43 +0100)
commitc100a583601d357f923c41af5434dc1f8d07890f
tree57fdba08df370ee286a6a935dec2e9f624fb4254
parente9d0e6330eb81ca49bdd8849cc52b3b0f70ed5cb
kdump, vmcoreinfo: Export pgtable_l5_enabled value

User-space utilities examining crash-kernels need to know if the
crashed kernel was in 5-level paging mode or not.

So write 'pgtable_l5_enabled' to vmcoreinfo, which covers these
three cases:

  pgtable_l5_enabled == 0 when:
   - Compiled with !CONFIG_X86_5LEVEL
   - Compiled with CONFIG_X86_5LEVEL=y while CPU has no 'la57' flag

  pgtable_l5_enabled != 0 when:
   - Compiled with CONFIG_X86_5LEVEL=y and CPU has 'la57' flag

Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: douly.fnst@cn.fujitsu.com
Cc: dyoung@redhat.com
Cc: ebiederm@xmission.com
Cc: kirill.shutemov@linux.intel.com
Cc: vgoyal@redhat.com
Link: http://lkml.kernel.org/r/20180302051801.19594-1-bhe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/machine_kexec_64.c