Message ID | 1552212242-9479-2-git-send-email-bhsharma@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 027571823 for <patchwork-linux-arm@patchwork.kernel.org>; Sun, 10 Mar 2019 10:05:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA1EF287E3 for <patchwork-linux-arm@patchwork.kernel.org>; Sun, 10 Mar 2019 10:05:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA2B928FD3; Sun, 10 Mar 2019 10:05:18 +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 61C29287E3 for <patchwork-linux-arm@patchwork.kernel.org>; Sun, 10 Mar 2019 10:05:18 +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:References: In-Reply-To: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:List-Owner; bh=bXTamvLeEKky52bpv2aF7gvKogsfbYPKdsB2vWKO5uA=; b=J4eGGF5QzvhtLKu+V7gFE48OxO IjgQ+0XN92wq4JU+eT7cSqw2kFQvmUwdaIsW9DTzjhaQqv8oB5d4X2wyeBSqnhfCVN5at1w4hOK1/ LdYAOj/pcx42L7vqPLPJ9/RJ026cO8nq4aomPlynk+367l7NXkYLcXncNtZtwybZ77+SOmuOBrNUS kaKjKNUHj4WMvFLquQW51dEaF3kuLy2SqW4VGzI3kaZf85UP/W3GRPvGJha8dOLz7sTKjm1MWcIGE ZZPDA8lD1tSsHjZkGAOoztWfwX7k62Mjsnz8b4JyqVLurzP2bpJa4kjqFRjNqHoqYuXB+wOmcXLj9 5ywVmfJw==; 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 1h2vKW-00006n-8e; Sun, 10 Mar 2019 10:05:16 +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 1h2vKD-0007Nv-9B for linux-arm-kernel@lists.infradead.org; Sun, 10 Mar 2019 10:04:59 +0000 Received: by mail-pg1-f193.google.com with SMTP id e17so1716929pgd.2 for <linux-arm-kernel@lists.infradead.org>; Sun, 10 Mar 2019 03:04:57 -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:in-reply-to :references; bh=p0woFonxhQQij4xaUhXjp4CHNytg0N40QAtCXayEoro=; b=gSBby2POSom+V8+yen9eZm3nlpTwaSn/k6nBjhh8chHcI9Sk9UPFlK2zAZTJxqFAl2 LAdptrMCkVcxnbvY0WQ62Oh6np0xm+GlsQQuh4/b36kS0N2LJC+ynk3v3zdKywt7Reqc M0DZwrrnwLBGri0pRkikABaCDskNKt/WswxiEuZzR7LRsCCMoDvEP/vRUbz5Cjzro/mQ QnE5MpkuQPuPqJSaaAbqEX9fce+UwAs4z+hubrJMDai7qqn5425OEqxEEuWl0ZGBTToY y1rGMVxPJ9K+7x/gCg281pFFD756pbmXZUBbS4XGIGdNZZctJy48RnUM9FSwSQ0vBXUs ei7A== X-Gm-Message-State: APjAAAWrcm14c+kjXA+WlgPY5tVdIA3E/WcIP6Rg7tNK5gea2MitlTPQ BMPCT/H/CDMkPzTJhInAMpBrPg== X-Google-Smtp-Source: APXvYqzZOzpXKDW58QolX8yBU9HTROhz294pagdWcO/uzW7wcBeI+NRVaXE6VKdHz/9a1S/CymETIw== X-Received: by 2002:a17:902:4081:: with SMTP id c1mr28394637pld.297.1552212296851; Sun, 10 Mar 2019 03:04:56 -0700 (PDT) Received: from localhost ([106.215.118.61]) by smtp.gmail.com with ESMTPSA id r6sm3380076pgp.46.2019.03.10.03.04.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2019 03:04:56 -0700 (PDT) From: Bhupesh Sharma <bhsharma@redhat.com> To: linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] arm64, vmcoreinfo : Append 'PTRS_PER_PGD' to vmcoreinfo Date: Sun, 10 Mar 2019 15:34:01 +0530 Message-Id: <1552212242-9479-2-git-send-email-bhsharma@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552212242-9479-1-git-send-email-bhsharma@redhat.com> References: <1552212242-9479-1-git-send-email-bhsharma@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190310_030457_430222_F829A887 X-CRM114-Status: GOOD ( 13.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Mark Rutland <mark.rutland@arm.com>, Kazuhito Hagio <k-hagio@ab.jp.nec.com>, kexec@lists.infradead.org, bhsharma@redhat.com, Will Deacon <will.deacon@arm.com>, James Morse <james.morse@arm.com>, Dave Anderson <anderson@redhat.com>, bhupesh.linux@gmail.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Append new variables to vmcoreinfo (PTRS_PER_PGD for arm64 and MAX_PHYSMEM_BITS for all archs)
|
expand
|
diff --git a/arch/arm64/kernel/crash_core.c b/arch/arm64/kernel/crash_core.c index ca4c3e12d8c5..123a42c56b8e 100644 --- a/arch/arm64/kernel/crash_core.c +++ b/arch/arm64/kernel/crash_core.c @@ -10,6 +10,7 @@ void arch_crash_save_vmcoreinfo(void) { VMCOREINFO_NUMBER(VA_BITS); + VMCOREINFO_NUMBER(PTRS_PER_PGD); /* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */ vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n", kimage_voffset);
With ARMv8.2-LVA architecture extension availability, arm64 hardware which supports this extension can support a virtual address-space upto 52-bits. Since at the moment we enable the support of this extension in kernel via CONFIG flags, e.g. - User-space 52-bit LVA via CONFIG_ARM64_USER_VA_BITS_52 so, there is no clear mechanism in the user-space right now to determine these CONFIG flag values and hence determine the maximum virtual address space supported by the underlying kernel. User-space tools like 'makedumpfile' therefore are broken currently as they have no proper method to calculate the 'PTRS_PER_PGD' value which is required to perform a page table walk to determine the physical address of a corresponding virtual address found in kcore/vmcoreinfo. If one appends 'PTRS_PER_PGD' number to vmcoreinfo for arm64, it can be used in user-space to determine the maximum virtual address supported by underlying kernel. A reference 'makedumpfile' implementation which uses this approach to determining the maximum physical address is available in [0]. [0]. https://github.com/bhupesh-sharma/makedumpfile/blob/52-bit-va-support-via-vmcore-upstream-v3/arch/arm64.c#L459 Cc: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: James Morse <james.morse@arm.com> Cc: Dave Anderson <anderson@redhat.com> Cc: Kazuhito Hagio <k-hagio@ab.jp.nec.com> Cc: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Suggested-by: Steve Capper <Steve.Capper@arm.com> Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com> --- arch/arm64/kernel/crash_core.c | 1 + 1 file changed, 1 insertion(+)