Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp348833imd; Fri, 26 Oct 2018 09:25:31 -0700 (PDT) X-Google-Smtp-Source: AJdET5eA0UFk8EKURw+ISqCfrmkmCy1miskEbGKpGQtxK8c6s+/QHgnEHY4kMid1ZD6guxDJIBuf X-Received: by 2002:a62:6c49:: with SMTP id h70-v6mr4559144pfc.134.1540571131060; Fri, 26 Oct 2018 09:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540571131; cv=none; d=google.com; s=arc-20160816; b=WfhTqGg0kB66g4AnJhW4WcCZh52wJBjariwbak8A9ek6HnYx+1n7x0BXE33xbi2KNU POpIKLiLrWscXAYXfIEcRr+uBjZRRuGWsc98YJCNmVdVQd9PZx8EIXPOqMvBKtcsga03 yzpyr9GPviGEBs2lo5whGdikluhVaUlWYqKb073N6Xb2twMEzQ2FDRAwiHzRYeuswrUu C/b/BFAV+b25Xy+0DSI+1STU2SveOnVSEIzFlpRnA+UhmX+V8Nuqm2qD6AgffMXaIyzX cYiSWwoHIyqDZamUy6SbsC7TtQq+Ievsg+Lhp4KK8wSRkppjrdCFNYay6tC62Q7QuUVo 4CaQ== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=t90hlHlrs9HmBjVMCohhoIp08nB+48uyItutmwU0hhE=; b=K//ezC9tnKr345oS2ctpsPk36Xevp76Q5MFf2FayV1tZla4+KBXTbRvyMfx/K5Dz1a AEmMftd6d3tVmySHX4RS9oD+tADaY7K4hJSi8kDPZdoj9P5sTJwXkM51QiqRffpfz99L Q0cSN3YGetDfrcbZkGWAI0JUQ/H2Me/12bJwbOW0JutLmUaleihGSLKnKKxwbikie80Y SS2ul7SAgFFhDYVNBnHnOWP4U+Jc2/N/yTInsRxN66C91hzLmm8pF8a7NMU/lEPZoe3A crcJg2PRH38/NXgBN/nKbYzXdp3iYicrldNTQfQaaECrSdGMLtZGGbO+7Q1svda+24uT Twtw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4-v6si10027125plo.69.2018.10.26.09.25.14; Fri, 26 Oct 2018 09:25:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727590AbeJ0BCY (ORCPT + 99 others); Fri, 26 Oct 2018 21:02:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:44234 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727457AbeJ0BCY (ORCPT ); Fri, 26 Oct 2018 21:02:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 08455B015; Fri, 26 Oct 2018 16:24:43 +0000 (UTC) Date: Fri, 26 Oct 2018 18:24:40 +0200 From: Petr Tesarik To: lijiang Cc: Boris Petkov , linux-kernel@vger.kernel.org, bhe@redhat.com, x86@kernel.org, kexec@lists.infradead.org, mingo@redhat.com, tglx@linutronix.de, dyoung@redhat.com Subject: Re: [PATCH] kdump, vmcoreinfo: Export sme_me_mask value to vmcoreinfo Message-ID: <20181026182440.20a4b107@ezekiel.suse.cz> In-Reply-To: <1263471c-a27d-a698-15f0-b5947f13ea93@redhat.com> References: <20181026093630.8520-1-lijiang@redhat.com> <053CC83A-9A95-4C12-9627-AABD1427DA9C@alien8.de> <1263471c-a27d-a698-15f0-b5947f13ea93@redhat.com> Organization: SUSE Linux, s.r.o. X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Oct 2018 20:32:11 +0800 lijiang wrote: >[...] > For AMD machine with the SME feature, the msr 'MSR_K8_SYSCFG' can examine > whether SME is enabled in kernel, but the kexec is also userspace tool, > it has no permission to access the msr. But we need the MSR value from the panic kernel environment, not while the production kernel is still running, right? 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. Just my 2 cents, Petr T > Furthermore, i also tried to read the "/dev/cpu/cpu[number]/msr", but > the value depends on BIOS's configuration. That is to say, if SME is > set in BIOS, the value of msr is always 0xF40000 whatever the kernel > commandline parameter is "mem_encrypt=on" or "mem_encrypt=off". > > If i made a mistake, please help to point it out. > > Thanks. > Lianbo > > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec