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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D74E3C433EF for ; Thu, 16 Dec 2021 16:59:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 12D2C6B0074; Thu, 16 Dec 2021 11:59:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DC766B0075; Thu, 16 Dec 2021 11:59:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F0CC66B0078; Thu, 16 Dec 2021 11:59:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id E22316B0074 for ; Thu, 16 Dec 2021 11:59:16 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 94861181AEF09 for ; Thu, 16 Dec 2021 16:59:06 +0000 (UTC) X-FDA: 78924267492.30.1BE7365 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf11.hostedemail.com (Postfix) with ESMTP id 29D4940018 for ; Thu, 16 Dec 2021 16:58:56 +0000 (UTC) Received: from zn.tnic (dslb-088-067-202-008.088.067.pools.vodafone-ip.de [88.67.202.8]) (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 DBA3B1EC0554; Thu, 16 Dec 2021 17:58:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1639673932; 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=pWUEpsE8ix8ctSY2BZMA53JnU2wfByQzeCxkRLFpc1c=; b=o7ugRI55iHPXK9G3PKXYJcJLewQ7gLw1LKObNzgLkbdKRnJk0IOa0Y4GpnP5IlJTsKCVT8 FDWsPqFtEoUgwzI9kBLu08QGoarVHyULigW8/R0xwsYO2y9dbc3Qae/rkmwHdq2VxaQvMi Qv8ykGXyRYVzjNyQmvkzz2qWx3FT7TI= Date: Thu, 16 Dec 2021 17:58:54 +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" , tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v8 06/40] x86/sev: Check SEV-SNP features support Message-ID: References: <20211210154332.11526-1-brijesh.singh@amd.com> <20211210154332.11526-7-brijesh.singh@amd.com> <225fe4e5-02de-5e3e-06c8-d7af0f9dd161@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <225fe4e5-02de-5e3e-06c8-d7af0f9dd161@amd.com> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 29D4940018 X-Stat-Signature: cmma1bcchp89t9fiefmjbk43xy1p41w3 Authentication-Results: imf11.hostedemail.com; dkim=temperror ("DNS error when getting key") header.d=alien8.de header.s=dkim header.b=o7ugRI55; spf=temperror (imf11.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-HE-Tag: 1639673936-376545 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 Thu, Dec 16, 2021 at 10:28:45AM -0600, Brijesh Singh wrote: > A good question; the GHCB page is needed only at the time of #VC. If the > second stage VC handler is not called after the sev_enable() during the > decompression stage, setting up the GHC page in sev_enable() is a waste. It would be a waste if no #VC would fire. But we set up a #VC handler so we might just as well set up the GHCB for it too. > But in practice, the second stage VC handler will be called during > decompression. It also brings a similar question for the kernel > proper, should we do the same over there? I'd think so, yes. > Jorge did the initial ES support and may have other reasons he chose to set > up GHCB page in the handler. I was trying to avoid the flow change. We can > do this as a pre or post-SNP patch; let me know your thoughts? You can do a separate patch only with that change and if it causes trouble, we can always debug/delay it. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette