From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5DF1C433DF for ; Mon, 15 Jun 2020 19:13:54 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 7C1BA20739 for ; Mon, 15 Jun 2020 19:13:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UgISKDd4"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VONtuFH4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C1BA20739 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49m1G82w64zDqhl for ; Tue, 16 Jun 2020 05:13:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=207.211.31.81; helo=us-smtp-delivery-1.mimecast.com; envelope-from=bhsharma@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UgISKDd4; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VONtuFH4; dkim-atps=neutral Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49m1D80c11zDqQG for ; Tue, 16 Jun 2020 05:12:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592248324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gBDypd72AayeylkkdmJfk3R+s+aCIKax33JorcXAteU=; b=UgISKDd48XzOfK5Na/MKWgFNfFPb2eDn2kZmSxkrJtg45CJTSfrSeXaEZdEK/z3ySvFXeT r4kjb7xQR0WV6MDcQhhhW+3u0uQpdsLq62d2oS81RiqukPVKZ32s5rMplmw7mssWwS8OY9 dQPb8fICmUTVV0mVxRiFhrRH0ejsSpI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592248325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gBDypd72AayeylkkdmJfk3R+s+aCIKax33JorcXAteU=; b=VONtuFH4RfmgrxMeOx2l7VD/jgW7eudwYsyEy/miLD0OAV07VyfZe4T5Bk8HOpgV40KJ1P l8a/y0YP8Q2eKQQ7OGqNT1ulU9lAap62Zjybx67CkWAoiBLmYZT84MHUr121RDBO7VIvZ3 Mhi9EMIPTAGzzpL4cbX7OzmskB3jcFM= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-325-U0bPLzZKP0iK0Xn4qH5vxA-1; Mon, 15 Jun 2020 15:11:51 -0400 X-MC-Unique: U0bPLzZKP0iK0Xn4qH5vxA-1 Received: by mail-qt1-f197.google.com with SMTP id o11so14755720qti.23 for ; Mon, 15 Jun 2020 12:11:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gBDypd72AayeylkkdmJfk3R+s+aCIKax33JorcXAteU=; b=QO3MPFsv6tvgEacX0dDrijExZO4OG0sLq5R0UFREIJFJAPJdWlsKmtew69DyuXRFbo d1iSJm18IfrtKYjcNHStwrl28p9exlChVMRt7L9bB5VdELHblMvXLPErGYU7yKB3nhgR rPB2fRCAnKUT0WvJccqtNJebtq2cgMmyFKChZEK/4Q3WfI8mMVc/G0dYqWzAQ1PLAI2M QffNEuh8Dd/Y4tjRYRq+s2Bvc1z4pXy4DwM41eDd0biYdtR5bxshzFSsMOJapcXpDbN8 8tFwFXaO2Xv6BZ/Zxw0GVOBMZPo6ELynpn/CrTmxIIOrCiP3GkLDDVE7ip2lVvge3Rf/ fung== X-Gm-Message-State: AOAM532arrNPdNEhNUlj5nclRX0uJ5fR03dpbpA2BuPnnIvjGli/u0mQ AFIHRI0CEI1HiPJ6i0Yu1AwPD6L/LFMNohUHqL/AFdrNEvCHU2zdQ6O+B3r/J77SIuTdJ9lRxcy JxFgJlHNuXaRMtRigSpW3xEv2bIkIxyWp/Z6HNAkCTw== X-Received: by 2002:a0c:e254:: with SMTP id x20mr25376402qvl.153.1592248310803; Mon, 15 Jun 2020 12:11:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj+hvBQAKPt+byrNt/W/RfLxG8oA1B0DgJCFqfYRYBqVFrGbuH2lT9c3kQXLnUlruGJeek3QiU4rpm8VmJsTc= X-Received: by 2002:a0c:e254:: with SMTP id x20mr25376377qvl.153.1592248310457; Mon, 15 Jun 2020 12:11:50 -0700 (PDT) MIME-Version: 1.0 References: <1589395957-24628-1-git-send-email-bhsharma@redhat.com> In-Reply-To: From: Bhupesh Sharma Date: Tue, 16 Jun 2020 00:41:37 +0530 Message-ID: Subject: Re: [PATCH v6 0/2] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs) To: linux-arm-kernel , x86@kernel.org, Catalin Marinas , Will Deacon X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , John Donnelly , Ard Biesheuvel , Jonathan Corbet , Steve Capper , Linux Doc Mailing List , linuxppc-dev@lists.ozlabs.org, Linux Kernel Mailing List , Scott Branden , Kazuhito Hagio , James Morse , kexec mailing list , Amit Kachhap , Boris Petkov , Thomas Gleixner , Bhupesh SHARMA , Dave Anderson , Ingo Molnar , Paul Mackerras Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hello Catalin, Will, On Tue, Jun 2, 2020 at 10:54 AM Bhupesh Sharma wrote: > > Hello, > > On Thu, May 14, 2020 at 12:22 AM Bhupesh Sharma wrote: > > > > Apologies for the delayed update. Its been quite some time since I > > posted the last version (v5), but I have been really caught up in some > > other critical issues. > > > > Changes since v5: > > ---------------- > > - v5 can be viewed here: > > http://lists.infradead.org/pipermail/kexec/2019-November/024055.html > > - Addressed review comments from James Morse and Boris. > > - Added Tested-by received from John on v5 patchset. > > - Rebased against arm64 (for-next/ptr-auth) branch which has Amit's > > patchset for ARMv8.3-A Pointer Authentication feature vmcoreinfo > > applied. > > > > 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: John Donnelly > > Cc: scott.branden@broadcom.com > > Cc: Amit Kachhap > > 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 (2): > > crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo > > arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo > > > > Documentation/admin-guide/kdump/vmcoreinfo.rst | 16 ++++++++++++++++ > > arch/arm64/include/asm/pgtable-hwdef.h | 1 + > > arch/arm64/kernel/crash_core.c | 10 ++++++++++ > > kernel/crash_core.c | 1 + > > 4 files changed, 28 insertions(+) > > Ping. @James Morse , Others > > Please share if you have some comments regarding this patchset. Ping. I think we have two Tested-by available from Oracle and Marvell folks on this patchset and no further review-comments. Can you please help review/pick this patchset via the arm64 tree? User-space utilities like makedumpfile and crash have been broken since 52-bit VA addressing was enabled on arm64 kernel, so distros are obliged to carry downstream-only fixes for these user-space utilities to make them work with the kernel which support 52-bit VA addressing on arm64. Thanks, Bhupesh