Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp507678imu; Thu, 20 Dec 2018 00:12:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/U3GbQ/0S7zI5K+clDhsw/qc5eI5zqysBuA4d7P7O0rmE0YvSY+gSJrJ+oZBIpRzgz1w+Vy X-Received: by 2002:a17:902:ac1:: with SMTP id 59mr22872357plp.36.1545293571706; Thu, 20 Dec 2018 00:12:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545293571; cv=none; d=google.com; s=arc-20160816; b=Y24Pj83oyu2atJ2JWRbgQX1gxVki+b7qFVOePm83qeXFExdXZJ1qRyDPPrgV/v7QyA t43BLQb61M3TrkV7/0+wx3NvWiNCTRPNgRcRcaVaA7sHfq6k+TdkivhCzk+O+yi4M0sG RYWeanNvzBkhwhHHqRvaNIzxUL7OxkTn+mkFB3p4PBEBe5Se51QXDaq+5d5o6xjwKVUm w9q5mWLXz9WhNbHbEzLBU6wFB7OjlxAlLmsW/4jSlgzP2Zm9/xiW2uU5yX+ajHV5sJR0 AAw8giV9wSjTsGpemXtY5g0Z8m4vyWNm5b2lc/a4+BVV58Riy9RPtgblz1bJy8ZSb+S9 gUSw== 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=UljawUgAHQTotQdH24HWo61Z3m3ED66TurTURAGGVG8=; b=YnjZDAhg/LI3YoKDkb3qj5Ck4HIGvv0n9Zc5AB0pkkcJJEohTUUa18n2FeZj5F8Jye k7+QBoXOG6cOtXcJ++EmHrnYwjeN24OdSXJKXDEcCpUP3Gr8pJ8r89IIVrBMsfbq3nop +VmIa145Kx7ARjy3C3xdFA2mA5hrowC3JkVRcsIOXUMaycj/eRc2QHDOQ+zI6wNigpcK LCnf4hHhgL1eEz9VfQSSWWx0YHGKYej6pEkuAdZ4so4tXNsJ6t1Zzhv9Cu86AkHRPB8/ qEKPpw6aT9QPi7BiJdFxIEcIVF/fv2Qs5YIndix/O10N2fecK3+lhbsd/mMvFzftY2/N +0vA== 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 d16si16644563plj.104.2018.12.20.00.12.36; Thu, 20 Dec 2018 00:12: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 S1730316AbeLTFkz (ORCPT + 99 others); Thu, 20 Dec 2018 00:40:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45938 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729721AbeLTFkz (ORCPT ); Thu, 20 Dec 2018 00:40:55 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CF9183D09; Thu, 20 Dec 2018 05:40:54 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-12-51.pek2.redhat.com [10.72.12.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6924D19745; Thu, 20 Dec 2018 05:40:47 +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, linux-doc@vger.kernel.org Subject: [PATCH 0/2 v4] kdump,vmcoreinfo: Export the value of sme mask to vmcoreinfo Date: Thu, 20 Dec 2018 13:40:42 +0800 Message-Id: <20181220054044.30738-1-lijiang@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 20 Dec 2018 05:40: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 convention 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. Changes since v2: 1. Improve the vmcoreinfo document, add more descripts for these variables exported. 2. Fix spelling errors in the document. Changes since v3: 1. Still improve the vmcoreinfo document, and make it become more clear and easy to read. 2. Move sme_mask comments in the code to the vmcoreinfo document. 3. Improve patch log. Lianbo Jiang (2): kdump: add the vmcoreinfo documentation kdump,vmcoreinfo: Export the value of sme mask to vmcoreinfo Documentation/kdump/vmcoreinfo.txt | 513 +++++++++++++++++++++++++++++ arch/x86/kernel/machine_kexec_64.c | 3 + 2 files changed, 516 insertions(+) create mode 100644 Documentation/kdump/vmcoreinfo.txt -- 2.17.1