Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5521695pxb; Mon, 7 Feb 2022 04:05:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsU7XEhkrR1AVX0mY9GgyoZJRMYoMz0o+S/Wo5n6QqPMWppcJssIzbuXNs0ak8fR8N1Ur+ X-Received: by 2002:a17:907:3d9e:: with SMTP id he30mr9891607ejc.625.1644235524749; Mon, 07 Feb 2022 04:05:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644235524; cv=none; d=google.com; s=arc-20160816; b=F2ea8gTZ7femkSl1pRqzez8njHl6QkGDjvkcwOsyoutYpouEaGDMQ+XTuc6FOnF2hk xWsiQLNbHDe1MgeOhNYnLztiB2R1YoAzibzWAcbVm+d7II1LzKC1ipYQUi6yVUCrZwVs HlsS0wLSifVKP+3DJnGgjMiieXKlcT9tEwUNAwPnELS2+7IcTzY8jb9ekT3PwXUsx7jk oPUyKHMwsrb/LfI3vH3MTzLA60WfWzox6m0SZ/aZtj5KAmizCkvqwTgRWTkjhGJx+mfG mbX+NTgEvaUbB0eIU6rqWje+XZetWx9accwxQJnlrQNbgm6eBvtKMnWtq6BmqOzUS90x yVDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0xuIpKje8zkOvUagGUNB86BnlJAw32mk/ZqXAf5Gr+4=; b=W1EV1ROYHfhN/quqymKBh0/5VYSXKTiiQ00OHr/+cNAWQXWOVWMLTnn7iXdxcP2yvQ Oqh//o69DejM+lqwMUZOnGOrEY/G/I7c4ny2DjGVJLDv8ldo3HujQetM+C0glamOjCGG hYhPvtkSXMQ1sN9D+FA8RPEJBWeXam1GT4CmWe+lynWEFAhssm4TX3RedAs5zns6ceMy pkPDVGRdVPMn3BHulo4rdYkRY6lJZ5fHqt6ssC6KhAbfV+TOtpdsiXWmvy0ctAwtYWga SkySYNyAsWYeEORTtouIuKSTz3T/kx0Fy1o2BOQ5V/oTMRSs3Lhar546BtnFBo1tSQxm zFhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=IUy7dO+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x21si1557076edq.74.2022.02.07.04.04.59; Mon, 07 Feb 2022 04:05:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=IUy7dO+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379942AbiBENHx (ORCPT + 99 others); Sat, 5 Feb 2022 08:07:53 -0500 Received: from mail.skyhub.de ([5.9.137.197]:41948 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233802AbiBENHv (ORCPT ); Sat, 5 Feb 2022 08:07:51 -0500 Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (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 D113E1EC051E; Sat, 5 Feb 2022 14:07:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1644066466; 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=0xuIpKje8zkOvUagGUNB86BnlJAw32mk/ZqXAf5Gr+4=; b=IUy7dO+ddvE4dWRGM+hDG+rqKvIhsL8kvqBT5KM38cC4/cUWC6MfOWm65C16n50FTJPZDH 7/FulyBflZG+slZjlrj38QcIZqR67m9NUmcpP/4ywOtL6eod7Aihc4aY/wde7Da11/E3C1 B4WI1FS0d1xiONTe0XeAJWVQ5fF0CUM= Date: Sat, 5 Feb 2022 14:07:45 +0100 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, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , "Dr . David Alan Gilbert" , brijesh.ksingh@gmail.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v9 32/43] x86/boot: Add a pointer to Confidential Computing blob in bootparams Message-ID: References: <20220128171804.569796-1-brijesh.singh@amd.com> <20220128171804.569796-33-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220128171804.569796-33-brijesh.singh@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 28, 2022 at 11:17:53AM -0600, Brijesh Singh wrote: > From: Michael Roth > > The previously defined Confidential Computing blob is provided to the > kernel via a setup_data structure or EFI config table entry. Currently > these are both checked for by boot/compressed kernel to access the > CPUID table address within it for use with SEV-SNP CPUID enforcement. > > To also enable SEV-SNP CPUID enforcement for the run-time kernel, > similar early access to the CPUID table is needed early on while it's > still using the identity-mapped page table set up by boot/compressed, > where global pointers need to be accessed via fixup_pointer(). > > This isn't much of an issue for accessing setup_data, and the EFI > config table helper code currently used in boot/compressed *could* be > used in this case as well since they both rely on identity-mapping. > However, it has some reliance on EFI helpers/string constants that > would need to be accessed via fixup_pointer(), and fixing it up while > making it shareable between boot/compressed and run-time kernel is > fragile and introduces a good bit of uglyness. > > Instead, add a boot_params->cc_blob_address pointer that the > boot/compressed kernel can initialize so that the run-time kernel can > access the CC blob from there instead of re-scanning the EFI config > table. > > Signed-off-by: Michael Roth > Signed-off-by: Brijesh Singh > --- > arch/x86/include/asm/bootparam_utils.h | 1 + > arch/x86/include/uapi/asm/bootparam.h | 3 ++- > 2 files changed, 3 insertions(+), 1 deletion(-) Another review comment ignored: https://lore.kernel.org/r/YeWyCtr11rL7dxpT@zn.tnic /me ignores this patch too. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette