From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA03570 for ; Mon, 7 Jun 2021 14:54:35 +0000 (UTC) Received: from zn.tnic (p200300ec2f0b4f0010db370b6947fb68.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:4f00:10db:370b:6947:fb68]) (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 54EC81EC04CC; Mon, 7 Jun 2021 16:54:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1623077674; 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=DkskgYhv3CpcRt1UBQdVga8YOE910b/AK0zkqCeMk5Q=; b=B2WSbbvqp4seSrpi84QxtYgx7pE62m2aoNK9Z7GTfQ7mrnKEVj/yNCeFXxev9C2iGtC/O9 hPxvkFgHhKZVdFwdXW1vGsA7BRlvbo32+Yj4opf1oUGwt9PiLczI17X425rx4GrGI5RqqL W1IWDPcZ1ymoTrJQao4ERgbBhxDRfYg= Date: Mon, 7 Jun 2021 16:54:29 +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 06/22] x86/sev: check SEV-SNP features support Message-ID: References: <20210602140416.23573-1-brijesh.singh@amd.com> <20210602140416.23573-7-brijesh.singh@amd.com> X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210602140416.23573-7-brijesh.singh@amd.com> On Wed, Jun 02, 2021 at 09:04:00AM -0500, Brijesh Singh wrote: > static bool early_setup_sev_es(void) This function is doing SNP init now too, so it should be called something generic like do_early_sev_setup() or so. > #define GHCB_SEV_ES_GEN_REQ 0 > #define GHCB_SEV_ES_PROT_UNSUPPORTED 1 > +#define GHCB_SEV_ES_SNP_UNSUPPORTED 2 GHCB_SNP_UNSUPPORTED > +static bool __init sev_snp_check_hypervisor_features(void) check_hv_features() is nice and short. > diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c > index 77a754365ba9..9b70b7332614 100644 > --- a/arch/x86/kernel/sev.c > +++ b/arch/x86/kernel/sev.c > @@ -609,6 +609,10 @@ static bool __init sev_es_setup_ghcb(void) Ditto for this one: setup_ghcb() Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette