From patchwork Sun Mar 10 10:04:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 10846265 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 191271823 for ; Sun, 10 Mar 2019 10:05:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1AAE287E3 for ; Sun, 10 Mar 2019 10:04:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E25FF28FD2; Sun, 10 Mar 2019 10:04:59 +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 D318F287E3 for ; Sun, 10 Mar 2019 10:04:58 +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=LoA7yBMXEzW5PE+hnyCbdMCa0ayTPBjz8XiEQd8Hgmk=; b=Fwt 5bgUPjS+YZq/ojHdJOrtg5QWJ72EpA+D4yK/fAUjBwzVGyV6vJ7lToNFqXvnYU7ZYzAgzy4tP6+0z s0XnOM8K0IPzaXc5NSc3nkojrEuisnaLIUi8ob5BnbQMusXyE0gpGJMqkkKiWvbwVkKImE3+imLVJ ShRn941hQibbtUxfMWIz7uV5OyyQgQCCTbAcGtMIQ01qTeVxBHYs12d3XoRtwgpW/DE1jp1ktoLa/ NFxcpoPhaq25Yt4l/JoR7q9n0fKES1EeBTs5UiUw6+Emn/Um/1bjMnVYeyTxnLjzbOkL/n5VcLy1U TUkCp4nandU7ufva8a4Eqv/Sy4J7cgw==; 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 1h2vKD-0007Ni-It; Sun, 10 Mar 2019 10:04:57 +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 1h2vK9-0007Mx-Lr for linux-arm-kernel@lists.infradead.org; Sun, 10 Mar 2019 10:04:55 +0000 Received: by mail-pg1-f193.google.com with SMTP id h11so1721227pgl.0 for ; Sun, 10 Mar 2019 03:04:53 -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=LV3A1K28ZzdlaXBJ+m4jDlY+1loO1xTntknB7j9GNVc=; b=WmtykyMlCo7lHMe/ZCyJT7RY1D5NuKE15FmJvS+DDdX2VJYI5Vo1Z788Frrl5bnKQl J9D9A3SKz7BAVS+efkwrK5eOEaQG9dAuWmJL+3m0yH7nJECqebyxZETm98cPszx1gUr/ AbSu0UHts8SI5vgHKxUJ54x95D5aw09Up4ZzvlMN2gcTBbK05gxpAFjRx/gv1aNjse7w ZiROCZo2AfMogD8W9WJ4niZfonwCsMJ1Ewt5cCUJY+9xUOJbsVABD+VoumewrjSDx8YX HPyx8GHgDdOWWnQHhbx9neKdV3F6kWIVGv/2TIuTF0FESuVF7MyDaIKB4cWzCXBEMjq1 Yhaw== X-Gm-Message-State: APjAAAVfKjlGDD2fmQ5RLTrAhUvoIyRoZjw0ixS8e7kchw8zNHP0HeqY TXXXg5EmF6qczBhftaQUA5qhAw== X-Google-Smtp-Source: APXvYqwvqV+s+YSa4RrgVVU1zmYLlcj68VnkbN9gYn1E1+qoEavuXS/+Gku4N9ALNKZJO+0AiddaFQ== X-Received: by 2002:a63:ed45:: with SMTP id m5mr3439137pgk.265.1552212292391; Sun, 10 Mar 2019 03:04:52 -0700 (PDT) Received: from localhost ([106.215.118.61]) by smtp.gmail.com with ESMTPSA id o2sm7496739pgq.29.2019.03.10.03.04.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2019 03:04:51 -0700 (PDT) From: Bhupesh Sharma To: linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] Append new variables to vmcoreinfo (PTRS_PER_PGD for arm64 and MAX_PHYSMEM_BITS for all archs) Date: Sun, 10 Mar 2019 15:34:00 +0530 Message-Id: <1552212242-9479-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-20190310_030453_707285_44C96992 X-CRM114-Status: GOOD ( 11.89 ) 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 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) during v1 review, 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 (2): arm64, vmcoreinfo : Append 'PTRS_PER_PGD' to vmcoreinfo crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo arch/arm64/kernel/crash_core.c | 1 + kernel/crash_core.c | 1 + 2 files changed, 2 insertions(+)