2022-10-18 08:44:45

by Xianting Tian

[permalink] [raw]
Subject: [PATCH V3 0/2] Support VMCOREINFO export for RISCV64

As disscussed in below patch set, the patch of 'describe VMCOREINFO export in Documentation'
need to update according to Bagas's comments.
https://lore.kernel.org/linux-riscv/[email protected]/

As others patches in above patch set already applied, so this patch set only contains below two
patches.

------
Changes:
Fix commit message in patch 2: use "Document these RISCV64 exports above" instead of
"This patch just add the description of VMCOREINFO export for RISCV64."
V1 -> V2:
Remove unnecessary overline above header text in patch 2.
V2 -> V3:
Fix commit message in patch 1,2;
Use 'space' instead of 'region' for vmemmap description in patch 2.

Xianting Tian (2):
RISC-V: Add arch_crash_save_vmcoreinfo support
Documentation: kdump: describe VMCOREINFO export for RISCV64

.../admin-guide/kdump/vmcoreinfo.rst | 30 ++++++++++++++++++
arch/riscv/kernel/Makefile | 1 +
arch/riscv/kernel/crash_core.c | 29 +++++++++++++++++
3 files changed, 61 insertions(+)
create mode 100644 arch/riscv/kernel/crash_core.c

--
2.17.1


2022-10-18 09:04:39

by Xianting Tian

[permalink] [raw]
Subject: [PATCH V3 2/2] Documentation: kdump: describe VMCOREINFO export for RISCV64

The following interrelated definitions and ranges are needed by the kdump
crash tool, which are exported by "arch/riscv/kernel/crash_core.c":
VA_BITS,
PAGE_OFFSET,
phys_ram_base,
MODULES_VADDR ~ MODULES_END,
VMALLOC_START ~ VMALLOC_END,
VMEMMAP_START ~ VMEMMAP_END,
KASAN_SHADOW_START ~ KASAN_SHADOW_END,
KERNEL_LINK_ADDR ~ ADDRESS_SPACE_END

Document these RISCV64 exports above.

Signed-off-by: Xianting Tian <[email protected]>
Reviewed-by: Bagas Sanjaya <[email protected]>
---
.../admin-guide/kdump/vmcoreinfo.rst | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/Documentation/admin-guide/kdump/vmcoreinfo.rst b/Documentation/admin-guide/kdump/vmcoreinfo.rst
index 6726f439958c..96efcb03bd7d 100644
--- a/Documentation/admin-guide/kdump/vmcoreinfo.rst
+++ b/Documentation/admin-guide/kdump/vmcoreinfo.rst
@@ -595,3 +595,33 @@ X2TLB
-----

Indicates whether the crashed kernel enabled SH extended mode.
+
+RISCV64
+=======
+
+VA_BITS
+-------
+
+The maximum number of bits for virtual addresses. Used to compute the
+virtual memory ranges.
+
+PAGE_OFFSET
+-----------
+
+Indicates the virtual kernel start address of the direct-mapped RAM region.
+
+phys_ram_base
+-------------
+
+Indicates the start physical RAM address.
+
+MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END|KASAN_SHADOW_START|KASAN_SHADOW_END|KERNEL_LINK_ADDR|ADDRESS_SPACE_END
+----------------------------------------------------------------------------------------------------------------------------------------------------
+
+Used to get the correct ranges:
+
+ * MODULES_VADDR ~ MODULES_END : Kernel module space.
+ * VMALLOC_START ~ VMALLOC_END : vmalloc() / ioremap() space.
+ * VMEMMAP_START ~ VMEMMAP_END : vmemmap space, used for struct page array.
+ * KASAN_SHADOW_START ~ KASAN_SHADOW_END : kasan shadow space.
+ * KERNEL_LINK_ADDR ~ ADDRESS_SPACE_END : Kernel link and BPF space.
--
2.17.1