Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3949598ybc; Thu, 14 Nov 2019 18:00:53 -0800 (PST) X-Google-Smtp-Source: APXvYqwC+1IDHi7GdCfZvMJuwGafU6tUNS7xgFNv4J77/k6bODp8nEi5mPpdlYVxnS8AGwDVleKf X-Received: by 2002:a17:906:5e52:: with SMTP id b18mr9911579eju.318.1573783253191; Thu, 14 Nov 2019 18:00:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573783253; cv=none; d=google.com; s=arc-20160816; b=Ouh4bYEpz9ttAOk5Qb/Mgh8fNkrRVQ7OdcV3t6CO7gz8RMT1OgjQLOL15YiaFLpjyo h7l2HZbF5zIwCSRzoOcoxlI9g1Ww6LdPKTOj9/TgLGm1X/RiXGCYkEnNRA4DVWckFk3z cHGEqz0YTWh+FRXN6yX8oBT6PZINjlAw474X7kuTq9yx2f6IeipKNecDh3wE5IlFhHmC IqNS+ZaviowEe9IdxALTytHqjCc3d9txFWhzhrY0wFgk8R25+ajy4k+AKRf0PE9tj5PP K2d+491uOndI/vlrdbvRgLNyp2CaaWXpEp7MBIVixAJhFdSiCsGThrWG6KeIc62SNNOS cp8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=UWeLycX3A0XaEIn+C9Dl7zk7yTPULHadgCfDLM9l7TE=; b=mamCVTbwZ0ovXY/zjJFaXsz+cuPYQbwLcKYBWlAgjeYJlePfULcz/1FU2iY+AD07ZQ 6NbZ8CBChZvjkvi8tuEj79hJuJxnPrQCBgvA2UQik/iFmpZlMb8OtolUuQqY2H9XCxK6 h3Z3RjBR3f7KMng9jBaEVYYzeaX5F5idU0gK/ujlD6DoP6qTBvQiAcQabC4tBpE35PjA VKyeDoD6qC9wdMoO1h8Vki+Ym/b8Lu4t0fxgeqENs19M3IHmHavyhW6SQQLvE7RZqvFm IAMfVumCrQeR8w8xvdcK+4QNh6DGSRqnWMLl8kL6x5Zrd9Xgxk68Wy9aukprbXnAyc/N PrSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ksvnu7eS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si5042328eds.146.2019.11.14.18.00.28; Thu, 14 Nov 2019 18:00:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ksvnu7eS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727513AbfKOB7H (ORCPT + 99 others); Thu, 14 Nov 2019 20:59:07 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:32884 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbfKOB7H (ORCPT ); Thu, 14 Nov 2019 20:59:07 -0500 Received: by mail-pl1-f195.google.com with SMTP id ay6so3570510plb.0 for ; Thu, 14 Nov 2019 17:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UWeLycX3A0XaEIn+C9Dl7zk7yTPULHadgCfDLM9l7TE=; b=ksvnu7eSOO4terAkNlaOfyb15/oDqNrOy0ORpo0bHBI2rhd9yD5pOsdT6WUKTLlDTv J3JM4RVHvP1LJP0mmL5H2hRq7oVoun79yD7ZM4D3ylcuToJckasjdaZzwaLyznvO1xGX wWplbFAv1VywWbeyraIAphIp4UTV+24rqlE/SPn9mI2gTrXkZd1AGTREWWhZ5k7/IvWr E+8slo2iwqf+Q3vUc2O/7jO5L09+LMQfXHB6zZi0ziq+EGgeuIm6prEdgznpSwxbTuqO AALvwT9E10R6YtyJ/ZMXbbxs5wHUuvk7o7Fc+eJ7FDvcLZkmZhAYVnqslFS8A99XyfHH V4Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=UWeLycX3A0XaEIn+C9Dl7zk7yTPULHadgCfDLM9l7TE=; b=rrd750MR8ksyq4g8ITr2rJ4uRJ2NuUfYZ9lv7ZQEDmtoxMJaNo9sVIxi7ZuW33XqSe HKc/swMySWZWOj6f2hcpve3tkAYRqtRfgXT0r190ciy76FmcqeSJ1JhZjo38XjKyc5Iv tjzRtLCC76hXmWmEvY/FSnh27A47UTMTBWocsUEdlQPTn5GCX+2Bb41LEImC16RMb7gQ hdbRqWhzuY+Od/ReGTysnP/yWMvYj0BgBfcgHTNSq9AWLEAn0tMQIeayOy24k4xFGDyj 7WG5+rAFmF88R1inN2UobBhyIVPZKx4ifiEIOXT3vEQau/utWrsz+6Y0mh1kySepEoiF 4feQ== X-Gm-Message-State: APjAAAWoxh3fpLjCNPxAXiU0I0qsqVOkXMW3PrkArbF9ZZciiBP35JMK WGD0n35Mfwswbl078kchz1/s7g== X-Received: by 2002:a17:90a:d102:: with SMTP id l2mr16852070pju.132.1573783146553; Thu, 14 Nov 2019 17:59:06 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id v15sm8132141pfe.44.2019.11.14.17.59.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2019 17:59:05 -0800 (PST) Date: Fri, 15 Nov 2019 11:00:00 +0900 From: AKASHI Takahiro To: Bhupesh Sharma Cc: Linux Kernel Mailing List , Bhupesh SHARMA , Boris Petkov , Ingo Molnar , Thomas Gleixner , Jonathan Corbet , James Morse , Mark Rutland , Will Deacon , Steve Capper , Catalin Marinas , Ard Biesheuvel , Michael Ellerman , Paul Mackerras , Benjamin Herrenschmidt , Dave Anderson , Kazuhito Hagio , x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , Linux Doc Mailing List , kexec mailing list Subject: Re: [PATCH v4 0/3] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs) Message-ID: <20191115015959.GI22427@linaro.org> Mail-Followup-To: AKASHI Takahiro , Bhupesh Sharma , Linux Kernel Mailing List , Bhupesh SHARMA , Boris Petkov , Ingo Molnar , Thomas Gleixner , Jonathan Corbet , James Morse , Mark Rutland , Will Deacon , Steve Capper , Catalin Marinas , Ard Biesheuvel , Michael Ellerman , Paul Mackerras , Benjamin Herrenschmidt , Dave Anderson , Kazuhito Hagio , x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , Linux Doc Mailing List , kexec mailing list References: <1573459282-26989-1-git-send-email-bhsharma@redhat.com> <20191113063858.GE22427@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bhupesh, On Fri, Nov 15, 2019 at 01:24:17AM +0530, Bhupesh Sharma wrote: > Hi Akashi, > > On Wed, Nov 13, 2019 at 12:11 PM AKASHI Takahiro > wrote: > > > > Hi Bhupesh, > > > > Do you have a corresponding patch for userspace tools, > > including crash util and/or makedumpfile? > > Otherwise, we can't verify that a generated core file is > > correctly handled. > > Sure. I am still working on the crash-utility related changes, but you > can find the makedumpfile changes I posted a couple of days ago here > (see [0]) and the github link for the makedumpfile changes can be seen > via [1]. > > I will post the crash-util changes shortly as well. > Thanks for having a look at the same. Thank you. I have tested my kdump patch with a hacked version of crash where VA_BITS_ACTUAL is calculated from tcr_el1_t1sz in vmcoreinfo. -Takahiro Akashi > [0]. http://lists.infradead.org/pipermail/kexec/2019-November/023963.html > [1]. https://github.com/bhupesh-sharma/makedumpfile/tree/52-bit-va-support-via-vmcore-upstream-v4 > > Regards, > Bhupesh > > > > > Thanks, > > -Takahiro Akashi > > > > On Mon, Nov 11, 2019 at 01:31:19PM +0530, Bhupesh Sharma wrote: > > > 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 (3): > > > 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/arm64/memory.rst | 2 +- > > > arch/arm64/include/asm/pgtable-hwdef.h | 1 + > > > arch/arm64/kernel/crash_core.c | 9 +++++++++ > > > kernel/crash_core.c | 1 + > > > 4 files changed, 12 insertions(+), 1 deletion(-) > > > > > > -- > > > 2.7.4 > > > > > >