From patchwork Wed Mar 20 05:09:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 10860825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66384922 for ; Wed, 20 Mar 2019 05:09:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7476C298A4 for ; Wed, 20 Mar 2019 05:09:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66194299AD; Wed, 20 Mar 2019 05:09:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DC00D298A4 for ; Wed, 20 Mar 2019 05:09:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=1hG2VjG7SuTnu+txC27qJ3KTfIlBEZMYq4HNTCVzm/k=; b=VOH Gfw3oKfBrst8mYz9ysnYQPSASz7We7/ImObYmrBMAWCMEbfnQJFiZ7RTL1BpCosP7gtS8S0C5+kis bZVn9kFgWxMMPeTBpB15Y49dsfgwb4gKqjB3pl2Pdwr7ZVNPFHO7QtS3amEumBAogN3Do1sDR2RU3 zZ2gVzs+v84Gdk8m+JuLovMvUaA/IYpUEc6MrJnX21XbJX8a98SlA9+Ie7FbtjNoyW3wO5e/dCRs6 y12kpOIVCi+JKoVZGg3HQkAlwgdOhLYyrMM1RJZ55Ggnf1qLouopGKtnhzNTT5i7SeDaEfClSJd8i I0+dCWqb+KGtYqzj/xzQcaWZoVbD3gQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6TU5-0004xv-SK; Wed, 20 Mar 2019 05:09:49 +0000 Received: from mail-pg1-f193.google.com ([209.85.215.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6TU1-0004wj-0S for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2019 05:09:47 +0000 Received: by mail-pg1-f193.google.com with SMTP id p6so850137pgh.9 for ; Tue, 19 Mar 2019 22:09:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zRNsdf+V/AK4P0Z2aSwS4lRRtyqJz6mWGX6inLxUzcw=; b=DqO7RUtd7sQF7naIOj9ypdMNAEVN5LGk8uMEAC2QUx9tf8x53oPD/9aPZlTYN8GjRG 1mWiOVkhiUhyRYrgcpK+EUIfU5BQbIkhFs2BA2MNvoVTjbd6Tnfs4FN2qmK/Np3tq+Ye YIav1EgrdVbZ8eLonpzGDTLArsF/E9yJ3aj5NnvjcZ/M5qpwJWGrB2/66TTBKQujwA6P LnzMbRMGvjkb8fa5+7YeHpTNk27kPPhrKtWnvBLHSUlIVUOE/Dt38hrE5Ns9YvxV/T2p w6fRSLGFINje6TZ5H3sMjxw44LJblHg+GEYUOREF9hIwaq5JH0H3yB4Ekiyk6uQDvBDc KD9w== X-Gm-Message-State: APjAAAWib1p4d8Kdl1rce15iAQ85C+BlMzlWYZTWbX12tghHleQynTQD L2+brxlgp8D9c0rTy4dLTHNjtA== X-Google-Smtp-Source: APXvYqwPAI1uQcQkOu6TsbGPh4BpCrHfy7St/TgYZeLCzp0v/5kAh9lS3UJX6Bw722ElXp09XHgbpw== X-Received: by 2002:a17:902:2bab:: with SMTP id l40mr5876361plb.273.1553058583841; Tue, 19 Mar 2019 22:09:43 -0700 (PDT) Received: from localhost ([122.177.144.121]) by smtp.gmail.com with ESMTPSA id p86sm1298564pfa.104.2019.03.19.22.09.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2019 22:09:42 -0700 (PDT) From: Bhupesh Sharma To: linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] Append new variables to vmcoreinfo (PTRS_PER_PGD for arm64 and MAX_PHYSMEM_BITS for all archs) Date: Wed, 20 Mar 2019 10:39:31 +0530 Message-Id: <1553058574-18606-1-git-send-email-bhsharma@redhat.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190319_220945_045919_B4F15C31 X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kazuhito Hagio , Michael Ellerman , bhsharma@redhat.com, x86@kernel.org, Will Deacon , linuxppc-dev@lists.ozlabs.org, kexec@lists.infradead.org, James Morse , linux-arm-kernel@lists.infradead.org, Benjamin Herrenschmidt , Boris Petkov , Thomas Gleixner , bhupesh.linux@gmail.com, Dave Anderson , Ingo Molnar , Paul Mackerras MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Changes since v2: ---------------- - v2 can be seen here: http://lists.infradead.org/pipermail/kexec/2019-March/022531.html - Protected 'MAX_PHYSMEM_BITS' vmcoreinfo variable under CONFIG_SPARSEMEM ifdef sections, as suggested by Kazu. - Updated vmcoreinfo documentation to add description about 'MAX_PHYSMEM_BITS' variable (via [PATCH 3/3]). Changes since v1: ---------------- - v1 was sent out as a single patch which can be seen here: http://lists.infradead.org/pipermail/kexec/2019-February/022411.html - v2 breaks the single patch into two independent patches: [PATCH 1/2] appends 'PTRS_PER_PGD' to vmcoreinfo for arm64 arch, whereas [PATCH 2/2] appends 'MAX_PHYSMEM_BITS' to vmcoreinfo in core kernel code (all archs) This patchset primarily fixes the regression reported in user-space utilities like 'makedumpfile' and 'crash-utility' on arm64 architecture with the availability of 52-bit address space feature in underlying kernel. These regressions have been reported both on CPUs which don't support ARMv8.2 extensions (i.e. LVA, LPA) and are running newer kernels and also on prototype platforms (like ARMv8 FVP simulator model) which support ARMv8.2 extensions and are running newer kernels. The reason for these regressions is that right now user-space tools have no direct access to these values (since these are not exported from the kernel) and hence need to rely on a best-guess method of determining value of 'PTRS_PER_PGD' and 'MAX_PHYSMEM_BITS' supported by underlying kernel. Exporting these values via vmcoreinfo will help user-land in such cases. In addition, as per suggestion from makedumpfile maintainer (Kazu), it makes more sense to append 'MAX_PHYSMEM_BITS' to vmcoreinfo in the core code itself rather than in arm64 arch-specific code, so that the user-space code for other archs can also benefit from this addition to the vmcoreinfo and use it as a standard way of determining 'SECTIONS_SHIFT' value in user-land. Cc: Mark Rutland Cc: James Morse Cc: Will Deacon Cc: Boris Petkov Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Dave Anderson Cc: Kazuhito Hagio Cc: x86@kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org Bhupesh Sharma (3): arm64, vmcoreinfo : Append 'PTRS_PER_PGD' to vmcoreinfo crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo Documentation/vmcoreinfo: Add documentation for 'MAX_PHYSMEM_BITS' Documentation/kdump/vmcoreinfo.txt | 5 +++++ arch/arm64/kernel/crash_core.c | 1 + kernel/crash_core.c | 1 + 3 files changed, 7 insertions(+)