mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, tglx@linutronix.de,
	kirill.shutemov@linux.intel.com, hpa@zytor.com,
	dyoung@redhat.com, x86@kernel.org, ebiederm@xmission.com,
	douly.fnst@cn.fujitsu.com, vgoyal@redhat.com,
	Baoquan He <bhe@redhat.com>
Subject: [PATCH] kdump, vmcoreinfo: Export value to tell if 5-level is enabled
Date: Fri,  2 Mar 2018 13:18:01 +0800	[thread overview]
Message-ID: <20180302051801.19594-1-bhe@redhat.com> (raw)

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

             reply	other threads:[~2018-03-02  5:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02  5:18 Baoquan He [this message]
2018-03-02  7:36 ` Kirill A. Shutemov
2018-03-12  9:30 ` [tip:x86/mm] kdump, vmcoreinfo: Export pgtable_l5_enabled value tip-bot for Baoquan He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180302051801.19594-1-bhe@redhat.com \
    --to=bhe@redhat.com \
    --cc=douly.fnst@cn.fujitsu.com \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vgoyal@redhat.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome