From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 429AAAC1821 for ; Mon, 20 May 2024 17:34:49 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=g/lAQP1Lf1ExqiB8qy9PBFWg26VKyz7fxNlz5pl1JDw=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1716226487; v=1; b=VgdWt4jR2s3Wpz51Vc47GcrfxcBt2NXchUEhvOFFGa59u0pNa42zJCRWVqsjjAvq+02i+8Ec P68Ljz4nAzqeqJN6ROo4drgX/PRW4fjuidTnzHjWe8TGDjGEh28uaReyS1L06xt0bOj6gifWEe+ Ek/zS9xo72gfXp7OWPCq1ziTzxQEXwcbn0q4g1XqRZ+V8dLaHegXbU0wo68T/Kyjy2szyYAIBLQ WWTtdDgbkY/FRFRrIhfR/vII77wPbM0ilVy+9auiEdjdx7WqehGDbN7CurhX+OV5Azbvlj5Tr7m sQu3h0NJFyOVj48qMz3fPyb9pZhFl2QGziLElsD8PWh1A== X-Received: by 127.0.0.2 with SMTP id GuXgYY7687511xSXqGo0oebU; Mon, 20 May 2024 10:34:47 -0700 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.81]) by mx.groups.io with SMTP id smtpd.web10.2692.1716226481871032792 for ; Mon, 20 May 2024 10:34:42 -0700 X-Received: from BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) by PH7PR12MB6419.namprd12.prod.outlook.com (2603:10b6:510:1fd::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Mon, 20 May 2024 17:34:39 +0000 X-Received: from BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::bf0:d462:345b:dc52]) by BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::bf0:d462:345b:dc52%7]) with mapi id 15.20.7587.030; Mon, 20 May 2024 17:34:38 +0000 Message-ID: <075ea811-8600-6f92-2a72-5aa5038ca71e@amd.com> Date: Mon, 20 May 2024 12:34:36 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [edk2-devel] [PATCH ovmf v3 2/5] MdePkg: Add AMD SEV features to PcdConfidentialComputingGuestAttr To: Alexey Kardashevskiy , devel@edk2.groups.io Cc: Liming Gao , Michael D Kinney , Zhiguang Liu , Ard Biesheuvel , Erdem Aktas , Gerd Hoffmann , Jiewen Yao , Michael Roth , Min Xu References: <20240502143445.526098-1-aik@amd.com> <20240502143445.526098-3-aik@amd.com> From: "Lendacky, Thomas via groups.io" In-Reply-To: <20240502143445.526098-3-aik@amd.com> X-ClientProxiedBy: SA9PR11CA0009.namprd11.prod.outlook.com (2603:10b6:806:6e::14) To BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5732:EE_|PH7PR12MB6419:EE_ X-MS-Office365-Filtering-Correlation-Id: 783c641d-5139-4698-12d6-08dc78f31fe4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: =?utf-8?B?SGlpRmVoK0ZpUTRXQ0NZT2xMaHZleTVWTDc5alZsNlJWQkxLQ1Y5UXZlNmFE?= =?utf-8?B?TmRmbUc2R0RFcEpvV2NpNkYrV2d0TVJIeFhxaFA3dHV5RFdHUGt5T1Z5aGNZ?= =?utf-8?B?d3ZqeWttTERqVllLcld6QWRnek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0yc1g1aFBrcS9aYkkwWksxU2Uy?= =?utf-8?B?Rkh4ZmhLcGdaWFI4a2pya2JpeUlUQm1POHprcEZTOE9OQWZFVWhsb2g2dkxj?= =?utf-8?B?WmZiSXk5SHR1c0tud01IdTFxUUg3ZWFRSlVFckIzczNPVThDeU85OEpxN0ZV?= =?utf-8?B?SUMvWDRkOUNlZ0V5dnFGczRxSCtGRUN4d3VGSUMwVzJ2RENxOTFzMnlmMGxx?= =?utf-8?Q?SUWCsk1s1kK96Kt65kYVizP06?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 783c641d-5139-4698-12d6-08dc78f31fe4 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5732.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2024 17:34:38.8664 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VIsNCxErKpbwIIG1UqYOfJmkXt/Yb5S36DmEN3J4Bb0BOg6E08Tv5iiqH0etfm+Q2bQqt679gECvHUHKP8thiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6419 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 20 May 2024 10:34:42 -0700 Resent-From: thomas.lendacky@amd.com Reply-To: devel@edk2.groups.io,thomas.lendacky@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ke1Knveu3fqX01hm6C7H27hRx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=VgdWt4jR; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io On 5/2/24 09:34, Alexey Kardashevskiy wrote: > PcdConfidentialComputingGuestAttr so far only contained an SEV mode bit > but there are more other features which do not translate to levels > such as DebugSwap or SecureTsc. >=20 > This adds the features mask and the DebugSwap feature bit to a PCD. >=20 > Cc: Liming Gao > Cc: Michael D Kinney > Cc: Zhiguang Liu > Cc: Tom Lendacky > Signed-off-by: Alexey Kardashevskiy One nit below, otherwise: Reviewed-by: Tom Lendacky > --- > Changes: > v2: > * expanded features mask > * added type mask > --- > MdePkg/Include/ConfidentialComputingGuestAttr.h | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) >=20 > diff --git a/MdePkg/Include/ConfidentialComputingGuestAttr.h b/MdePkg/Inc= lude/ConfidentialComputingGuestAttr.h > index 44e6df800207..c3a3dfb393f0 100644 > --- a/MdePkg/Include/ConfidentialComputingGuestAttr.h > +++ b/MdePkg/Include/ConfidentialComputingGuestAttr.h > @@ -29,9 +29,20 @@ typedef enum { > =20 > /* The guest is running with Intel TDX memory encryption enabled. */ > CCAttrIntelTdx =3D 0x200, > + > + CCAttrTypeMask =3D 0x000000000000ffff, > + > + /* Features */ > + > + /* The AMD SEV-ES DebugSwap feature is enabled in SEV_STATUS */ > + CCAttrFeatureAmdSevDebugSwap =3D 0x0000000000010000, Should this be CCAttrFeatureAmdSevEsDebugSwap? Otherwise, maybe just=20 make it CCAttrFeatureAmdDebugSwap. Thanks, Tom > + > + CCAttrFeatureMask =3D 0xffffffffffff0000, > } 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 CCAtt= rAmdSevEs || (x) =3D=3D CCAttrAmdSevSnp) > +#define _CC_GUEST_IS_TDX(x) ((x) =3D=3D CCAttrIntelTdx) > +#define CC_GUEST_IS_TDX(x) _CC_GUEST_IS_TDX((x) & CCAttrTypeMask) > +#define _CC_GUEST_IS_SEV(x) ((x) =3D=3D CCAttrAmdSev || (x) =3D=3D CCAt= trAmdSevEs || (x) =3D=3D CCAttrAmdSevSnp) > +#define CC_GUEST_IS_SEV(x) _CC_GUEST_IS_SEV((x) & CCAttrTypeMask) > =20 > #endif -=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 (#119086): https://edk2.groups.io/g/devel/message/119086 Mute This Topic: https://groups.io/mt/105863820/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-