From nobody Tue May 21 00:33:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+68920+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68920+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1608082955; cv=none; d=zohomail.com; s=zohoarc; b=bVVAp6iclriy7h/9MV/0vepMeQKVSzEcMqo1QJukq4O+vc8YigNHxbV2g565hob68a1pNiaQURxsjxhYVn/wECW3jMwKPHfNCi4xV6Z++aQGlHOzzx/AjFMcU/seHVt2MtACWw+q4Jm8hnof74YhsjUUyOS23F3Yo3smrn1iZH0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608082955; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=4woRrLrJyGj07Et1lcs22CNWiAoROmPKaOD6WUzLBJ0=; b=Eb0YL/tMoa2PWHpMiuwIhDkXgFnqbfnQOtUg9knpNRq2jWbIEQw667+81ktVvkslyqeeXgRQSeSu7wShlDwt7PZxVlaM4db3ejhFdEO5Q3A+n/wLWkuurtHs0WgqodRXJG07L1QNY+93quZvgziu/mBSQW85NezNqnkexDKIMYE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68920+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1608082955689465.43555763650045; Tue, 15 Dec 2020 17:42:35 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id zTJKYY1788612xNxQ5LB3MQX; Tue, 15 Dec 2020 17:42:35 -0800 X-Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.158.5]) by mx.groups.io with SMTP id smtpd.web12.1027.1608082954756228315 for ; Tue, 15 Dec 2020 17:42:34 -0800 X-Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0BG1WLAS054957; Tue, 15 Dec 2020 20:42:30 -0500 X-Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 35f84x0yxn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Dec 2020 20:42:30 -0500 X-Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0BG1WXFw056025; Tue, 15 Dec 2020 20:42:30 -0500 X-Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0b-001b2d01.pphosted.com with ESMTP id 35f84x0yxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Dec 2020 20:42:29 -0500 X-Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0BG1MDIZ010959; Wed, 16 Dec 2020 01:42:29 GMT X-Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma02wdc.us.ibm.com with ESMTP id 35cng9461j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Dec 2020 01:42:29 +0000 X-Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0BG1gRb130867856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Dec 2020 01:42:27 GMT X-Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5A488AC05F; Wed, 16 Dec 2020 01:42:27 +0000 (GMT) X-Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5AB63AC05B; Wed, 16 Dec 2020 01:42:25 +0000 (GMT) X-Received: from jarvis.int.hansenpartnership.com (unknown [9.80.214.106]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 16 Dec 2020 01:42:25 +0000 (GMT) From: "James Bottomley" To: devel@edk2.groups.io Cc: dovmurik@linux.vnet.ibm.com, Dov.Murik1@il.ibm.com, ashish.kalra@amd.com, brijesh.singh@amd.com, tobin@ibm.com, david.kaplan@amd.com, jon.grimm@amd.com, thomas.lendacky@amd.com, jejb@linux.ibm.com, frankeh@us.ibm.com, "Dr . David Alan Gilbert" , Laszlo Ersek , Jordan Justen , Ard Biesheuvel , "Yao, Jiewen" Subject: [edk2-devel] [PATCH 1/2] OvmfPkg: Change SEV Launch Secret API to be UINT64 for base and size Date: Tue, 15 Dec 2020 17:41:45 -0800 Message-Id: <20201216014146.2229-2-jejb@linux.ibm.com> In-Reply-To: <20201216014146.2229-1-jejb@linux.ibm.com> References: <20201216014146.2229-1-jejb@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jejb@linux.ibm.com X-Gm-Message-State: wAfWVlw9clvuRKbGc9VKeOB7x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608082955; bh=GPggWiZnNOt4fmSUp5sNeB+GT2eq5FeENCR0KJJfA8A=; h=Cc:Date:From:Reply-To:Subject:To; b=JGQI1nRFWbt9Fh4mJE4nk/M0qaOsSID1WrAWfj6i8WNZWDdt542dPE3ErcAcjOQdGDr Ad2w3nsAUE8oOQTmgZEzark9W1V90MuG9/ro5iHhbR1UEpoOiScjtl1XUNPc1b5IQ9k01 OtNsF/g42MyxNZ6/8UbxL3anj3mdxQuDSJ4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Although the SEV secret location must always be below 4GB, the same is not necessarily true for Intel TDX, so change the configuration table to contain a pair of UINT64 parameters instead of UINT32 so that any X64 location can be represented. Signed-off-by: James Bottomley Reviewed-by: Laszlo Ersek --- This represents an ABI change, so it is essential to get this in before the next stable tag --- OvmfPkg/Include/Guid/SevLaunchSecret.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/Include/Guid/SevLaunchSecret.h b/OvmfPkg/Include/Guid/= SevLaunchSecret.h index fa5f3830bc2b..dfd89646651b 100644 --- a/OvmfPkg/Include/Guid/SevLaunchSecret.h +++ b/OvmfPkg/Include/Guid/SevLaunchSecret.h @@ -19,8 +19,8 @@ } =20 typedef struct { - UINT32 Base; - UINT32 Size; + UINT64 Base; + UINT64 Size; } SEV_LAUNCH_SECRET_LOCATION; =20 extern EFI_GUID gSevLaunchSecretGuid; --=20 2.26.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68920): https://edk2.groups.io/g/devel/message/68920 Mute This Topic: https://groups.io/mt/78991610/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 21 00:33:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+68923+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68923+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1608082994; cv=none; d=zohomail.com; s=zohoarc; b=an9XKP/Oo66f/q7LmXc4SMcib1w78ISBI8uoSDH2/wuSX6lZY5o39eNNKSVpQ+uyp18VgRqJ3hBrsKa0JCghs6qOQLjn4SBAKUyH0WnkK2s2IA7ZtKDUoB9Omju/A48v8aeP4pOgAlwSM/KeI9fH4jHmANFQ2siJLwdv+CztanM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608082994; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=OPS3N9r92SkIy4gN1BOMgoe+hSVVUBP9jvomFQxHabc=; b=SXlN+Vw2aa0T1r3qpn8NfdBGRVdnfhpkcfbRlkKU+/H+3pn2lrZr38zLSlKx0eTkAUqnIzeHzUINs9BS1Bk7hAh8O/Zyzc2ExPxIBrseUXInIszLkrqhwBD1t2nFId++qtRSZT54mV+QUkSRqsuKLW4kraWze7pBmGz3vXb0Ca8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68923+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1608082994383226.83528935593188; Tue, 15 Dec 2020 17:43:14 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id ArBPYY1788612xdrHSlECELP; Tue, 15 Dec 2020 17:43:14 -0800 X-Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by mx.groups.io with SMTP id smtpd.web08.1050.1608082993701030683 for ; Tue, 15 Dec 2020 17:43:13 -0800 X-Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0BG13iv3127230; Tue, 15 Dec 2020 20:43:07 -0500 X-Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 35f7ygh3pn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Dec 2020 20:43:07 -0500 X-Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0BG1h7qI103628; Tue, 15 Dec 2020 20:43:07 -0500 X-Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 35f7ygh3p7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Dec 2020 20:43:07 -0500 X-Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0BG1h5FE005531; Wed, 16 Dec 2020 01:43:05 GMT X-Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma02wdc.us.ibm.com with ESMTP id 35cng9463w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Dec 2020 01:43:05 +0000 X-Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0BG1h3q221627376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Dec 2020 01:43:03 GMT X-Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 79463AC065; Wed, 16 Dec 2020 01:43:03 +0000 (GMT) X-Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 83F74AC059; Wed, 16 Dec 2020 01:43:01 +0000 (GMT) X-Received: from jarvis.int.hansenpartnership.com (unknown [9.80.214.106]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 16 Dec 2020 01:43:01 +0000 (GMT) From: "James Bottomley" To: devel@edk2.groups.io Cc: dovmurik@linux.vnet.ibm.com, Dov.Murik1@il.ibm.com, ashish.kalra@amd.com, brijesh.singh@amd.com, tobin@ibm.com, david.kaplan@amd.com, jon.grimm@amd.com, thomas.lendacky@amd.com, jejb@linux.ibm.com, frankeh@us.ibm.com, "Dr . David Alan Gilbert" , Laszlo Ersek , Jordan Justen , Ard Biesheuvel , "Yao, Jiewen" Subject: [edk2-devel] [PATCH 2/2] OvmfPkg/AmdSev/SecretDxe: make secret location naming generic Date: Tue, 15 Dec 2020 17:41:46 -0800 Message-Id: <20201216014146.2229-3-jejb@linux.ibm.com> In-Reply-To: <20201216014146.2229-1-jejb@linux.ibm.com> References: <20201216014146.2229-1-jejb@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jejb@linux.ibm.com X-Gm-Message-State: sauznUH4G0wvEqGbNoTiImRkx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608082994; bh=eKP4uU77GTtb4XA42aKxU8MNEXWb5Hn3ijcCqMW3yjE=; h=Cc:Date:From:Reply-To:Subject:To; b=X0CyotOzwV2joeA2g32O2U4MWoNg2AEF3ECYQ3Z7xQ49WWEHFsCjkxQ7vpSqRh2+uIN M0NIv/YFok7hOpIC7sc0/osNW/BMMSBGCqRk3l8mitPs/LnIDMiny62ThGpGD+sw1/KPH CGDg+AfuT+CcnPdy8+/VS+oZRCRb0RhpwdA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" It is anticipated that this part of the code will work for both Intel TDX and AMD SEV, so remove the SEV specific naming and change to ConfidentialComputing as a more architecture neutral prefix. Apart from the symbol rename, there are no code changes. Signed-off-by: James Bottomley Reviewed-by: Laszlo Ersek --- OvmfPkg/OvmfPkg.dec | 2 +- OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf | 2 +- ...SevLaunchSecret.h =3D> ConfidentialComputingSecret.h} | 10 +++++----- OvmfPkg/AmdSev/SecretDxe/SecretDxe.c | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) rename OvmfPkg/Include/Guid/{SevLaunchSecret.h =3D> ConfidentialComputingS= ecret.h} (69%) diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 8a294116efaa..50d7b27d941c 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -117,7 +117,7 @@ [Guids] gLinuxEfiInitrdMediaGuid =3D {0x5568e427, 0x68fc, 0x4f3d, {= 0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68}} gQemuKernelLoaderFsMediaGuid =3D {0x1428f772, 0xb64a, 0x441e, {= 0xb8, 0xc3, 0x9e, 0xbd, 0xd7, 0xf8, 0x93, 0xc7}} gGrubFileGuid =3D {0xb5ae312c, 0xbc8a, 0x43b1, {= 0x9c, 0x62, 0xeb, 0xb8, 0x26, 0xdd, 0x5d, 0x07}} - gSevLaunchSecretGuid =3D {0xadf956ad, 0xe98c, 0x484c, {= 0xae, 0x11, 0xb5, 0x1c, 0x7d, 0x33, 0x64, 0x47}} + gConfidentialComputingSecretGuid =3D {0xadf956ad, 0xe98c, 0x484c, {= 0xae, 0x11, 0xb5, 0x1c, 0x7d, 0x33, 0x64, 0x47}} =20 [Ppis] # PPI whose presence in the PPI database signals that the TPM base addre= ss diff --git a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf b/OvmfPkg/AmdSev/Secret= Dxe/SecretDxe.inf index 62ab00a3d382..40bda7ff846c 100644 --- a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf +++ b/OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf @@ -27,7 +27,7 @@ [LibraryClasses] UefiDriverEntryPoint =20 [Guids] - gSevLaunchSecretGuid + gConfidentialComputingSecretGuid =20 [FixedPcd] gUefiOvmfPkgTokenSpaceGuid.PcdSevLaunchSecretBase diff --git a/OvmfPkg/Include/Guid/SevLaunchSecret.h b/OvmfPkg/Include/Guid/= ConfidentialComputingSecret.h similarity index 69% rename from OvmfPkg/Include/Guid/SevLaunchSecret.h rename to OvmfPkg/Include/Guid/ConfidentialComputingSecret.h index dfd89646651b..7026fc5b089f 100644 --- a/OvmfPkg/Include/Guid/SevLaunchSecret.h +++ b/OvmfPkg/Include/Guid/ConfidentialComputingSecret.h @@ -6,12 +6,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 -#ifndef SEV_LAUNCH_SECRET_H_ -#define SEV_LAUNCH_SECRET_H_ +#ifndef CONFIDENTIAL_COMPUTING_SECRET_H_ +#define CONFIDENTIAL_COMPUTING_SECRET_H_ =20 #include =20 -#define SEV_LAUNCH_SECRET_GUID \ +#define CONFIDENTIAL_COMPUTING_SECRET_GUID \ { 0xadf956ad, \ 0xe98c, \ 0x484c, \ @@ -21,8 +21,8 @@ typedef struct { UINT64 Base; UINT64 Size; -} SEV_LAUNCH_SECRET_LOCATION; +} CONFIDENTIAL_COMPUTING_SECRET_LOCATION; =20 -extern EFI_GUID gSevLaunchSecretGuid; +extern EFI_GUID gConfidentialComputingSecretGuid; =20 #endif // SEV_LAUNCH_SECRET_H_ diff --git a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c b/OvmfPkg/AmdSev/SecretDx= e/SecretDxe.c index 5385a6aea275..308022b5b25e 100644 --- a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c +++ b/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c @@ -6,9 +6,9 @@ **/ #include #include -#include +#include =20 -STATIC SEV_LAUNCH_SECRET_LOCATION mSecretDxeTable =3D { +STATIC CONFIDENTIAL_COMPUTING_SECRET_LOCATION mSecretDxeTable =3D { FixedPcdGet32 (PcdSevLaunchSecretBase), FixedPcdGet32 (PcdSevLaunchSecretSize), }; @@ -21,7 +21,7 @@ InitializeSecretDxe( ) { return gBS->InstallConfigurationTable ( - &gSevLaunchSecretGuid, + &gConfidentialComputingSecretGuid, &mSecretDxeTable ); } --=20 2.26.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68923): https://edk2.groups.io/g/devel/message/68923 Mute This Topic: https://groups.io/mt/78991626/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-