From: Xianting Tian <xianting.tian@linux.alibaba.com>
To: Song Shuai <suagrfillet@gmail.com>,
bhe@redhat.com, vgoyal@redhat.com, dyoung@redhat.com,
corbet@lwn.net, paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, anup@brainfault.org, robh@kernel.org,
ajones@ventanamicro.com, alexghiti@rivosinc.com,
conor.dooley@microchip.com
Cc: kexec@lists.infradead.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [RESEND PATCH -fixes 1/2] riscv: Export va_kernel_pa_offset in vmcoreinfo
Date: Tue, 25 Jul 2023 09:52:36 +0800 [thread overview]
Message-ID: <f452ad3e-c0cd-8d02-48af-f20497875b68@linux.alibaba.com> (raw)
In-Reply-To: <20230724100917.309061-1-suagrfillet@gmail.com>
在 2023/7/24 下午6:09, Song Shuai 写道:
> Since RISC-V Linux v6.4, the commit 3335068f8721 ("riscv: Use
> PUD/P4D/PGD pages for the linear mapping") changes phys_ram_base
> from the physical start of the kernel to the actual start of the DRAM.
>
> The Crash-utility's VTOP() still uses phys_ram_base and kernel_map.virt_addr
> to translate kernel virtual address, that failed the Crash with Linux v6.4 [1].
>
> Export kernel_map.va_kernel_pa_offset in vmcoreinfo to help Crash translate
> the kernel virtual address correctly.
>
> Fixes: 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping")
> Link: https://lore.kernel.org/linux-riscv/20230724040649.220279-1-suagrfillet@gmail.com/ [1]
> Signed-off-by: Song Shuai <suagrfillet@gmail.com>
> ---
> arch/riscv/kernel/crash_core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/kernel/crash_core.c b/arch/riscv/kernel/crash_core.c
> index b351a3c01355..55f1d7856b54 100644
> --- a/arch/riscv/kernel/crash_core.c
> +++ b/arch/riscv/kernel/crash_core.c
> @@ -18,4 +18,6 @@ void arch_crash_save_vmcoreinfo(void)
> vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
> #endif
> vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
> + vmcoreinfo_append_str("NUMBER(va_kernel_pa_offset)=0x%lx\n",
> + kernel_map.va_kernel_pa_offset);
> }
Reviewed-by: Xianting Tian <xianting.tian@linux.alibaba.com>
next prev parent reply other threads:[~2023-07-25 1:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 10:09 Song Shuai
2023-07-24 10:09 ` [RESEND PATCH -fixes 2/2] Documentation: kdump: Add va_kernel_pa_offset for RISCV64 Song Shuai
2023-07-25 7:48 ` Alexandre Ghiti
2023-07-25 1:52 ` Xianting Tian [this message]
2023-07-25 7:46 ` [RESEND PATCH -fixes 1/2] riscv: Export va_kernel_pa_offset in vmcoreinfo Alexandre Ghiti
2023-08-03 14:45 ` Palmer Dabbelt
2023-08-03 15:10 ` patchwork-bot+linux-riscv
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=f452ad3e-c0cd-8d02-48af-f20497875b68@linux.alibaba.com \
--to=xianting.tian@linux.alibaba.com \
--cc=ajones@ventanamicro.com \
--cc=alexghiti@rivosinc.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=bhe@redhat.com \
--cc=conor.dooley@microchip.com \
--cc=corbet@lwn.net \
--cc=dyoung@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=suagrfillet@gmail.com \
--cc=vgoyal@redhat.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
all inboxes | Powered by JetHome®