From nobody Mon Feb 9 09:07:54 2026 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+79158+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+79158+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1628769449; cv=none; d=zohomail.com; s=zohoarc; b=FlKwkqu9wTvX/nCEpH65ZCCFE+vde4RTJYSfBrrr2Y+jb8iXiNSCixJKPVTIf727p38+3NrYY1/Fv+rKG1SE/DIuCUrY70h9XuiDEPucclDq9aJlOkIVl7qWQI/aB6l/NP8dE7G74SQZHAo5WBsSGWUNH6v2hMar8Z7aOusWOSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628769449; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=oTYjWbi+WBvyH+aSojTTlW537PQCCAsPGjJqFCoLPpI=; b=dGGZ9wd2CmRA7pO7cWJhRs8uMRwp0uzcZA4/L7n1OOoiLNJ3XBQ5dye2cM1w05VQ86a5UWiRsa70BnQfrdWYFDvtck58HKNJd5GRphXj5bCSct/KURpz1wa8ZbSXvKl6kHHuT6XQokansg9idYFtxxXEgy+P7ke+F5/yM/1kpos= 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+79158+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1628769449956730.2646558471235; Thu, 12 Aug 2021 04:57:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ef4ZYY1788612xILo8ei1tgt; Thu, 12 Aug 2021 04:57:29 -0700 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web12.21190.1628769444911593052 for ; Thu, 12 Aug 2021 04:57:28 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10073"; a="215322119" X-IronPort-AV: E=Sophos;i="5.84,315,1620716400"; d="scan'208";a="215322119" X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 04:57:28 -0700 X-IronPort-AV: E=Sophos;i="5.84,315,1620716400"; d="scan'208";a="517433555" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.175.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 04:57:26 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Ard Biesheuvel , Jordan Justen , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky Subject: [edk2-devel] [PATCH 02/23] OvmfPkg/Sec: Update the check logic in SevEsIsEnabled Date: Thu, 12 Aug 2021 19:56:41 +0800 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,min.m.xu@intel.com X-Gm-Message-State: F56rOCHXUcVzcGCy1rgqebdax1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1628769449; bh=rs/4zS5DhS3SHxkKBTK7d+Dk5pLukUZDpFDBPpK7QLM=; h=Cc:Date:From:Reply-To:Subject:To; b=Dr5IjEbTUaFElkwslDML1NDHkUyjnc/ARPQirqcaSuuJGlg9Eyhgnt2WQbfOeT83HSs zYS0AaV1gKREUUVCqAnv7mfpO1lbw1vj8BKKlx+Li4mnZCTU/M5i1wBRFQlDTAPBNoce4 JAmfGcsTfMjF+RVaJ1l57pnsuVnSUj1H0DA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1628769450444100008 Content-Type: text/plain; charset="utf-8" RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3429 SevEsIsEnabled return TRUE if SevEsWorkArea->SevEsEnabled is non-zero. It is correct when SevEsWorkArea is only used by SEV. After Intel TDX is enabled in Ovmf, the SevEsWorkArea is shared by TDX and SEV. (This is to avoid the waist of memory region in MEMFD). The value of SevEsWorkArea->SevEsEnabled now is : 0 if in Legacy guest 1 if in SEV 2 if in Tdx guest That's why the changes is made. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Signed-off-by: Min Xu --- OvmfPkg/Sec/SecMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c index 9db67e17b2aa..e166a9389a1a 100644 --- a/OvmfPkg/Sec/SecMain.c +++ b/OvmfPkg/Sec/SecMain.c @@ -828,7 +828,7 @@ SevEsIsEnabled ( =20 SevEsWorkArea =3D (SEC_SEV_ES_WORK_AREA *) FixedPcdGet32 (PcdSevEsWorkAr= eaBase); =20 - return ((SevEsWorkArea !=3D NULL) && (SevEsWorkArea->SevEsEnabled !=3D 0= )); + return ((SevEsWorkArea !=3D NULL) && (SevEsWorkArea->SevEsEnabled =3D=3D= 1)); } =20 VOID --=20 2.29.2.windows.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 (#79158): https://edk2.groups.io/g/devel/message/79158 Mute This Topic: https://groups.io/mt/84837890/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-