Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1661060pxj; Wed, 19 May 2021 10:52:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv17Zl8ANu0HplDtGGhp2rXlOgTx7easPR85IFjCqieCwqYbFSxHwkHCLvK10MX9mBrk2G X-Received: by 2002:a02:7a5b:: with SMTP id z27mr126213jad.118.1621446770010; Wed, 19 May 2021 10:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621446770; cv=none; d=google.com; s=arc-20160816; b=Dsete+DmW0RoDdsQnNqGuQnoEIBXyHnCEYXm7Is3/6J/wli1EwbzKyUa9L7yo+Esnm BCUF8AI6BZp4AlltGn9X+jWNl+2xyaWBwCb3oAdiXRmLP7cKQy3R04BiiyfDbUpGFctU JVR/gqZhFdSLyuYZBzo9W0yqCcQqIiXGRhu/+YwOk2DZJczjtXCURSAjzbeBfR0UZqk6 mxHQRcPGIF8Tfj5aGi3sZbp6AexFrgBAVGQ1AWhPcwGqUhyOXuHrmncLkUMKD6JTpwZR rHC96pd/UShtZyjYkX8vpjSkxpXE+rykdqd2QR3T9XzgzU/nWPNp5XGXKLptb7Z5E7S3 sBgw== 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=rdxWhvramxY856CMW4AScLuyJ9Po7Sk21r5YjR+qMxQ=; b=iXniFg9jrzstv7vQSApGbx7kryY1FE1kwlwvjfShFexnHoLNhfrwQeC+Hnm4C/QvpM HCWQSyA4SSznMK+U+IChg4S4ziBUVqHVAD7g2wyX59Lski9/EXnjEW5c8tq7G++Xefg5 QULUPpoa5WTWpa6ZqGeyuMdQEkwEttxU9WiEk9rp70kSGtvN01BsMUrb1MsMDVDmPG4K ZN+vn5wKy+wTN90q8rhUjiJfTrn8sDor83oTRSovOIoGdaoAjOSuyIBV1JTMONye84lf 2MG+3qwFnIs3Tb2bgJ8SXMiwqJSqQp3ldgx9767x/0RYQe2l6WWcAO7zEzpYDBfVQ2c9 i3fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=eceG3+gG; 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 x17si18801164jan.4.2021.05.19.10.52.37; Wed, 19 May 2021 10:52:50 -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=eceG3+gG; 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 S1348625AbhERKqz (ORCPT + 99 others); Tue, 18 May 2021 06:46:55 -0400 Received: from mail.skyhub.de ([5.9.137.197]:56200 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348624AbhERKqt (ORCPT ); Tue, 18 May 2021 06:46:49 -0400 Received: from zn.tnic (p200300ec2f0ae20067192df7af4aebb0.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:e200:6719:2df7:af4a:ebb0]) (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 624A51EC01A8; Tue, 18 May 2021 12:45:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1621334724; 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=rdxWhvramxY856CMW4AScLuyJ9Po7Sk21r5YjR+qMxQ=; b=eceG3+gGdIIDxssqhT97mwkGW+VZpYrBShWX4iKkX/kBpt+2B/wylevpzAZ0LKyqMwk9In P0CLgp2r+7B4PkEf5Gmc9aWXjzXf0tX+dlgn9XrjKgHf78KOA5ylXlTWKg7XFq1NtsDvX2 K06zbBXDp7VOJPhHNlJXKA2cnVD9Lgs= Date: Tue, 18 May 2021 12:45:24 +0200 From: Borislav Petkov To: Brijesh Singh Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, tglx@linutronix.de, jroedel@suse.de, thomas.lendacky@amd.com, pbonzini@redhat.com, mingo@redhat.com, dave.hansen@intel.com, rientjes@google.com, seanjc@google.com, peterz@infradead.org, hpa@zytor.com, tony.luck@intel.com Subject: Re: [PATCH Part1 RFC v2 06/20] x86/sev: Define SNP guest request NAE events Message-ID: References: <20210430121616.2295-1-brijesh.singh@amd.com> <20210430121616.2295-7-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210430121616.2295-7-brijesh.singh@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 30, 2021 at 07:16:02AM -0500, Brijesh Singh wrote: > Version 2 of the GHCB specification added the support for SNP guest > request NAE events. The SEV-SNP guests will use this event to request > the attestation report. See the GHCB specification for more details. > > Signed-off-by: Brijesh Singh > --- > arch/x86/include/uapi/asm/svm.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/x86/include/uapi/asm/svm.h b/arch/x86/include/uapi/asm/svm.h > index f7bf12cad58c..7a45aa284530 100644 > --- a/arch/x86/include/uapi/asm/svm.h > +++ b/arch/x86/include/uapi/asm/svm.h > @@ -109,6 +109,8 @@ > #define SVM_VMGEXIT_SET_AP_JUMP_TABLE 0 > #define SVM_VMGEXIT_GET_AP_JUMP_TABLE 1 > #define SVM_VMGEXIT_SNP_PAGE_STATE_CHANGE 0x80000010 > +#define SVM_VMGEXIT_SNP_GUEST_REQUEST 0x80000011 > +#define SVM_VMGEXIT_SNP_EXT_GUEST_REQUEST 0x80000012 Why does this need the "VMGEXIT" *and* "SNP" prefixes? Why not simply: SVM_VMGEXIT_GUEST_REQ SVM_VMGEXIT_EXT_GUEST_REQ like the rest of the VMGEXIT defines in there? > #define SVM_VMGEXIT_HYPERVISOR_FEATURES 0x8000fffd > #define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffff > > @@ -218,6 +220,8 @@ > { SVM_VMGEXIT_AP_HLT_LOOP, "vmgexit_ap_hlt_loop" }, \ > { SVM_VMGEXIT_AP_JUMP_TABLE, "vmgexit_ap_jump_table" }, \ > { SVM_VMGEXIT_SNP_PAGE_STATE_CHANGE, "vmgexit_page_state_change" }, \ > + { SVM_VMGEXIT_SNP_GUEST_REQUEST, "vmgexit_snp_guest_request" }, \ > + { SVM_VMGEXIT_SNP_EXT_GUEST_REQUEST, "vmgexit_snp_extended_guest_request" }, \ > { SVM_VMGEXIT_HYPERVISOR_FEATURES, "vmgexit_hypervisor_feature" }, \ > { SVM_EXIT_ERR, "invalid_guest_state" } Ditto. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette