>
> Date: Mon, 27 Sep 2021 14:29:25 +0800
> From: lijiang <[email protected]>
> To: "Discussion list for crash utility usage,   maintenance and
>         development" <[email protected]>
> Subject: Re: [Crash-utility] [PATCH] arm64 : assign page_offset and
>         kvbase  based on VA_BITS passed
> Message-ID:
>         <
> canu+zyffmhocjixy1f1v7ypdrtq+eeukxxt-pxsw2h5q2ch...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> >> Date: Thu, 23 Sep 2021 01:46:31 +0530
> >> From: Ankur Bansal <[email protected]>
> >> To: [email protected]
> >> Cc: Ankur Bansal <[email protected]>
> >> Subject: [Crash-utility] [PATCH] arm64 : assign page_offset and kvbase
> >>         based   on VA_BITS passed
> >> Message-ID:
> >>         <[email protected]>
> >> Content-Type: text/plain; charset="US-ASCII"
> >>
> >> assign page_offset and kvbase based on VA_BITS passed
> >>
>
> >Thank you for the patch, Ankur.
> >Can you help to describe the reason in detail? And what happened?
>

Hi Lianbo, Raw ramdump without vmcoreinfo doesn't work here.
read_vmcoreinfo("NUMBER(BA_BITS)") will not work on raw ramdump.
getting below error

crash_64: vmlinux and /var/tmp/ramdump_elf_XUtCMT do not match!
Usage:
crash [OPTION]... NAMELIST MEMORY-IMAGE[@address
<https://github.com/address>] (dumpfile form)
crash [OPTION]... [NAMELIST] (live system form)
Enter "crash_64 -h" for details.

Recent change
https://github.com/crash-utility/crash/commit/167d37e347fe35c6f7db826e8539e192c4375564
is causing this issue, before this change VA_BITS_ACTUAL was used which is
passed from cmd line.

3987 static void
3988 arm64_calc_VA_BITS(void)
3989 {
3990     int bitval;
3991     struct syment *sp;
3992     ulong vabits_actual, value;
3993     char *string;
3994
3995     if ((string = pc->read_vmcoreinfo("NUMBER(VA_BITS)"))) {
3996         value = atol(string);
3997         free(string);
3998         machdep->machspec->CONFIG_ARM64_VA_BITS = value;
3999     }



> >Thanks.
> >Lianbo
>
> >> Change-Id: I525f3c7fd91e1f06e909c2f4c1749c44c068baea
> >> Signed-off-by: Ankur Bansal <[email protected]>
> >> ---
> >> arm64.c | 15 +++++++++++----
> >> 1 file changed, 11 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arm64.c b/arm64.c
> >> index 7069312..2dc77f7 100644
> >> --- a/arm64.c
> >> +++ b/arm64.c
> >> @@ -220,10 +220,17 @@ arm64_init(int when)
> >>
> >>                 /* vabits_actual introduced after mm flip, so it should
> be flipped layout */
> >>                 if (ms->VA_BITS_ACTUAL) {
> >> -                       ms->page_offset = ARM64_FLIP_PAGE_OFFSET;
> >> -                       /* useless on arm64 */
> >> -                       machdep->identity_map_base =
> ARM64_FLIP_PAGE_OFFSET;
> >> -                       machdep->kvbase = ARM64_FLIP_PAGE_OFFSET;
> >> +                       if ((pc->flags2 & SNAP)) {
> >> +                               ms->page_offset =
> ARM64_FLIP_PAGE_OFFSET;
> >> +                               /* useless on arm64 */
> >> +                               machdep->identity_map_base =
> ARM64_FLIP_PAGE_OFFSET;
> >> +                               machdep->kvbase =
> ARM64_FLIP_PAGE_OFFSET;
> >> +                       }
> >> +                       else{
> >> +                               ms->page_offset =
> ARM64_FLIP_PAGE_OFFSET_ACTUAL;
> >> +                               machdep->identity_map_base =
> ARM64_FLIP_PAGE_OFFSET_ACTUAL;
> >> +                               machdep->kvbase =
> ARM64_FLIP_PAGE_OFFSET_ACTUAL;
> >> +                       }
> >>                         ms->userspace_top = ARM64_USERSPACE_TOP_ACTUAL;
> >>                 } else {
> >>                         ms->page_offset = ARM64_PAGE_OFFSET;
> >> --
> >> 2.7.4
>
>
>
> ------------------------------
>
> --
> Crash-utility mailing list
> [email protected]
> https://listman.redhat.com/mailman/listinfo/crash-utility
>
> End of Crash-utility Digest, Vol 192, Issue 28
> **********************************************
>
>
--
Crash-utility mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/crash-utility

Reply via email to