Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp443892imw; Thu, 14 Jul 2022 04:34:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uU0L+XT6Hk5iZXuwInqRizV0fJ/UKbuUCrrsF8Phkfh1GNUYFWuArq2n6D6RvN0ertuUwo X-Received: by 2002:a17:90b:388f:b0:1f0:51fe:9b2d with SMTP id mu15-20020a17090b388f00b001f051fe9b2dmr9493435pjb.162.1657798486548; Thu, 14 Jul 2022 04:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657798486; cv=none; d=google.com; s=arc-20160816; b=iKCButVXpcMsVuo+WQIRxELAoCh63cTkmzAUazi/z06ygysKFCgMLbczc3HWLnzQ6U s7RO0IeKokp+mDtqjDJ5T9usdm+khtY+SA9gp5ecCgL67nyOIzTbsFw8llWcHpYA4KzS +VvFAaCYHMpyUGOOgOQSuRuEGeevJAeb9nbm+zxOAUhu/+J1oTMNA1XJOJhsVVjZcuJg Pp9Yv8mtAFYGiKyL2FXNVlCLhVKRE2iPvByXfGT/8mkL6lZoNAmHd2fQ0pKKFOHyvAfG C0vImkOt/NG3JornObZAQkEcsCLZQfVYY8s7l8zgXWKdilwmr5S3ah0Beg/Xy0f1CIbc HyEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=PENEj3g8xg37tIDkYbUKvxbvtwSGFYKTVCPuDyhjo4U=; b=J+YgC0AvBZ2T8tGN5qkg/VBU7BerSW5URs1wG3v8ZzZxrm20atWjINdUSDlnsZfaY5 +ilVbjt1uagZYZ/ulRi7tTHTVEdEO9v7a8/rlCU/Tg+zJxJlBQcNNX/MIZRSQQb8dFgm 8IvnD6K/QYysCg/JTP9y62uOxt8oSL5sYZJk0GKqIIZ7roYlpw80BVoy9dhuj7IbV3RC EKwRg3Dxx/uonF5j81041g6+wcqfRquHblqmEFXKZuKUWWyp46A/u8OBmyqFEajOL2/G +D/IlYE34xnXqysXLwK/3YDT0lZLTtHj9ltL9G5zm1oZ9Hui7i9ZPpg39YWy0cuHqw5l zHAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k18-20020a170902ba9200b0016a6b9c2b5csi1505337pls.234.2022.07.14.04.34.25; Thu, 14 Jul 2022 04:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238928AbiGNLdM (ORCPT + 99 others); Thu, 14 Jul 2022 07:33:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238900AbiGNLdJ (ORCPT ); Thu, 14 Jul 2022 07:33:09 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8D3E13FAC for ; Thu, 14 Jul 2022 04:33:07 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VJJBi4t_1657798382; Received: from localhost(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VJJBi4t_1657798382) by smtp.aliyun-inc.com; Thu, 14 Jul 2022 19:33:03 +0800 From: Xianting Tian To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, alexandre.ghiti@canonical.com, guoren@kernel.org, anup@brainfault.org, mick@ics.forth.gr, rppt@kernel.org, heiko@sntech.de Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, huanyi.xj@alibaba-inc.com, Xianting Tian Subject: [PATCH V3 0/2] Improve vmcoreinfo and memory layout dump Date: Thu, 14 Jul 2022 19:32:58 +0800 Message-Id: <20220714113300.367854-1-xianting.tian@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series are the improvements for vmcoreinfo and memory layout dump. The first patch(1/2) is to add VM layout to vmcoreinfo, which can simlify the development of crash tool as ARM64 already did (arch/arm64/kernel/crash_core.c). The second patch(2/2) is to add MODULES to memory layout dump. Changes v1 -> v2: patch 1: add VA_BITS to vmcoreinfo as ARM64 does, not satp_mode. crash tool can read VA_BITS to determin the pagetable levels. patch 1,2: As MODULES area is only defined when CONFIG_64BIT=y for riscv64, so only use MODULES area when CONFIG_64BIT=y. Changes v2 -> v3: patch 1,2: use "#ifdef CONFIG_64BIT" instead of "IS_ENABLED(CONFIG_64BIT)" when check whether MODULES area is available. Xianting Tian (2): RISC-V: Add arch_crash_save_vmcoreinfo support riscv: Add modules to virtual kernel memory layout dump arch/riscv/kernel/Makefile | 1 + arch/riscv/kernel/crash_core.c | 29 +++++++++++++++++++++++++++++ arch/riscv/mm/init.c | 4 ++++ 3 files changed, 34 insertions(+) create mode 100644 arch/riscv/kernel/crash_core.c -- 2.17.1