From: Dave Young <dyoung@redhat.com>
To: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
Cc: Keiichirou Suzuki <kei-suzuki@xr.jp.nec.com>,
Jeff Mahoney <jeffm@suse.com>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>
Subject: Re: [PATCH] handle renamed init_level4_pgt -> init_top_pgt
Date: Fri, 22 Dec 2017 12:54:44 +0800 [thread overview]
Message-ID: <20171222045444.GA978@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <0910DD04CBD6DE4193FCF86B9C00BE9701F2D609@BPXM01GP.gisp.nec.co.jp>
Hi Atsushi,
On 12/21/17 at 08:48am, Atsushi Kumagai wrote:
> Hello Dave,
>
> >[dyoung@dhcp-*-* makedumpfile]$ sudo ./makedumpfile -l -d 31 /mnt/vmcore/vmcore /tmp/vmcore.1
> >The kernel version is not supported.
> >The makedumpfile operation may be incomplete.
> >Checking for memory holes : [100.0 %] | __vtop4_x86_64: Can't get a valid pte.
> >readmem: Can't convert a virtual address(ffff88007ebb1000) to physical address.
> >readmem: type_addr: 0, addr:ffff88007ebb1000, size:32768
> >__exclude_unnecessary_pages: Can't read the buffer of struct page.
> >create_2nd_bitmap: Can't exclude unnecessary pages.
> >
> >makedumpfile Failed.
> >
> >If you need the vmcore for debugging please let me know, my test is just
> >a normal test in kvm guest.
>
> Thanks for your report.
> I can't reproduce that in my environment, could you give me the vmcore ?
> It's helpful if you append the vmlinux and the .config.
I'm bisecting it, nearly finished, will post the results and share
vmcore if needed soon.
>
> Thanks,
> Atsushi Kumagai
>
> >> >>Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> >> >>---
> >> >> arch/x86_64.c | 24 +++++++++++++++++++++---
> >> >> makedumpfile.c | 6 ++++++
> >> >> makedumpfile.h | 2 ++
> >> >> 3 files changed, 29 insertions(+), 3 deletions(-)
> >> >>
> >> >>diff --git a/arch/x86_64.c b/arch/x86_64.c
> >> >>index 08dd6b2..9b09035 100644
> >> >>--- a/arch/x86_64.c
> >> >>+++ b/arch/x86_64.c
> >> >>@@ -259,16 +259,26 @@ vtop4_x86_64(unsigned long vaddr)
> >> >> {
> >> >> unsigned long page_dir, pml4, pgd_paddr, pgd_pte, pmd_paddr, pmd_pte;
> >> >> unsigned long pte_paddr, pte;
> >> >>+ unsigned long init_level4_pgt;
> >> >>
> >> >>- if (SYMBOL(init_level4_pgt) == NOT_FOUND_SYMBOL) {
> >> >>+ if (SYMBOL(init_level4_pgt) != NOT_FOUND_SYMBOL)
> >> >>+ init_level4_pgt = SYMBOL(init_level4_pgt);
> >> >>+ else if (SYMBOL(init_top_pgt) != NOT_FOUND_SYMBOL)
> >> >>+ init_level4_pgt = SYMBOL(init_top_pgt);
> >> >>+ else {
> >> >> ERRMSG("Can't get the symbol of init_level4_pgt.\n");
> >> >> return NOT_PADDR;
> >> >> }
> >> >>
> >> >>+ if (SYMBOL(level4_kernel_pgt) != NOT_FOUND_SYMBOL) {
> >> >>+ ERRMSG("Kernel is built with 5-level page tables\n");
> >> >>+ return NOT_PADDR;
> >> >>+ }
> >> >>+
> >> >> /*
> >> >> * Get PGD.
> >> >> */
> >> >>- page_dir = SYMBOL(init_level4_pgt) - __START_KERNEL_map + info->phys_base;
> >> >>+ page_dir = init_level4_pgt - __START_KERNEL_map + info->phys_base;
> >> >> if (is_xen_memory()) {
> >> >> page_dir = ptom_xen(page_dir);
> >> >> if (page_dir == NOT_PADDR)
> >> >>@@ -549,8 +559,16 @@ find_vmemmap_x86_64()
> >> >> struct vmap_pfns *vmapp, *vmaphead = NULL, *cur, *tail;
> >> >>
> >> >> init_level4_pgt = SYMBOL(init_level4_pgt);
> >> >>+ if (init_level4_pgt == NOT_FOUND_SYMBOL)
> >> >>+ init_level4_pgt = SYMBOL(init_top_pgt);
> >> >>+
> >> >> if (init_level4_pgt == NOT_FOUND_SYMBOL) {
> >> >>- ERRMSG("init_level4_pgt not found\n");
> >> >>+ ERRMSG("init_level4_pgt/init_top_pgt not found\n");
> >> >>+ return FAILED;
> >> >>+ }
> >> >>+
> >> >>+ if (SYMBOL(level4_kernel_pgt) != NOT_FOUND_SYMBOL) {
> >> >>+ ERRMSG("kernel is configured for 5-level page tables\n");
> >> >> return FAILED;
> >> >> }
> >> >> pagestructsize = size_table.page;
> >> >>diff --git a/makedumpfile.c b/makedumpfile.c
> >> >>index f85003a..6e5ec34 100644
> >> >>--- a/makedumpfile.c
> >> >>+++ b/makedumpfile.c
> >> >>@@ -1486,6 +1486,8 @@ get_symbol_info(void)
> >> >> SYMBOL_INIT(_stext, "_stext");
> >> >> SYMBOL_INIT(swapper_pg_dir, "swapper_pg_dir");
> >> >> SYMBOL_INIT(init_level4_pgt, "init_level4_pgt");
> >> >>+ SYMBOL_INIT(level4_kernel_pgt, "level4_kernel_pgt");
> >> >>+ SYMBOL_INIT(init_top_pgt, "init_top_pgt");
> >> >> SYMBOL_INIT(vmlist, "vmlist");
> >> >> SYMBOL_INIT(vmap_area_list, "vmap_area_list");
> >> >> SYMBOL_INIT(node_online_map, "node_online_map");
> >> >>@@ -2105,6 +2107,8 @@ write_vmcoreinfo_data(void)
> >> >> WRITE_SYMBOL("_stext", _stext);
> >> >> WRITE_SYMBOL("swapper_pg_dir", swapper_pg_dir);
> >> >> WRITE_SYMBOL("init_level4_pgt", init_level4_pgt);
> >> >>+ WRITE_SYMBOL("level4_kernel_pgt", level4_kernel_pgt);
> >> >>+ WRITE_SYMBOL("init_top_pgt", init_top_pgt);
> >> >> WRITE_SYMBOL("vmlist", vmlist);
> >> >> WRITE_SYMBOL("vmap_area_list", vmap_area_list);
> >> >> WRITE_SYMBOL("node_online_map", node_online_map);
> >> >>@@ -2500,6 +2504,8 @@ read_vmcoreinfo(void)
> >> >> READ_SYMBOL("_stext", _stext);
> >> >> READ_SYMBOL("swapper_pg_dir", swapper_pg_dir);
> >> >> READ_SYMBOL("init_level4_pgt", init_level4_pgt);
> >> >>+ READ_SYMBOL("level4_kernel_pgt", level4_kernel_pgt);
> >> >>+ READ_SYMBOL("init_top_pgt", init_top_pgt);
> >> >> READ_SYMBOL("vmlist", vmlist);
> >> >> READ_SYMBOL("vmap_area_list", vmap_area_list);
> >> >> READ_SYMBOL("node_online_map", node_online_map);
> >> >>diff --git a/makedumpfile.h b/makedumpfile.h
> >> >>index 8a05794..9357e47 100644
> >> >>--- a/makedumpfile.h
> >> >>+++ b/makedumpfile.h
> >> >>@@ -1517,6 +1517,8 @@ struct symbol_table {
> >> >> unsigned long long _stext;
> >> >> unsigned long long swapper_pg_dir;
> >> >> unsigned long long init_level4_pgt;
> >> >>+ unsigned long long level4_kernel_pgt;
> >> >>+ unsigned long long init_top_pgt;
> >> >> unsigned long long vmlist;
> >> >> unsigned long long vmap_area_list;
> >> >> unsigned long long phys_base;
> >> >>
> >> >>
> >> >>--
> >> >>Jeff Mahoney
> >> >>SUSE Labs
> >> >
> >> >
> >> >
> >> >_______________________________________________
> >> >kexec mailing list
> >> >kexec@lists.infradead.org
> >> >http://lists.infradead.org/mailman/listinfo/kexec
> >>
> >>
> >> _______________________________________________
> >> kexec mailing list
> >> kexec@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/kexec
> >
> >Thanks
> >Dave
>
>
Thanks
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2017-12-22 4:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 10:20 [PATCH] handle renamed init_level4_pgt -> init_top_pgt Atsushi Kumagai
2017-12-08 8:15 ` Atsushi Kumagai
2017-12-20 7:24 ` Dave Young
2017-12-21 8:48 ` Atsushi Kumagai
2017-12-22 4:54 ` Dave Young [this message]
2017-12-22 5:48 ` Dave Young
2017-12-26 8:21 ` Atsushi Kumagai
2018-01-02 8:57 ` Dave Young
2018-01-02 9:08 ` Baoquan He
2018-01-03 2:30 ` makedumpfile saving vmcore fails with dynamically allocated mem_section (was: Re: [PATCH] handle renamed init_level4_pgt -> init_top_pgt) Dave Young
2018-01-03 2:38 ` Baoquan He
2018-01-05 8:19 ` Atsushi Kumagai
2018-01-06 5:36 ` Dave Young
2018-01-09 5:17 ` Atsushi Kumagai
2018-01-09 5:33 ` Dave Young
-- strict thread matches above, loose matches on Subject: below --
2017-11-07 2:52 [PATCH] handle renamed init_level4_pgt -> init_top_pgt Jeff Mahoney
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=20171222045444.GA978@dhcp-128-65.nay.redhat.com \
--to=dyoung@redhat.com \
--cc=ats-kumagai@wm.jp.nec.com \
--cc=jeffm@suse.com \
--cc=kei-suzuki@xr.jp.nec.com \
--cc=kexec@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).