Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3488957pxb; Wed, 13 Oct 2021 07:05:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKdMrgmu0YcQ4SH1wO9wH6oNuWJ4HFstu+IioB3vaaIKUZgLjxqSERfT5N8nQl9XxCmmTN X-Received: by 2002:a17:907:9694:: with SMTP id hd20mr6034671ejc.550.1634133916187; Wed, 13 Oct 2021 07:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634133916; cv=none; d=google.com; s=arc-20160816; b=hFIctT8jgh9uUzHL4kfQYnkekeBNMDiVviqB+DiO/Lh/ZuOdviCylJe4vF7bXvNRMk CZFoeVIkqFK/qnnycLxAEgg03vJpn1tjiYULtIFLf94DsFgjD3HuZQYuG/OQWnuxchJK WxumdWUAPS9CeXo4JjXTG9oSBodB0mM0ia/JXO+Q4F4Zk8/wTIy7L4f9gXsZ7+b9QIJ/ fZjmmTjx77WE+Cg4uSqyiDxi3Wf48fd3LR3sWR0NvBRa6BsHuEu4GU7xgAdZhyJq90If ldO9uqMJ3J+yMU6Fnr26tMGbNKF2704S0i6c+Wi7wUJe29ngl1EZqnSI5lyyZI2e1Qp6 k2cw== 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=NurK9sx2E3ZorSLuDzTSVMGD0abr259MgqmkGxhYunc=; b=rnV4yLskwEYiYYkJXc0VpGWdBAR3L0VsUZf+Ee6YApHW04VjsGnBRswoIOvgL8PR+S 8EkrXcHgG3aFP7NB64h5QdvRVCx+fBrr2AdH3im+/ANP8N62wTF265bzN6sDvVeJ+eLE MAJ29MRzPWzN4VJNH6EdJsKmWh2zZJ29Ba5IdEpXVlLinhnAeXLwTvrVTs55tCGlVNEC zOFjBYyb+9pMQQqLPPfQBGKNKeoCkdE5iOn4v8qwf1Z4dlSFLBhJxYTtH312tZuMRh2v W1cenWyxpxwC6GUcAOt1OnZYHdXuEu92H6fGePNg+VWiAf2SFpaAvcsK8Su4RB2CiA1d jqxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=BfN4IUFU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 25si19381981ejh.765.2021.10.13.07.04.50; Wed, 13 Oct 2021 07:05:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=BfN4IUFU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235596AbhJMOEk (ORCPT + 99 others); Wed, 13 Oct 2021 10:04:40 -0400 Received: from mail.skyhub.de ([5.9.137.197]:36956 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230324AbhJMOEj (ORCPT ); Wed, 13 Oct 2021 10:04:39 -0400 Received: from zn.tnic (p200300ec2f1208001796bb6dc2170571.dip0.t-ipconnect.de [IPv6:2003:ec:2f12:800:1796:bb6d:c217:571]) (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 EF28E1EC051F; Wed, 13 Oct 2021 16:02:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1634133755; 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=NurK9sx2E3ZorSLuDzTSVMGD0abr259MgqmkGxhYunc=; b=BfN4IUFU3/eKIX37iXR25VuZJZfq0gwCcmJIo74REhBJxLHgr2IUVEc/tOe6+OWsIjhtwF pqmUlzUvmYxmZqM3q5gdwSGDl6BRWnqJfG0Qw1p1V2i06CSWDsBqNUW0EudVX23OlHE2Jy FVCoeKqYWNp5vr875rp1nUyJ4f0r800= Date: Wed, 13 Oct 2021 16:02:33 +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, 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 v6 07/42] x86/sev: Add support for hypervisor feature VMGEXIT Message-ID: References: <20211008180453.462291-1-brijesh.singh@amd.com> <20211008180453.462291-8-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211008180453.462291-8-brijesh.singh@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 08, 2021 at 01:04:18PM -0500, Brijesh Singh wrote: > Version 2 of GHCB specification introduced advertisement of a features > that are supported by the hypervisor. Add support to query the HV > features on boot. > > Version 2 of GHCB specification adds several new NAEs, most of them are > optional except the hypervisor feature. Now that hypervisor feature NAE > is implemented, so bump the GHCB maximum support protocol version. > > Signed-off-by: Brijesh Singh > --- > arch/x86/include/asm/sev-common.h | 3 +++ > arch/x86/include/asm/sev.h | 2 +- > arch/x86/include/uapi/asm/svm.h | 2 ++ > arch/x86/kernel/sev-shared.c | 30 ++++++++++++++++++++++++++++++ > 4 files changed, 36 insertions(+), 1 deletion(-) For the next version, when you add those variables, do this too pls: diff --git a/arch/x86/kernel/sev-shared.c b/arch/x86/kernel/sev-shared.c index 8ee27d07c1cd..7a2176e0d0ad 100644 --- a/arch/x86/kernel/sev-shared.c +++ b/arch/x86/kernel/sev-shared.c @@ -21,10 +21,10 @@ * * GHCB protocol version negotiated with the hypervisor. */ -static u16 __ro_after_init ghcb_version; +static u16 ghcb_version __ro_after_init; /* Bitmap of SEV features supported by the hypervisor */ -static u64 __ro_after_init sev_hv_features; +static u64 sev_hv_features __ro_after_init; static bool __init sev_es_check_cpu_features(void) { I didn't realize this earlier but we put that annotation at the end. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette