From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by mx.groups.io with SMTP id smtpd.web11.4844.1626768538485715448 for ; Tue, 20 Jul 2021 01:08:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ibm.com header.s=pp1 header.b=DoO+Stn/; spf=pass (domain: linux.ibm.com, ip: 148.163.158.5, mailfrom: dovmurik@linux.ibm.com) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16K88cTX024786; Tue, 20 Jul 2021 04:08:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pp1; bh=ETrjxJTL3MlUKuOrCj6MiXbh3LZ/HHbusHJIqxl+sC4=; b=DoO+Stn/3chXew/Q+OJ15E1f7A+ByMPxX9eAvbrgly3bRA3461C8n5NTxIrYQXpnNe1n PKK+xVsKtYjn9e/CoxCVeiDHKQTVnGL3L0MiP9hgGb2y/zYXdF2c/Abn1ctGmiDJoKWP GXFdZ9dHfWnicfXNEj32rghDdxTS+1pmyNCehbCYZvzHel+GiaCXjgV70l00lO/6At60 lLyuBBc2mCIDJLYbLb/WRFoSVnpYI1yD1oEo6oNruaw1DF1YsEkElUbmP68CPyMTUvr7 ilvhqo6t0z2v2vMuSgrbttl9rxZHiqEkG86Uat0r7YOUd6D2nlcaxEMCpvMuKwHZRG/z Kw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39wtce8fh9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Jul 2021 04:08:56 -0400 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 16K88twW025609; Tue, 20 Jul 2021 04:08:55 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 39wtce8ete-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Jul 2021 04:08:54 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16K82lCE019385; Tue, 20 Jul 2021 08:04:39 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma04dal.us.ibm.com with ESMTP id 39upubp0ef-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Jul 2021 08:04:39 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16K84avC27853202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Jul 2021 08:04:36 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C650B136065; Tue, 20 Jul 2021 08:04:36 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 91A72136053; Tue, 20 Jul 2021 08:04:35 +0000 (GMT) Received: from localhost.localdomain (unknown [9.2.130.16]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 20 Jul 2021 08:04:35 +0000 (GMT) From: "Dov Murik" To: devel@edk2.groups.io Cc: Dov Murik , Tobin Feldman-Fitzthum , Tobin Feldman-Fitzthum , Jim Cadden , James Bottomley , Hubertus Franke , Ard Biesheuvel , Jordan Justen , Ashish Kalra , Brijesh Singh , Erdem Aktas , Jiewen Yao , Min Xu , Tom Lendacky Subject: [PATCH v3 08/11] OvmfPkg/AmdSev/SecretPei: build hob for full page Date: Tue, 20 Jul 2021 08:03:58 +0000 Message-Id: <20210720080401.3662854-9-dovmurik@linux.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210720080401.3662854-1-dovmurik@linux.ibm.com> References: <20210720080401.3662854-1-dovmurik@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: rwnAWxzaPIXoHJ12CPgOhgNEqv127Qrh X-Proofpoint-GUID: dl2RGBrOtSO55xy_5Fm7pQe-dLdoLoOF X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-20_04:2021-07-19,2021-07-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 phishscore=0 malwarescore=0 bulkscore=0 adultscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107200047 Content-Transfer-Encoding: quoted-printable Round up the size of the SEV launch secret area to a whole page, as required by BuildMemoryAllocationHob. This will allow the secret area defined in the MEMFD to take less than a whole 4KB page. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Ashish Kalra Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Min Xu Cc: Tom Lendacky Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3457 Signed-off-by: Dov Murik --- OvmfPkg/AmdSev/SecretPei/SecretPei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/AmdSev/SecretPei/SecretPei.c b/OvmfPkg/AmdSev/SecretPe= i/SecretPei.c index ad491515dd5d..db94c26b54d1 100644 --- a/OvmfPkg/AmdSev/SecretPei/SecretPei.c +++ b/OvmfPkg/AmdSev/SecretPei/SecretPei.c @@ -4,6 +4,7 @@ Copyright (C) 2020 James Bottomley, IBM Corporation.=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D **/=0D +#include =0D #include =0D #include =0D #include =0D @@ -17,7 +18,7 @@ InitializeSecretPei ( {=0D BuildMemoryAllocationHob (=0D PcdGet32 (PcdSevLaunchSecretBase),=0D - PcdGet32 (PcdSevLaunchSecretSize),=0D + ALIGN_VALUE (PcdGet32 (PcdSevLaunchSecretSize), EFI_PAGE_SIZE),=0D EfiBootServicesData=0D );=0D =0D --=20 2.25.1