Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp867121imd; Fri, 26 Oct 2018 19:58:55 -0700 (PDT) X-Google-Smtp-Source: AJdET5fFmzpo687K6DUFWJs1bwv5Fuqvoou/d5Vmr/7v+y/K1v+KKWBxhAYzaM2IVrnSEVsYL7sR X-Received: by 2002:a65:4b85:: with SMTP id t5-v6mr5866331pgq.189.1540609135066; Fri, 26 Oct 2018 19:58:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540609135; cv=none; d=google.com; s=arc-20160816; b=JD/vh/MUCdVTSd7AhLZNqq/QXXaNTNRBxtX6GFCSfPLfG/cyUQq7NdhU8SzIKGBoeu 4pyX25g9PUE+j8gV7QuJuLPAuyrFx/TFRbdBbg43QyyDfOZBYXPaZmkiLj7jDBW+k86o gXyWacHNlkQc8Xr+w7+JDCkSoYCUnZKPsFqG2fKgN2mKgOGOj5gn8APwZk/b1isbosOS 948l+zDcFRULvwxGjYEoGTYpUKVdDgLmjO2MI+pqAtsPMFIEMKLtxlO7GThGEQlRg5Iv RwIWhBNslv2OQOqN83+8jVe/PtXW5xihe8jYgy7jD81/Ri1h2/rv0s7lv4f2Aiwwhx0b VNDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=UsOWz+WMiUIi5H2SzqsWZuQS3xkmquPiu0yWU7/js84=; b=zXgfiqy/iDHt0BHol84KVfqcegOz6eJEyDDdlYurngDSl8n2QZZIjp2p03t+b8PMZE 2cX1Zyen+/yHAFS5tLaxfxRewKdOKhxhksX4WfvoBl5OxpJcZ60YPYsa/nJCyiJIerO4 WgUquO+9ffxGs0+fFbT7g175FNhPdw486ez+ejXT8s5NGs47NWVYxzp2EIUwPD1ToTWC 2po0q78qOfaWv/lYITRZz8hX3x7J8f5oyYf0BmZZuN0MWOHRx/kbUeitOKjSbBriJLqV FuCBPjrgnZO1e60PyzPwdB7cK3AVoX+Km/jXCEU2NCzT8kzs7MY3o+mXZbHymwJggZCT SfTA== 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 k14-v6si15084172pfd.239.2018.10.26.19.58.09; Fri, 26 Oct 2018 19:58:55 -0700 (PDT) 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 S1727450AbeJ0Lgs (ORCPT + 99 others); Sat, 27 Oct 2018 07:36:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59482 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726501AbeJ0Lgs (ORCPT ); Sat, 27 Oct 2018 07:36:48 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8923C307D992; Sat, 27 Oct 2018 02:57:21 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-142.pek2.redhat.com [10.72.12.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 647A56714C; Sat, 27 Oct 2018 02:57:12 +0000 (UTC) Subject: Re: [PATCH] kdump, vmcoreinfo: Export sme_me_mask value to vmcoreinfo To: Borislav Petkov , Petr Tesarik Cc: linux-kernel@vger.kernel.org, bhe@redhat.com, x86@kernel.org, kexec@lists.infradead.org, mingo@redhat.com, tglx@linutronix.de, dyoung@redhat.com References: <20181026093630.8520-1-lijiang@redhat.com> <053CC83A-9A95-4C12-9627-AABD1427DA9C@alien8.de> <1263471c-a27d-a698-15f0-b5947f13ea93@redhat.com> <20181026182440.20a4b107@ezekiel.suse.cz> <20181026222517.GB26927@nazgul.tnic> From: lijiang Message-ID: Date: Sat, 27 Oct 2018 10:57:08 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181026222517.GB26927@nazgul.tnic> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Sat, 27 Oct 2018 02:57:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2018年10月27日 06:25, Borislav Petkov 写道: > On Fri, Oct 26, 2018 at 06:24:40PM +0200, Petr Tesarik wrote: >> But we need the MSR value from the panic kernel environment, not while >> the production kernel is still running, right? > > Actually, we need only the encryption bit number (and it should be 0 > otherwise to denote SME wasn't enabled). > Thanks for your comment. For this patch, it really needs only the encryption bit number. For the AMD machine with SME feature, the OS or HV sets bit 47 of a physical address to 1 in the page table entry to indicate the page should be encrypted. Thanks. Lianbo > I guess something like > > VMCOREINFO_NUMBER(sme_mask); > > which gets written by the kexec-ed kernel. > >> If so, then this reminds me that I have wanted for a long time to store >> more of the hardware state in a vmcore NOTE after a kernel crash ... >> control registers, MSRs and whatnot. Of course, this would be a >> long-term project, but I wonder what other people think about it in >> general. > > I guess that sounds like a good idea - the more relevant hw info for > debugging, the better. Determining the important MSRs to save would need > a bit of a pondering over though. For example, some MSRs are per-core, > some per-socket, etc... >