From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A8C1C48BDF for ; Fri, 18 Jun 2021 06:08:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 41D18611CE for ; Fri, 18 Jun 2021 06:08:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41D18611CE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A19216B0070; Fri, 18 Jun 2021 02:08:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A1916B0071; Fri, 18 Jun 2021 02:08:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F44C6B0072; Fri, 18 Jun 2021 02:08:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0162.hostedemail.com [216.40.44.162]) by kanga.kvack.org (Postfix) with ESMTP id 47C366B0070 for ; Fri, 18 Jun 2021 02:08:38 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B7E2F180AD817 for ; Fri, 18 Jun 2021 06:08:37 +0000 (UTC) X-FDA: 78265815474.01.24F6B35 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf30.hostedemail.com (Postfix) with ESMTP id 64971E0004C2 for ; Fri, 18 Jun 2021 06:08:29 +0000 (UTC) Received: from zn.tnic (p200300ec2f0dd800c1c0f109d0ca36f4.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:d800:c1c0:f109:d0ca:36f4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 0C0031EC0527; Fri, 18 Jun 2021 08:08:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1623996506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=8nhiIyd0UfJ51I2mU8e1o3cOfn6a+lJAiwXGrRATjfQ=; b=gLOiSEFoAu3J7Hu9gnfMHFwA24+s3/87n4JIQn9IVDbmQVOI/gWUr6HIJ+qJpXJd0+Amid rFN/qnWzoWxg0GTgjsGo+YkQHI4ObOZHxfJpgWdzJGZPR3N1hPHmmlGKVT57c9THN1OEkG 2u2NqZqAOMZN3IY2Fi+OvPgnMh/6S1Y= Date: Fri, 18 Jun 2021 08:08:17 +0200 From: Borislav Petkov To: Brijesh Singh Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , tony.luck@intel.com, npmccallum@redhat.com Subject: Re: [PATCH Part1 RFC v3 20/22] x86/boot: Add Confidential Computing address to setup_header Message-ID: References: <20210602140416.23573-1-brijesh.singh@amd.com> <20210602140416.23573-21-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210602140416.23573-21-brijesh.singh@amd.com> Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=alien8.de header.s=dkim header.b=gLOiSEFo; spf=temperror (imf30.hostedemail.com: error in processing during lookup of bp@alien8.de: DNS error) smtp.mailfrom=bp@alien8.de; dmarc=temperror reason="query timed out" header.from=alien8.de (policy=temperror) X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 64971E0004C2 X-Stat-Signature: sp445jdhuqmqutxauc8ipbc4ey4uc75m X-HE-Tag: 1623996509-42616 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Jun 02, 2021 at 09:04:14AM -0500, Brijesh Singh wrote: > While launching the encrypted guests, the hypervisor may need to provide > some additional information that will used during the guest boot. In the > case of AMD SEV-SNP the information includes the address of the secrets > and CPUID pages. The secrets page contains information such as a VM to > PSP communication key and CPUID page contain PSP filtered CPUID values. > > When booting under the EFI based BIOS, the EFI configuration table > contains an entry for the confidential computing blob. In order to support > booting encrypted guests on non EFI VM, the hypervisor to pass these > additional information to the kernel with different method. > > For this purpose expand the struct setup_header to hold the physical > address of the confidential computing blob location. Being zero means it > isn't passed. > > Signed-off-by: Brijesh Singh > --- > Documentation/x86/boot.rst | 27 +++++++++++++++++++++++++++ > arch/x86/boot/header.S | 7 ++++++- > arch/x86/include/uapi/asm/bootparam.h | 1 + > 3 files changed, 34 insertions(+), 1 deletion(-) > > diff --git a/Documentation/x86/boot.rst b/Documentation/x86/boot.rst > index fc844913dece..9b32805617bb 100644 > --- a/Documentation/x86/boot.rst > +++ b/Documentation/x86/boot.rst > @@ -75,6 +75,8 @@ Protocol 2.14 BURNT BY INCORRECT COMMIT > DO NOT USE!!! ASSUME SAME AS 2.13. > > Protocol 2.15 (Kernel 5.5) Added the kernel_info and kernel_info.setup_type_max. > + > +Protocol 2.16 (Kernel 5.14) Added the confidential computing blob address > ============= ============================================================ > > .. note:: > @@ -226,6 +228,7 @@ Offset/Size Proto Name Meaning > 0260/4 2.10+ init_size Linear memory required during initialization > 0264/4 2.11+ handover_offset Offset of handover entry point > 0268/4 2.15+ kernel_info_offset Offset of the kernel_info > +026C/4 2.16+ cc_blob_address Physical address of the confidential computing blob Why is this a separate thing instead of being passed as setup_data? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette