From patchwork Fri Nov 29 19:28:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 11267567 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 393C3139A for ; Fri, 29 Nov 2019 19:29:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FE8F21781 for ; Fri, 29 Nov 2019 19:29:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Z8wVZiFc"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NsNuYhzT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FE8F21781 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=J5y8cOLmbeFy3gR01Pg4yxq8pLSqPWtBf8Qxc/5zCG0=; b=Z8w VZiFcu7K6rfdGdZGNil5YEyrez+Tvb44PU5e1SdcMi4Gf0uQmcbRIIS34/dmzFvLYO4geNgm5qDed amrqxMfwSaf6mmvOBYHVqEnHztzDpQgvbEUE1ET9DvKvtjXSZmKfFxtUFCjIphE4vi3RAYF7kE2jU ZEPkScSvZwXvz6oFjaNZDsr7O6H31rDEK5JaHXighg26/PULMc1fxRmcxfjuPtY2Jy4U1KBFfj09A qqYoCoc3YJYQw5HLC8JoXYgvZeftGuCWFTARC5RVipeUTr+r2NRp+fgMgCD/6MiBT5s28MbkIPzJ9 TGhZ9iXXfqqKzrrdA41oI5Vt622YE0w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ialxB-0005ic-PL; Fri, 29 Nov 2019 19:29:21 +0000 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120] helo=us-smtp-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ialx7-0005hx-3r for linux-arm-kernel@lists.infradead.org; Fri, 29 Nov 2019 19:29:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575055755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1Y9WHtaAY4UzSoPOoSv2m/ifwl+YEceF+RKR3CTCTk=; b=NsNuYhzTwVrLZGhNE92K/yThH8xyDn4F0g0etJql25ITsUHIulxGVpy4EB+Yt+osFYn3KD aqCUy1uio9gvNOu4N+0nk+VFCbF1aZkWVPXjTYvoOQm7dLe6yuMg91D9LkPZut//1P9WW9 c26hybJFl8zFXPC52oFbkbyqNiOnqQw= Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-179-F2HJEzReOOCXyAqzo5CXeA-1; Fri, 29 Nov 2019 14:29:13 -0500 Received: by mail-pl1-f198.google.com with SMTP id be1so2268080plb.1 for ; Fri, 29 Nov 2019 11:29:13 -0800 (PST) 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=+RGhDPWZi/m+uC+dFG9W5dCj6ubdgxgz1OjCUZFmMIs=; b=FMjckuCDBqpkF3NSWi/uckkT79rwLMqs/1lArrPMIW2903JYdtjQfU9NPR9Br/f2jA WijzjJofSPgp93KhcEUPqv272mdYkQqYxFJRfV0aRvagVxEFRXxuaAIXSdQp9kVouyNf zyUBgjNgEdSgQ2FmcIif1IWvOqWdD37dLyYRdu34ajtGyIdChYqXLF+OzTC+JqGw7Bt7 C3x/iaIzjNaDcjOPP10oM+uTjN+XPwJZaE7tdG3AooIQ+PcUx4joGB+IwyhKQNTILN2H VElpsRG++uEqgpYiiMk21KbKTq8F6J+aUUnrBa599CALOIhdhcP8oyW/HIeNFEGweB5c It2g== X-Gm-Message-State: APjAAAW5rn/x27Ax6SNC015kL/+0ea2qDhbFkphnnlEgc44KjS9O4uxa 4e6DY4j1CBXU/e57P932FZCxYaE7Cv3nxo0GolkA/TAbB6J+IsA1XDvMjUxUE88S4LCbYUOtzW3 kXlD1UqzLV38bwHZDMTO4gqRFFzztUvtr4NI= X-Received: by 2002:a17:90a:b38c:: with SMTP id e12mr20373943pjr.89.1575055752559; Fri, 29 Nov 2019 11:29:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxbsJq68B0VFjsjCP+XCq0F6XFF9siQwhdXf0KacvnZ7i830WNBU2oxnas4e3iBnGfWl5c1rw== X-Received: by 2002:a17:90a:b38c:: with SMTP id e12mr20373930pjr.89.1575055752286; Fri, 29 Nov 2019 11:29:12 -0800 (PST) Received: from localhost ([122.177.85.74]) by smtp.gmail.com with ESMTPSA id k10sm14560656pjs.31.2019.11.29.11.29.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Nov 2019 11:29:11 -0800 (PST) From: Bhupesh Sharma To: linux-kernel@vger.kernel.org Subject: [RESEND PATCH v5 0/5] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs) Date: Sat, 30 Nov 2019 00:58:41 +0530 Message-Id: <1575055726-23464-1-git-send-email-bhsharma@redhat.com> X-Mailer: git-send-email 2.7.4 X-MC-Unique: F2HJEzReOOCXyAqzo5CXeA-1 X-Mimecast-Spam-Score: 0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191129_112917_394173_7FB32472 X-CRM114-Status: GOOD ( 16.06 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [207.211.31.120 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-doc@vger.kernel.org, Benjamin Herrenschmidt , bhsharma@redhat.com, Paul Mackerras , Will Deacon , Ingo Molnar , Jonathan Corbet , Michael Ellerman , x86@kernel.org, Catalin Marinas , Dave Anderson , Thomas Gleixner , bhupesh.linux@gmail.com, linux-arm-kernel@lists.infradead.org, Kazuhito Hagio , Ard Biesheuvel , Steve Capper , kexec@lists.infradead.org, James Morse , Boris Petkov , linuxppc-dev@lists.ozlabs.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org - Resending the v5 version as Will Deacon reported that the patchset was split into two seperate threads while sending out. It was an issue with my 'msmtp' settings which is now fixed. Changes since v4: ---------------- - v4 can be seen here: http://lists.infradead.org/pipermail/kexec/2019-November/023961.html - Addressed comments from Dave and added patches for documenting new variables appended to vmcoreinfo documentation. - Added testing report shared by Akashi for PATCH 2/5. Changes since v3: ---------------- - v3 can be seen here: http://lists.infradead.org/pipermail/kexec/2019-March/022590.html - Addressed comments from James and exported TCR_EL1.T1SZ in vmcoreinfo instead of PTRS_PER_PGD. - Added a new patch (via [PATCH 3/3]), which fixes a simple typo in 'Documentation/arm64/memory.rst' 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 'vabits_actual' 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: Boris Petkov Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Jonathan Corbet Cc: James Morse Cc: Mark Rutland Cc: Will Deacon Cc: Steve Capper Cc: Catalin Marinas Cc: Ard Biesheuvel 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: linux-doc@vger.kernel.org Cc: kexec@lists.infradead.org Bhupesh Sharma (5): crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo Documentation/arm64: Fix a simple typo in memory.rst Documentation/vmcoreinfo: Add documentation for 'MAX_PHYSMEM_BITS' Documentation/vmcoreinfo: Add documentation for 'TCR_EL1.T1SZ' Documentation/admin-guide/kdump/vmcoreinfo.rst | 11 +++++++++++ Documentation/arm64/memory.rst | 2 +- arch/arm64/include/asm/pgtable-hwdef.h | 1 + arch/arm64/kernel/crash_core.c | 9 +++++++++ kernel/crash_core.c | 1 + 5 files changed, 23 insertions(+), 1 deletion(-)