From: Baoquan He <bhe@redhat.com>
To: kexec@lists.infradead.org
Cc: douly.fnst@cn.fujitsu.com, indou.takao@jp.fujitsu.com,
mas-hayashi@tg.jp.nec.com, Baoquan He <bhe@redhat.com>,
mas-tachibana@vf.jp.nec.com
Subject: [PATCH 3/4] Makedumpfile: Add a new function check_5level_paging()
Date: Fri, 2 Mar 2018 13:48:40 +0800 [thread overview]
Message-ID: <20180302054841.22195-4-bhe@redhat.com> (raw)
In-Reply-To: <20180302054841.22195-1-bhe@redhat.com>
Use it to check if the corrupted kernel is in 5-level paging.
Signed-off-by: Baoquan He <bhe@redhat.com>
---
arch/x86_64.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/x86_64.c b/arch/x86_64.c
index cbe45c2..e88ee0b 100644
--- a/arch/x86_64.c
+++ b/arch/x86_64.c
@@ -33,6 +33,15 @@ get_xen_p2m_mfn(void)
return NOT_FOUND_LONG_VALUE;
}
+static int
+check_5level_paging(void)
+{
+ if (NUMBER(pgtable_l5_enabled) != 0)
+ return TRUE;
+ else
+ return FALSE;
+}
+
unsigned long
get_kaslr_offset_x86_64(unsigned long vaddr)
{
--
2.13.6
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2018-03-02 5:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 5:48 [PATCH 0/4] Makedumpfile: Add 5-level paging support Baoquan He
2018-03-02 5:48 ` [PATCH 1/4] arch/x86_64: Cleanup the address translation of the 4-level page tables Baoquan He
2018-05-07 7:19 ` Masaki Tachibana
2018-05-07 7:30 ` Dou Liyang
2018-05-07 7:31 ` Baoquan He
2018-03-02 5:48 ` [PATCH 2/4] Makedumpfile: Add pgtable_l5_enabled to number_table Baoquan He
2018-05-07 7:20 ` Masaki Tachibana
2018-05-07 7:33 ` Dou Liyang
2018-03-02 5:48 ` Baoquan He [this message]
2018-05-07 7:21 ` [PATCH 3/4] Makedumpfile: Add a new function check_5level_paging() Masaki Tachibana
2018-05-07 8:03 ` Baoquan He
2018-03-02 5:48 ` [PATCH 4/4] arch/x86_64: Add 5-level paging support Baoquan He
2018-05-07 7:22 ` Masaki Tachibana
2018-04-12 2:45 ` [PATCH 0/4] Makedumpfile: " Baoquan He
2018-04-12 4:42 ` Masaki Tachibana
2018-04-12 4:55 ` 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=20180302054841.22195-4-bhe@redhat.com \
--to=bhe@redhat.com \
--cc=douly.fnst@cn.fujitsu.com \
--cc=indou.takao@jp.fujitsu.com \
--cc=kexec@lists.infradead.org \
--cc=mas-hayashi@tg.jp.nec.com \
--cc=mas-tachibana@vf.jp.nec.com \
/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