Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5506647imu; Sat, 1 Dec 2018 19:18:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/XWPr45E7avBv8XbYLzqxPjvwCAddyxqgwmR/gk/HMG9mi6jas+kz6d2tiRBhaa8XeyzX+O X-Received: by 2002:a63:fd53:: with SMTP id m19mr8316832pgj.340.1543720731938; Sat, 01 Dec 2018 19:18:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543720731; cv=none; d=google.com; s=arc-20160816; b=LRaWD8rxtKUQfupzPfKKRJ79bwnPgNfBo5a608wWeLKNOLkkKsLyHWIA6zAPATK20B zJKRJ0efJOksgP3X98p26SgL/r1N30akcClnq7IwLskmTNnBjrQfwq8ZAIvV67OIv7cM x+FfHHTrcOvmPIOwm/rdGx5rqSfjYYZUHZi8x6W/RP9JguiGY+Y2HR6DM7tdICB5BAWb PPhZcByfgJLJz3JabM9plOQY8R5fOCoHlm+zTJ61xISUAbY4ZTPh+z6icvYpeXSOOkEN TAP9fpUvbNmew/FFBLkkASYZ7LnlOxtc/M+4wv0SEK7uk/lIk5sqM8TgEzP9md9h78/I aSLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=4rDfTfG1mELw0vFfOjcgBiqzQFZtgQ61sRXogsYe1bE=; b=qgTZ/x7H5oTWFmTC8XCE5y5/8v2O3olzKEbaozfBDJ3cWErT0Eg3hq4D6Fs6p2IInC fGQtOzNs3rUl+CD+hMLqMKuTm7jt1Th9Bk4Gi578YJHRrt/GoRt8Am54DNwxzemdAqMI dOqvgY2iv4ZhUxE79YTQhJIlADscFGYEL203mAkvE8Aqk7a9CVWnLIpIaYqE77ASApGV IVpnK5BSDYmNaXgioWxPj8EbK8ati0fQeIMVYW8o6u3WvML8lbHE6SYp7X4N5pPVbiPY o1KIRhk+xGNUZ+RuWnDw2XNCNQ8CrZFr/pXD0VGoGer7ZlG7z1jTUpUQvO7KhfKXQCBa NS+g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si8487956pgb.298.2018.12.01.19.18.04; Sat, 01 Dec 2018 19:18:51 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725379AbeLBDQO (ORCPT + 99 others); Sat, 1 Dec 2018 22:16:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36972 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725290AbeLBDQO (ORCPT ); Sat, 1 Dec 2018 22:16:14 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C4EA356C4; Sun, 2 Dec 2018 03:08:54 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-12-75.pek2.redhat.com [10.72.12.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1C305D9C9; Sun, 2 Dec 2018 03:08:44 +0000 (UTC) From: Lianbo Jiang To: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, akpm@linux-foundation.org, bhe@redhat.com, dyoung@redhat.com Subject: [PATCH 0/2 v2] kdump,vmcoreinfo: Export the value of sme mask to vmcoreinfo Date: Sun, 2 Dec 2018 11:08:37 +0800 Message-Id: <20181202030839.29945-1-lijiang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sun, 02 Dec 2018 03:08:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset did two things: a. add a new document for vmcoreinfo This document lists some variables that export to vmcoreinfo, and briefly describles what these variables indicate. It should be instructive for many people who do not know the vmcoreinfo, and it also normalizes the exported variable as a standard ABI between kernel and use-space. b. export the value of sme mask to vmcoreinfo For AMD machine with SME feature, makedumpfile tools need to know whether the crash kernel was encrypted or not. If SME is enabled in the first kernel, the crash kernel's page table(pgd/pud/pmd/pte) contains the memory encryption mask, so need to remove the sme mask to obtain the true physical address. Changes since v1: 1. No need to export a kernel-internal mask to userspace, so copy the value of sme_me_mask to a local variable 'sme_mask' and write the value of sme_mask to vmcoreinfo. 2. Add comment for the code. 3. Improve the patch log. 4. Add the vmcoreinfo documentation. Lianbo Jiang (2): kdump: add the vmcoreinfo documentation kdump,vmcoreinfo: Export the value of sme mask to vmcoreinfo Documentation/kdump/vmcoreinfo.txt | 400 +++++++++++++++++++++++++++++ arch/x86/kernel/machine_kexec_64.c | 14 + 2 files changed, 414 insertions(+) create mode 100644 Documentation/kdump/vmcoreinfo.txt -- 2.17.1