From nobody Mon Feb 9 06:33:58 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+87689+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87689+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 164756442296081.97610620353976; Thu, 17 Mar 2022 17:47:02 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id KeQzYY1788612xgHIWAx7z8B; Thu, 17 Mar 2022 17:47:04 -0700 X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web09.4305.1647564386903029587 for ; Thu, 17 Mar 2022 17:47:03 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10289"; a="281817974" X-IronPort-AV: E=Sophos;i="5.90,190,1643702400"; d="scan'208";a="281817974" X-Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2022 17:47:03 -0700 X-IronPort-AV: E=Sophos;i="5.90,190,1643702400"; d="scan'208";a="541602763" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.172.84]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2022 17:46:59 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Michael Roth , Ray Ni , Rahul Kumar , Eric Dong , James Bottomley , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Gerd Hoffmann , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH V9 13/47] MdePkg: Add macro to check SEV / TDX guest Date: Fri, 18 Mar 2022 08:45:31 +0800 Message-Id: <6ec775161288e46ef3cda8f4f106d861c9c40f82.1647523953.git.min.m.xu@intel.com> 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: ZXY6AvbXQMVREbwLuPSF07AFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1647564424; bh=yiiHrozjdldsvmJralMR8RG+1nvldJjMC27l/X8Gh5w=; h=Cc:Date:From:Reply-To:Subject:To; b=d7aUdWsBhTMfmasWC4Py6kAvJZFYE0eZljtCFuxIdl+hb952tMvSRuJJPbyBh6v0PNb t7LcW6FB6RI+V4rzW/FHnrzIwdBKv5I+xv1hz8FMd37xoRbIK2pl1W6KqQ3vFLtpQST2O dYRL0NqNrQ4qY/CPTXy4L7EM5Y4QnBQwFCk= X-ZohoMail-DKIM: fail (Signature date is -2 seconds in the future.) X-ZM-MESSAGEID: 1647564430610100003 Content-Type: text/plain; charset="utf-8" RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3429 Add macros CC_GUEST_IS_SEV / CC_GUEST_IS_TDX to check SEV / TDX guest. Cc: Michael Roth Cc: Ray Ni Cc: Rahul Kumar Cc: Eric Dong Cc: James Bottomley Cc: Min Xu Cc: Jiewen Yao Cc: Tom Lendacky Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Erdem Aktas Cc: Gerd Hoffmann Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Acked-by: Gerd Hoffmann Signed-off-by: Min Xu --- MdePkg/Include/ConfidentialComputingGuestAttr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MdePkg/Include/ConfidentialComputingGuestAttr.h b/MdePkg/Inclu= de/ConfidentialComputingGuestAttr.h index 6a1301801519..dd2541c6dcdf 100644 --- a/MdePkg/Include/ConfidentialComputingGuestAttr.h +++ b/MdePkg/Include/ConfidentialComputingGuestAttr.h @@ -22,4 +22,7 @@ typedef enum { CCAttrIntelTdx =3D 0x200, } CONFIDENTIAL_COMPUTING_GUEST_ATTR; =20 +#define CC_GUEST_IS_TDX(x) ((x) =3D=3D CCAttrIntelTdx) +#define CC_GUEST_IS_SEV(x) ((x) =3D=3D CCAttrAmdSev || (x) =3D=3D CCAttrA= mdSevEs || (x) =3D=3D CCAttrAmdSevSnp) + #endif --=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 (#87689): https://edk2.groups.io/g/devel/message/87689 Mute This Topic: https://groups.io/mt/89859011/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-