From nobody Mon May 6 16:09:31 2024 Delivered-To: importer@patchew.org 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+96809+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1669872367660456.5397669738876; Wed, 30 Nov 2022 21:26:07 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id FZTxYY1788612x9NGRzzOe2h; Wed, 30 Nov 2022 21:26:07 -0800 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.75]) by mx.groups.io with SMTP id smtpd.web11.32941.1669862179932178542 for ; Wed, 30 Nov 2022 18:36:20 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pp3cUE2IopEspWwod+oaP4r6Qvn6AFY4wnDd9vlny/5f/bURVpIaLk+WiBViqZ1fS3aY/qGF2DQJjPSyvpDrmEvE8qvDNYTHUK3rheHk1rINPVMK//aHH4simQXCgmTbc1Cv7QWy7Zst2+lf2E+m4EUWqyP28wKvOIlcUwC+gNWQCR4tuMrDgN511bSWId3p8ArD6ebIC3EMGZZmaZ2D06oYguCH/AxR10ah2fMBVJ9MWM3bi+VXqap54qJbgfXSncnQ4XCU82tJS5wWKJrs4Jadh6rLUmz7LS7yLvXxO4Kzb1IwnW/UhMAIies5d4S7KRxzUNuBm3xLbOXFgBBApA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E/g/a6mMLdnllXLJRI+HfDyfSh6Ljg14ne3AxMudDsA=; b=Y9uISvYF++I/FzcRJscSGOO/oXBSJFKRDZ5RKJxU4vu/pKDbF4szhZ9WkHo89Gjai6IRQPjLRteuF6VYwHYFg/L18pjox8C/GhlhDk9Iu5qDrPLnYnwsf+VDbIACAHwvlRTEjBB66NDnlCPP8i7XTOMwBJHCnWCQ5ZDWjlCNFng4CwM/jl9Onu0GOXjWnctB71CrmrdWrJZ8zZiRBSuCgV+HSOcUM35qT3qZGL6oyqZ2YTzIHzmDX4rrl4qRk1ezkzF+w0Ob4vOiikRWGNcJBT1idqZNy1dvzpZaPr2N4ByWAqDvcgDf06YF/FaxZ5AEq+YxPKbtYmul5aPvyi2qRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from DS7PR03CA0293.namprd03.prod.outlook.com (2603:10b6:5:3ad::28) by DS0PR12MB7851.namprd12.prod.outlook.com (2603:10b6:8:14a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Thu, 1 Dec 2022 02:36:18 +0000 X-Received: from DS1PEPF0000E62F.namprd02.prod.outlook.com (2603:10b6:5:3ad:cafe::6) by DS7PR03CA0293.outlook.office365.com (2603:10b6:5:3ad::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23 via Frontend Transport; Thu, 1 Dec 2022 02:36:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; 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+96809+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000E62F.mail.protection.outlook.com (10.167.17.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5857.17 via Frontend Transport; Thu, 1 Dec 2022 02:36:18 +0000 X-Received: from aiemdeew.1.ozlabs.ru (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 30 Nov 2022 20:36:12 -0600 From: "Alexey Kardashevskiy via groups.io" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , "Gerd Hoffmann" , Brijesh Singh , "Erdem Aktas" , James Bottomley , Min Xu , Tom Lendacky , "Alexey Kardashevskiy" Subject: [edk2-devel] [PATCH ovmf 1/5] MdePkg/Register/Amd: Define all bits from MSR_SEV_STATUS_REGISTER Date: Thu, 1 Dec 2022 13:35:17 +1100 Message-ID: <20221201023521.10028-2-aik@amd.com> In-Reply-To: <20221201023521.10028-1-aik@amd.com> References: <20221201023521.10028-1-aik@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E62F:EE_|DS0PR12MB7851:EE_ X-MS-Office365-Filtering-Correlation-Id: 92f92064-e6b6-427d-1cd1-08dad344d35d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: b5ixKp/LXElvOhHIAL1HlsE4nGgWMUfilD0pnYRPFqOAq0KZg1jYhHZ+/Q1akLdZd6ZmNJSu/oqifIG2hnFnNs2QJ/P2nl4BSwXxWuAOZPOsnopGaIDQ6+efehUOVkeTrxGqM5ByA0MJVtR6edpQ1ccWi0f7Wq3x3tIFgRUekUcaHT7qd8U+s5aR/3As03ouBuiVX2zvxW3jNBMdBMahYAU6ujW4huSQDBHUNslOVd5P7QUKUD8ANLhz/UBN06JOSjl0O5r5mYTvqez2nckjhViINYiUWelPuqN5r9XmxqSy67ePNHFsRQRdpiuSmttt46tC/CU4brpCEyJL31otNK9OL8H0B1zvNzO2jjux2wkUUzUk67zZKVMINgo64Jiev2Kpmdb1KAKhJR08jIXADMjjXIE9N0exaMoeMYDyWyaxOOCBPJ1VQcvNR5HZivTMmmtqf69aHIAlo43f5W8ts+U9wzFgUK+POYS1BfPOk1setlTDlgqLjDOF1SPAf0LuXeJL3qRPv64b23tD1YLh8Zlh7ZHMDYa3c0l3N9lC79bzSZqtKqRBZQmYgKOmEMe8Q7bWE3ivz5sOv2RtsPo7nsnMR3BStAu5AwDXiCtFRRJftWKl3fZmhyP158fbrOL/Qaua/88N5CSqxfgOQDTTX1efn+ezF8OJ6rGpNTdwtKgNdMj+brycCoCSe1lPknhSc6ZurTGWTK7kOCeyOh/ovp6USgRlB0iH3txbdmU9ZS8= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2022 02:36:18.2740 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92f92064-e6b6-427d-1cd1-08dad344d35d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E62F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7851 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,aik@amd.com X-Gm-Message-State: KZT0HgPWzhfnAvJM8KZ0W8xEx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1669872367; bh=7AxrJ6sFv2V0rwq1CJN1HUGcmOafIQ5hl4vXKo9EzEc=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=DKHO4bKspmPSMKZ2EPHU0+r7afR9+LEngZ30dwTnjfRrmeoK+IojHko8G7Z5a+q3aXL tJ1+lRXPYQtxlEeu414zUWqz5a1FxozS+h6onW0DmYQBwvR6Yf1IABtVKlHRZBwv2LVKK tha98It9v/8sGhIpKMLNNgUy/Qd1V8YhaBg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1669872369775100017 Content-Type: text/plain; charset="utf-8" We will need soon DebugSwap but others likely too. Signed-off-by: Alexey Kardashevskiy --- MdePkg/Include/Register/Amd/Fam17Msr.h | 57 +++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Register/Amd/Fam17Msr.h b/MdePkg/Include/Regist= er/Amd/Fam17Msr.h index bb4e143e2456..f9474e6776f2 100644 --- a/MdePkg/Include/Register/Amd/Fam17Msr.h +++ b/MdePkg/Include/Register/Amd/Fam17Msr.h @@ -121,7 +121,62 @@ typedef union { /// UINT32 SevSnpBit : 1; =20 - UINT32 Reserved2 : 29; + /// + /// [Bit 3] The guest was run with the Virtual TOM feature enabled in = SEV_FEATURES[1] + /// + UINT32 vTOM_Enabled : 1; + + /// + /// [Bit 4] The guest was run with the ReflectVC feature enabled in SE= V_FEATURES[2] + /// + UINT32 ReflectVC : 1; + + /// + /// [Bit 5] The guest was run with the Restricted Injection feature en= abled in SEV_FEATURES[3] + /// + UINT32 RestrictedInjection : 1; + + /// + /// [Bit 6] The guest was run with the Alternate Injection feature ena= bled in SEV_FEATURES[4] + /// + UINT32 AlternateInjection : 1; + + /// + /// [Bit 7] This guest was run with debug register swapping enabled in= SEV_FEATURES[5] + /// + UINT32 DebugSwap : 1; + + /// + /// [Bit 8] This guest was run with the PreventHostIBS feature enable= d in SEV_FEATURES[6] + /// + UINT32 PreventHostIBS : 1; + + /// + /// [Bit 9] The guest was run with the BTB isolation feature enabled i= n SEV_FEATURES[7] + /// + UINT32 SNPBTBIsolation : 1; + + /// + /// [Bit 10] + /// + UINT32 Reserved0 : 1; + + /// + /// [Bit 11] The guest was run with the Secure TSC feature enabled in = SEV_FEATURES[9] + /// + UINT32 SecureTsc : 1; + + /// + /// [Bits 12 13 14 15] + /// + UINT32 Reserved1 : 4; + + /// + /// [Bit 16] The guest was run with the VMSA Register Protection featu= re enabled in SEV_FEATURES[14] + /// + UINT32 VmsaRegProt_Enabled : 1; + + UINT32 Reserved2 : 15; } Bits; /// /// All bit fields as a 32-bit value --=20 2.38.1 -=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 (#96809): https://edk2.groups.io/g/devel/message/96809 Mute This Topic: https://groups.io/mt/95376259/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 Mon May 6 16:09:31 2024 Delivered-To: importer@patchew.org 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+96814+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1669872998350512.4485841972039; Wed, 30 Nov 2022 21:36:38 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id NeV9YY1788612xkc15PougZb; Wed, 30 Nov 2022 21:36:37 -0800 X-Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.67]) by mx.groups.io with SMTP id smtpd.web10.35759.1669872997392811255 for ; Wed, 30 Nov 2022 21:36:37 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WKA6ZCY4vzgWDvO2Mc32WcgQtrViQkzNMNYjCiby8YTu9g1uZMR7k66YPJ4+VXfDwsENXpX6maRlon0ojuhQHUkvNHRL2RpBQIcm0vQSw7Ny6Ode3fGWanF15kO8nmda8WRR7vOlHrUXUfed2TxfYsAAWYdevmuJ+VVT5uanyp0VslLaEzLoGRyuWSzahWhtwsh7okIjEcBHKSxw2UtKu8d978JgPTqTl0OhDgSFqWaiR/IbYXjdEwkIxf3CRkCBxlb/5L12AMq/gy0EmOTrf6g+217jIEZrLY1wQALew7XOgNCBc3xKUsLF4L+JOsIEJ/iquj1TpvbHxthNLnlLww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dMtqlwc0jNAuBHQOtRmXi7D3IQccPdcz7GSHVigbYI4=; b=S3nMUq3DO69xX1pziJ1KEVeT4Gq0uoxV/d770Hv486Y8QBX44EeK/dKLBsK8ZEqzMDh8iNmgT7SgXQDiC1hf9x11PH0ZYleYwxDbK2S3dwiez474TNG9q6XZLJP2jzatuGHmHC6aorj4+NBRQVu1Jugfw4LBCcdmt0K8gYJ1NUihu/pzg58FddQyxxmflgVE733/yETf+Lm4PxeCLqlwQx7jeFzRsLYVByDBgMhjfjsLXeryd+KVvSFscmSktzGfnGPuBlHxmjfg5zrsRrXm0YJQl4PYscOUrAV0JKm0oeFsqa8+sZ37aTIy08s3L/tuTplyCP1RBcHV+TgrQoUSEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from DS7PR03CA0352.namprd03.prod.outlook.com (2603:10b6:8:55::32) by BL0PR12MB4915.namprd12.prod.outlook.com (2603:10b6:208:1c9::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Thu, 1 Dec 2022 05:36:35 +0000 X-Received: from DM6NAM11FT068.eop-nam11.prod.protection.outlook.com (2603:10b6:8:55:cafe::4e) by DS7PR03CA0352.outlook.office365.com (2603:10b6:8:55::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23 via Frontend Transport; Thu, 1 Dec 2022 05:36:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; 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+96814+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT068.mail.protection.outlook.com (10.13.173.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5857.17 via Frontend Transport; Thu, 1 Dec 2022 05:36:35 +0000 X-Received: from aiemdeew.1.ozlabs.ru (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 30 Nov 2022 23:36:25 -0600 From: "Alexey Kardashevskiy via groups.io" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , "Gerd Hoffmann" , Brijesh Singh , "Erdem Aktas" , James Bottomley , Min Xu , Tom Lendacky , "Alexey Kardashevskiy" Subject: [edk2-devel] [PATCH ovmf 2/5] MdePkg: Add AMD SEV features to PcdConfidentialComputingGuestAttr Date: Thu, 1 Dec 2022 16:36:09 +1100 Message-ID: <20221201053609.20064-1-aik@amd.com> In-Reply-To: <20221201023521.10028-1-aik@amd.com> References: <20221201023521.10028-1-aik@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT068:EE_|BL0PR12MB4915:EE_ X-MS-Office365-Filtering-Correlation-Id: a4bcd852-1ade-4200-60ac-08dad35e029e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: w+v9MysvVZbrgyd3kL2PZDNP0gSSgMqw0ZpVgcMXbGVK6/79SZgndXTVbLKQCdVT4RYMKIugHLUgH6SKJe4aHs6sYfkD5frEPM71bvx+Q+jtH7HvMQ4j9ZzTXAaOS/pD4QbuYUWWWZn/VjyoLk4UVILArSOJps8icZ8gA2fm7IwYzz1L1AqIsVshI7dEJi00Ums5C8SsTZV++BPfZ8clXlME0tkjTkOGpT6zd+b6j9m+wrqxqT6JBrbT9Rq+VhvdAPKXzgGjdoMmSt0gzf8up2FWappyYZuyAUNYDMZ72i2mWV+scq+mzHTShJDYcyuCJ84gr7RI6/BV/x/41/lqs78M7pTMqp4S1O2coMx0mELQb4e0o3oGOQZ1icKNAPInz83ppaaYG/8+NVerpxGv+gCw8rh3BZO6TVDvGXveWKg6rBFjXJYjZhrlFqti3KqiHDgGVCzMQ6L96tM4eHyymKisLLPn/MMnppL/F0oM7/TYRnFhPFklgAkeKvCqFXFBF3hq56DZcNslYInkjOxDhRQnog29bs19YEhrZCVlm7pY/rQe3vrf4n5kIzmVNwZst4xq8oU/ntVIRm1BHp746CuJFLICeNEpnbOdZ+832IQztWc6bdx6SN/ctiJtUx7N2FcCU7G2PocONgwxOeDcHNU5ETkMq5yXhU6en/eYmx53+EGbo3Miv4qjLFstlqr6zKsHXl1nYplP3oBtvKE3+jtIcr9mMQDsNiMvkMnWrxZ9C4OSShciznCXItcLUIw9L+tdU5Wfy5OD9IMRT4zyuQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2022 05:36:35.0041 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a4bcd852-1ade-4200-60ac-08dad35e029e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT068.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4915 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,aik@amd.com X-Gm-Message-State: oH3lrjx8mdh7if6h2JZpoVQFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1669872997; bh=vpAukSnDYK0FGSSWtoXiJ9Kl1O8mJua6iCMpK4Q6tdk=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=CD399Oqr4nITgnNOIgVrhlvYRFL5ThAV9K2PrsdysKNno8seh8RGbNr/TTm67FvvXP1 hhvgZiEiRfCI3ignSxZoKVSPAMIXo4KoBxWoOSlvQ0Htm6hUF9vsNNjMmQtOXhC/wANbk 3uEfqyuZVhTKoNEAH5ymbOhvSy5hDjKo/PU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1669872999457100001 Content-Type: text/plain; charset="utf-8" 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. This adds the features mask and the DebugSwap feature bit to a PCD. Signed-off-by: Alexey Kardashevskiy --- MdePkg/Include/ConfidentialComputingGuestAttr.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/ConfidentialComputingGuestAttr.h b/MdePkg/Inclu= de/ConfidentialComputingGuestAttr.h index 44e6df800207..1fd09a51ea52 100644 --- a/MdePkg/Include/ConfidentialComputingGuestAttr.h +++ b/MdePkg/Include/ConfidentialComputingGuestAttr.h @@ -26,12 +26,15 @@ typedef enum { CCAttrAmdSev =3D 0x100, CCAttrAmdSevEs =3D 0x101, CCAttrAmdSevSnp =3D 0x102, + CCAttrAmdSevFeatureMask =3D 0xffff0000, + CCAttrAmdSevFeatureDebugSwap =3D 0x00010000, =20 /* The guest is running with Intel TDX memory encryption enabled. */ 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) +#define _CC_GUEST_IS_SEV(x) ((x) =3D=3D CCAttrAmdSev || (x) =3D=3D CCAttrA= mdSevEs || (x) =3D=3D CCAttrAmdSevSnp) +#define CC_GUEST_IS_SEV(x) _CC_GUEST_IS_SEV((x) & ~CCAttrAmdSevFeatureMas= k) =20 #endif --=20 2.38.1 -=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 (#96814): https://edk2.groups.io/g/devel/message/96814 Mute This Topic: https://groups.io/mt/95376324/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 Mon May 6 16:09:31 2024 Delivered-To: importer@patchew.org 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+96810+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1669872366207126.81264896156654; Wed, 30 Nov 2022 21:26:06 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id ug19YY1788612xlgutaoD2af; Wed, 30 Nov 2022 21:26:05 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.40]) by mx.groups.io with SMTP id smtpd.web10.32749.1669862242038073726 for ; Wed, 30 Nov 2022 18:37:22 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HfZ6eQMIPDkN37ygLL/4lpTQ9Lntdl96RGLnNUnGng9kO9gbIGa0tx3Vk7eg1kd59mth6kqBcwkXLsHxQPnH41TQf8cmGOAvN0N+mjD63cyMJezqiC0B9FcewcPvA0LJbyqrCac8FpNSjl0O2yp2RaW6Xwhl57Zfi8IWjtHnJGS9izPPe7Nxhyau34i8c22aL59OcEGYXciKBCUpa9WRUPmL2pQFeE5kXd4KRTnIq3uYLAcWBul+fjkXgBy9amC7+ce1oepxVZ59W9AqqUEVMeybeDH9bmTAsuO0CWgeJCPRROioZbEdALVgu2p2D4Q/P1sXcxkOwsoD/eX1EWgEwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8sfxmFi8q4ThKLJJwUWNTI/X9SQJnBKPzxpjvN/y2AY=; b=PBvNH01ABb3xcDctVj96ldC0Mn5VtV3KNEbpgraiBbWsEKeZthM+qrQBCxNPnHlu6Wr6V8O2Tg7k3axACO9n4IQvqPooTWDRi5ertOAmGwOZOlhTzZPmiz5PMJmIUjG14eIRn8qIaJTiuG09UK5G/snqg3pWEft3b05PkF+klCxFCTITwNhSLmce1Tdakb3Y7fYBRzKBcal02IeW56cOwduQgMibCSvWhERxTZYa73WjNvhwFteXpVhCR0wb6KFYAXIXqpfOn1/CF/KgPP7QIcFkqGh3nnNNcl//4y7//I601pdI5P2DGWeT8DGNOwvFwEJxJ5+7+2/h4zg6AP835g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from DM6PR06CA0018.namprd06.prod.outlook.com (2603:10b6:5:120::31) by BY5PR12MB4274.namprd12.prod.outlook.com (2603:10b6:a03:206::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Thu, 1 Dec 2022 02:37:19 +0000 X-Received: from DS1PEPF0000B078.namprd05.prod.outlook.com (2603:10b6:5:120:cafe::fd) by DM6PR06CA0018.outlook.office365.com (2603:10b6:5:120::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23 via Frontend Transport; Thu, 1 Dec 2022 02:37:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; 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+96810+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000B078.mail.protection.outlook.com (10.167.17.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5880.8 via Frontend Transport; Thu, 1 Dec 2022 02:37:18 +0000 X-Received: from aiemdeew.1.ozlabs.ru (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 30 Nov 2022 20:37:13 -0600 From: "Alexey Kardashevskiy via groups.io" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , "Gerd Hoffmann" , Brijesh Singh , "Erdem Aktas" , James Bottomley , Min Xu , Tom Lendacky , "Alexey Kardashevskiy" Subject: [edk2-devel] [PATCH ovmf 3/5] OvmfPkg: Add AMD SEV-ES DebugSwap feature support Date: Thu, 1 Dec 2022 13:35:19 +1100 Message-ID: <20221201023521.10028-4-aik@amd.com> In-Reply-To: <20221201023521.10028-1-aik@amd.com> References: <20221201023521.10028-1-aik@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000B078:EE_|BY5PR12MB4274:EE_ X-MS-Office365-Filtering-Correlation-Id: 2547e020-6137-474f-eec7-08dad344f768 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 1tLZkjNApDOD4HAv/Q9K2KrGOD3Ha19aug0RBCeMIs//sU4++ZkmoIk7W2IZR2omCKUzvvFM1eH7eb4wuY+HuqVaMAh+uBTwQYxJSWXr0VvPVy8gE0FXF2OJxDh7+8MnlyRoBVr59o8Xak5Tt+dYQ+Zrm5KXxwt1HtClsCy1wKfNLn6w4Q+dbj3syTxSeQgCIoWM9/5ITDy+/2Sqn4ANiErqjB5HD84tRB7Be/5kALzbtDZGMq5VDdz8v4eE7JYqaiL7DGg2WkuH1aa03kK1xq1PSxFhzj41+X7e4JWvFviwDYPNL08B4UiVnayHOq5Qp4DaWxoiyHrpkWXwnLI6rLwo5r7sUMpsSLwoxSkDFphDjbZ/e1KlKsLTEdET9VsgAuZpu5bXpfmglGnjrEJlmbfUFe8oktuY6Wp3glMUt4oMfnrq8HTKwIUSuW/DCp4IHCU9vYbBqwaw7xyyEGGJVgXzWp0uYyUhol1yGRiS6PL/yanQ9Vl/aDr0xcTdS0i7uwkem+7R5dm8/pnQLyRT4wuq7vQz9MvIZRj/OalCb1OM81t69jB9rDqbV8OYxOJ+Cc7Jjw19XNsydmqOZj/q/HUzXt+RAJ9igNfBoAh7YTH/GzQ3FDVGqNqYxVKQ448ziO7/XCP69nuLrZlUGns7XxHuKrahR28CWcF7W/Y6OCRBuTQHXYinjtZrVzNal7MCDFgpshCMDgRJsBqlAUcTcXdGIOYfX+a4JcJqe988WVA= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2022 02:37:18.7651 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2547e020-6137-474f-eec7-08dad344f768 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000B078.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4274 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,aik@amd.com X-Gm-Message-State: qGXTHMKZr0PLqSbWhSrgfKmgx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1669872365; bh=2hlcy2zlubWlYdWqNeyEP8BGRxr9ES/Clkrp+7Zqvns=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=I1B72b7+CM2/TOUFUU9o9y9Cg+FQpQTsA7NEfDmmA2o7Vkt3gvs25028B6LlQvQDZYL xtcLYx9SOWEoKiBG+PibqeqU/V/2ICqV7qQLMxM6NDtXCDQglpPQoqTR1Oj5pSezzDyGo DA/TieiEXq/LxSdwa57e0j7y4+y0u/gifZw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1669872367782100008 Content-Type: text/plain; charset="utf-8" The SEV-ES DebugSwap feature enables type B swaping of debug registers on #VMEXIT and makes #DB and DR7 intercepts unnecessary and unwanted. When DebugSwap is enabled, this stops booting if #VC for #DB or DB7 read/write occurs as this signals unwanted interaction from the HV. This adds new API which uses SEV-ES working area in PEI and SEC. This does not change the existing behavour for DXE just yet but soon. Signed-off-by: Alexey Kardashevskiy --- OvmfPkg/Include/Library/MemEncryptSevLib.h | 12 ++= ++++++++ OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c | 25 ++= +++++++++++++++--- OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c | 19 ++= +++++++++++++ OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c | 20 ++= ++++++++++++++ OvmfPkg/Library/CcExitLib/CcExitVcHandler.c | 8 ++= +++++ 5 files changed, 81 insertions(+), 3 deletions(-) diff --git a/OvmfPkg/Include/Library/MemEncryptSevLib.h b/OvmfPkg/Include/L= ibrary/MemEncryptSevLib.h index 4fa9c0d70083..0fa86aecc38c 100644 --- a/OvmfPkg/Include/Library/MemEncryptSevLib.h +++ b/OvmfPkg/Include/Library/MemEncryptSevLib.h @@ -166,6 +166,18 @@ MemEncryptSevGetEncryptionMask ( VOID ); =20 +/** + Returns a boolean to indicate whether DebugSwap is enabled. + + @retval TRUE DebugSwap is enabled + @retval FALSE DebugSwap is not enabled +**/ +BOOLEAN +EFIAPI +MemEncryptSevEsDebugSwapIsEnabled ( + VOID + ); + /** Returns the encryption state of the specified virtual address range. =20 diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibIntern= al.c b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c index 4aba0075b9e2..ffe5399c73ca 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c @@ -40,19 +40,23 @@ AmdMemEncryptionAttrCheck ( IN CONFIDENTIAL_COMPUTING_GUEST_ATTR Attr ) { + UINT64 CurrentLevel =3D CurrentAttr & ~CCAttrAmdSevFeatureMask; + switch (Attr) { case CCAttrAmdSev: // // SEV is automatically enabled if SEV-ES or SEV-SNP is active. // - return CurrentAttr >=3D CCAttrAmdSev; + return CurrentLevel >=3D CCAttrAmdSev; case CCAttrAmdSevEs: // // SEV-ES is automatically enabled if SEV-SNP is active. // - return CurrentAttr >=3D CCAttrAmdSevEs; + return CurrentLevel >=3D CCAttrAmdSevEs; case CCAttrAmdSevSnp: - return CurrentAttr =3D=3D CCAttrAmdSevSnp; + return CurrentLevel =3D=3D CCAttrAmdSevSnp; + case CCAttrAmdSevFeatureDebugSwap: + return !!(CurrentAttr & CCAttrAmdSevFeatureDebugSwap); default: return FALSE; } @@ -159,3 +163,18 @@ MemEncryptSevGetEncryptionMask ( =20 return mSevEncryptionMask; } + +/** + Returns a boolean to indicate whether DebugSwap is enabled. + + @retval TRUE DebugSwap is enabled + @retval FALSE DebugSwap is not enabled +**/ +BOOLEAN +EFIAPI +MemEncryptSevEsDebugSwapIsEnabled ( + VOID + ) +{ + return ConfidentialComputingGuestHas (CCAttrAmdSevFeatureDebugSwap); +} diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibIntern= al.c b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c index 41d1246a5b31..e2ebc8afcaee 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c @@ -141,3 +141,22 @@ MemEncryptSevGetEncryptionMask ( =20 return SevEsWorkArea->EncryptionMask; } + +/** + Returns a boolean to indicate whether DebugSwap is enabled. + + @retval TRUE DebugSwap is enabled + @retval FALSE DebugSwap is not enabled +**/ +BOOLEAN +EFIAPI +MemEncryptSevEsDebugSwapIsEnabled ( + VOID + ) +{ + MSR_SEV_STATUS_REGISTER Msr; + + Msr.Uint32 =3D InternalMemEncryptSevStatus (); + + return Msr.Bits.DebugSwap ? TRUE : FALSE; +} diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibIntern= al.c b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c index 27148c7e337a..974be9555296 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c @@ -142,6 +142,26 @@ MemEncryptSevGetEncryptionMask ( return SevEsWorkArea->EncryptionMask; } =20 + +/** + Returns a boolean to indicate whether DebugSwap is enabled. + + @retval TRUE DebugSwap is enabled + @retval FALSE DebugSwap is not enabled +**/ +BOOLEAN +EFIAPI +MemEncryptSevEsDebugSwapIsEnabled ( + VOID + ) +{ + MSR_SEV_STATUS_REGISTER Msr; + + Msr.Uint32 =3D InternalMemEncryptSevStatus (); + + return Msr.Bits.DebugSwap ? TRUE : FALSE; +} + /** Locate the page range that covers the initial (pre-SMBASE-relocation) SM= RAM Save State Map. diff --git a/OvmfPkg/Library/CcExitLib/CcExitVcHandler.c b/OvmfPkg/Library/= CcExitLib/CcExitVcHandler.c index 985e5479775c..811cad164ea2 100644 --- a/OvmfPkg/Library/CcExitLib/CcExitVcHandler.c +++ b/OvmfPkg/Library/CcExitLib/CcExitVcHandler.c @@ -2136,6 +2136,10 @@ Dr7WriteExit ( UINT64 *Register; UINT64 Status; =20 + if (MemEncryptSevEsDebugSwapIsEnabled ()) { + return UnsupportedExit (Ghcb, Regs, InstructionData); + } + Ext =3D &InstructionData->Ext; SevEsData =3D (SEV_ES_PER_CPU_DATA *)(Ghcb + 1); =20 @@ -2188,6 +2192,10 @@ Dr7ReadExit ( SEV_ES_PER_CPU_DATA *SevEsData; UINT64 *Register; =20 + if (MemEncryptSevEsDebugSwapIsEnabled ()) { + return UnsupportedExit (Ghcb, Regs, InstructionData); + } + Ext =3D &InstructionData->Ext; SevEsData =3D (SEV_ES_PER_CPU_DATA *)(Ghcb + 1); =20 --=20 2.38.1 -=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 (#96810): https://edk2.groups.io/g/devel/message/96810 Mute This Topic: https://groups.io/mt/95376260/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 Mon May 6 16:09:31 2024 Delivered-To: importer@patchew.org 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+96811+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1669872366569634.8673189881966; Wed, 30 Nov 2022 21:26:06 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id brH0YY1788612xtBAEpePFfF; Wed, 30 Nov 2022 21:26:06 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web10.32758.1669862261957366035 for ; Wed, 30 Nov 2022 18:37:42 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NpHT2fnh8aS7A/h6TlNNTlXdj+qY6YrDmjAjbR4IKghjVYin/D3BP70MirTsyt0db/eOw4lsICJhL/vKa7IzwD13ra6gXbbt6N1iIMhQRDGNNlIJEEvA5wMuSKU1Ttxs6Xj/fsP7D6xw6YBh18CAOYDYxfdfzGu+n0Di9e4P3+sgpEf86CqCtH+rLnbrjQwZJ8CewzRNgMQ1JQR27Egqzc8KBZ+siL1wwHzGAaUCB1ODvRt3NMiDeh1v15SAQYwSIZI36mekH1q+IeV6GQhSysl05p7RapC+RSvKZrzCHo9fMhomltHmUp2LMIT9d1MJ6mNp0/RfihvrSAH2NodTcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2wMvV3HPcosDhd5B6YwZGnm4cSe3rp6k6XWFdYnX1/k=; b=FI+UKEQmR2ccloUhu4U/WpTUjmB0xZAjuO4JdNNHxnTjX/vrySjwuqISEs+8dQUBoA4yWD+AMLNMnKsColrRePhtne9gTcBIz34l9tar+pqighJ3IVdxjbJclHZv2lzoCmaZg9kSAXk1NEqFidoxuhyA7JFo/LRHLNh3kIJYEtnF43wTJp8IKcfs8DNvbYiW5xZjiCU2DFf/zXs3W9/sI9usokJkRPHOnTtiCJUYqgMPIREHqP/Iu8mimNkfoj/PBsCEOpf3zqxMsJ1msT2/dTXIc3xjsa6wY/8Xtxz8+XUXnZsHpq5/CEPoihBdLn/dNtASoAKEthmjwSf7bsmZ3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from DM6PR02CA0090.namprd02.prod.outlook.com (2603:10b6:5:1f4::31) by SJ0PR12MB6830.namprd12.prod.outlook.com (2603:10b6:a03:47c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Thu, 1 Dec 2022 02:37:39 +0000 X-Received: from DS1PEPF0000B073.namprd05.prod.outlook.com (2603:10b6:5:1f4:cafe::f) by DM6PR02CA0090.outlook.office365.com (2603:10b6:5:1f4::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23 via Frontend Transport; Thu, 1 Dec 2022 02:37:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; 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+96811+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000B073.mail.protection.outlook.com (10.167.17.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5857.17 via Frontend Transport; Thu, 1 Dec 2022 02:37:39 +0000 X-Received: from aiemdeew.1.ozlabs.ru (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 30 Nov 2022 20:37:33 -0600 From: "Alexey Kardashevskiy via groups.io" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , "Gerd Hoffmann" , Brijesh Singh , "Erdem Aktas" , James Bottomley , Min Xu , Tom Lendacky , "Alexey Kardashevskiy" Subject: [edk2-devel] [PATCH ovmf 4/5] UefiCpuPkg: Add AMD SEV-ES features support Date: Thu, 1 Dec 2022 13:35:20 +1100 Message-ID: <20221201023521.10028-5-aik@amd.com> In-Reply-To: <20221201023521.10028-1-aik@amd.com> References: <20221201023521.10028-1-aik@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000B073:EE_|SJ0PR12MB6830:EE_ X-MS-Office365-Filtering-Correlation-Id: 31f95b83-df6c-4c69-aa2e-08dad3450387 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: hqg9C6P5I6eJ3yD0ecA0EjTo6gOuGn/CbbqFEbF2uhqaOKtAgh2FlPHApDeJLGmB9N+aqc9vamzMjopdWGCh2RNNZUFcicK5SEbQSMhsoYikZSC8qT48BPHt6FMHU+kroav9vfJ29CReDi+2GZM3lLFGdYgbQ+4S+vkL7zB8b+DrATPdbAbxZjVogWQ7KA/hAkgPrTDb3GnlzcqODV/mAkuPsj3s5AuMPomnjNzavSDmjVm9jLTK+RrAGWVoT89bm6e/K+eEYQ8KXDOypDzT8GoZ6M2geBZ5MUx2F9G1X04mKDThuDKsuriNmJMwnMnzWUITQ91JgZwtRxwNDsOJX6ns7jROxIb30DpDd7ClY0Ly8uu+HSsrB2fQhhHh0qhxnPZsLdD3xR+mKKswbsOUE2ngzb8Jnbw0LbQ1gG5/14d2BW9Dc4IM9oHmGqk4IhxUSRvSauNEv56ibY5EhLEHPKHHXwNygU4qUAuxGvRtLqPaj/uKq65/pIQGi1KItLXivjqA1SHvF8JTdJMEojadIV2JUdyqLMF9yhXGwNvx89uxHKmRjz142U76puhyfMDiUBEhSDrPgj/xvgpJJ6KUrKC3j8lL09yLUc110vb+lyNQ/z3u1UHuzjUsbz1VNf33uJ5IcCLLCfunYLoS6/oPd/amj23Vhdt/hln9cUNZD+snKb+DT00Cz2sAr7t/JOyVySKVcveGhdHxjygCQCwQDleoqGSPV9bjUWemwQ5OY68= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2022 02:37:39.0991 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 31f95b83-df6c-4c69-aa2e-08dad3450387 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000B073.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6830 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,aik@amd.com X-Gm-Message-State: NwFckfK0HIAHwRdxEwbdyK7mx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1669872366; bh=Xr04MuWeE4ChbBnWR45oIZufqgXsDTby9kGlQ7aoOK0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=uU7JLDbZj265EDg2P+QZwTk/bEZY7sYEQM5JdVzvGmPAuP3//DhwsuLb02QhPuQxstB X3abKnNkqP+h4amzakSDmnvSRuI3yBArlV5LsCADU7tcuzn/mZhQJj7gZL9WIsr40dPd8 ywyZjWIZs6tkTvRSjDcjsqaiwYwKbsg/MaY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1669872367749100002 Content-Type: text/plain; charset="utf-8" CONFIDENTIAL_COMPUTING_GUEST_ATTR is not a simple SEV level anymore and includes a feature mask since a previous commit. This fixes AmdMemEncryptionAttrCheck to check the level and feature correctly and adds DebugSwap support. Since the actual feature flag is not set yet, this should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index e5dc852ed95f..26e763295a7e 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -2849,19 +2849,23 @@ AmdMemEncryptionAttrCheck ( IN CONFIDENTIAL_COMPUTING_GUEST_ATTR Attr ) { + UINT64 CurrentLevel =3D CurrentAttr & ~CCAttrAmdSevFeatureMask; + switch (Attr) { case CCAttrAmdSev: // // SEV is automatically enabled if SEV-ES or SEV-SNP is active. // - return CurrentAttr >=3D CCAttrAmdSev; + return CurrentLevel >=3D CCAttrAmdSev; case CCAttrAmdSevEs: // // SEV-ES is automatically enabled if SEV-SNP is active. // - return CurrentAttr >=3D CCAttrAmdSevEs; + return CurrentLevel >=3D CCAttrAmdSevEs; case CCAttrAmdSevSnp: - return CurrentAttr =3D=3D CCAttrAmdSevSnp; + return CurrentLevel =3D=3D CCAttrAmdSevSnp; + case CCAttrAmdSevFeatureDebugSwap: + return !!(CurrentAttr & CCAttrAmdSevFeatureDebugSwap); default: return FALSE; } --=20 2.38.1 -=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 (#96811): https://edk2.groups.io/g/devel/message/96811 Mute This Topic: https://groups.io/mt/95376261/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 Mon May 6 16:09:31 2024 Delivered-To: importer@patchew.org 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+96812+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1669872366480252.97499059684606; Wed, 30 Nov 2022 21:26:06 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id EFXlYY1788612x46VXAstyaz; Wed, 30 Nov 2022 21:26:06 -0800 X-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.71]) by mx.groups.io with SMTP id smtpd.web11.32967.1669862282448307841 for ; Wed, 30 Nov 2022 18:38:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ait6VHfmLUAFXb9p+2H2RMyezw4rQfmtgZVxWaTZsmbG8layg9J1TF9fJBwib+DHHlTPsIX3ZuWRC/MNwpCde/wo5JSfqqiEQZBOXVoPIAhY/jc4PxmznqNeId7SFmZVFiLTdcbfPuOArf8P5jGsF6vGI5J1SbyTTkAXx11+7+sdU8MSWGNhpFCsesiwO1poC3rrAHb1+RpJ4D4HCt4gzy0Ttfid9tbOcIQtjdT+F9C+DpsFlHXbdOFU9/wznlHaZWH7WXsWsF0wwKGQycylmPomXf5UUe65xsaurHyRK/+TRur0O4W8BqNaa8QkmXDPpUNJTbNSp8FdPTOC2VwxFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bCfpE9Eg4or/QcjJlDfhC1C2IW2pJDrYZgTqNCPmoMM=; b=ivAqnj4Yrqq5DnaSH/CEKb6qsZT6gY2FXd/7gufjPggl6d46/iMzPCYAx/WTMQKQA5eQSwRLwpOE96Ht+BhQmqyMaJWKmThK9Opueh6mZiZTIiHDTs6oSiH7UUe7Rhl+5bwnQMZpXxCMOVtSqI8+wa8plUW4yKthglLlpWtI1cZJFAP84vN8AtrcpZ0f4Zwxn1vo5EZeHRfUz6J0NIjxDDSsPcLNiZi4ZhGmZUcG3uzs4IoowBYSQm+YxaR9DCYdp94Rng4yeKi+b4de0kNEb/0Myw61YtejW/2l7OoZzqMTGhPn5IhRMR09eyDAfBotLBNEBXrFuaz1YUULRLqZMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from DM6PR07CA0104.namprd07.prod.outlook.com (2603:10b6:5:330::30) by SJ0PR12MB6926.namprd12.prod.outlook.com (2603:10b6:a03:485::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Thu, 1 Dec 2022 02:37:59 +0000 X-Received: from DS1PEPF0000B075.namprd05.prod.outlook.com (2603:10b6:5:330:cafe::8b) by DM6PR07CA0104.outlook.office365.com (2603:10b6:5:330::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.8 via Frontend Transport; Thu, 1 Dec 2022 02:37:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; 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+96812+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000B075.mail.protection.outlook.com (10.167.17.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5857.17 via Frontend Transport; Thu, 1 Dec 2022 02:37:59 +0000 X-Received: from aiemdeew.1.ozlabs.ru (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 30 Nov 2022 20:37:53 -0600 From: "Alexey Kardashevskiy via groups.io" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , "Gerd Hoffmann" , Brijesh Singh , "Erdem Aktas" , James Bottomley , Min Xu , Tom Lendacky , "Alexey Kardashevskiy" Subject: [edk2-devel] [PATCH ovmf 5/5] OvmfPkf: Enable AMD SEV-ES DebugSwap for DXE Date: Thu, 1 Dec 2022 13:35:21 +1100 Message-ID: <20221201023521.10028-6-aik@amd.com> In-Reply-To: <20221201023521.10028-1-aik@amd.com> References: <20221201023521.10028-1-aik@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000B075:EE_|SJ0PR12MB6926:EE_ X-MS-Office365-Filtering-Correlation-Id: c358fdeb-a5ba-450f-220d-08dad3450f8c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: JaBxnEdZWS53VkPpVmoHCdce+e5VEXz92ec4SMcC4g2bWKO7nWpehbyimVSUNo40X5LFKGbgpzI3AthLG/dg8HgCPsuqO/yHVnP6Hepgo2b7u3X3J7AwQmYsQ8RIQ9jxnjrOFLoKlQL1aBQvC/UKTbZ1MH6DBfniSfqLDAtbdoVcPu3R/wz2Pn4eUvglQKLhi8KnxYZrJRhjda5j9rXP4C05iY2H2urls4X7AVMTaF2YBBi+AUHPobv45ScmdbvfzFH3FUAGa+Ry4Xt0BMFvmskeyzaPEHDBK8WARlC4DTTCSZst5a65g/r/Mpe9hQWTmev3auaM7eqdDAF7NM8FeEOvKZavR/Upd5EhXfN+4jIjTB+uJ6bjHUjQ8XiEhznUKqSi22HEwEJt1Y/SeltqzDn014+FwatB0f0r5tktu3dVLd7Q+zaUMsBQHR1xvrcsu0hwZ92F8UJRT7HKIUZYYngDZgMZ3g47TOV6/iE0bDRl6GzOlusvS1UzaDgHuKse1f0+ve9hxQAoXK++o7wDtU+6sLEO2N7T17GvlcCAXt5cEjV/lUHpk6b0D3/3s6PQaD+sAemIwniZc2kJZmrPXdwOZVJWJQqvn4D+GAXjhs+WjcIlkTXHfiXJrnGLwoi85sQrWV3jwsUBJLykvtniJFg1O3a3RwqK4y4UIuYtJMp2RSnSX+rDZFZROi4u8qnXIqkgktMe05DrMMBvZoUx0VVQ5TgdADkNaV5ynDiR3Pk= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2022 02:37:59.2611 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c358fdeb-a5ba-450f-220d-08dad3450f8c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000B075.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6926 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,aik@amd.com X-Gm-Message-State: TqyQqJjLoY61FDge54UBUydXx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1669872366; bh=arlOrnzdeXYtyqSBFjKyluTEWtWxsPsmRfsbPIw9aM4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=ShuOnpuybJmD5rTLxoBHJikpdM8JbAfHNbFjWxic70PZMHeTj/gIrogh3bACeek5y7q RwLm6Lr1d4xgTuJ2TaVImAqSLiL1Bh2W7z+WZXS5SVpdo201KhlnX1AVaY/4IvcXrBu7n 1Jjdr/bgOnao5SFpSLDkj6V+q1BVn1V06yg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1669872367757100005 Content-Type: text/plain; charset="utf-8" This writes the feature bit into PcdConfidentialComputingGuestAttr and enables DebugSwap for the DXE stage too. Signed-off-by: Alexey Kardashevskiy --- OvmfPkg/PlatformPei/AmdSev.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/OvmfPkg/PlatformPei/AmdSev.c b/OvmfPkg/PlatformPei/AmdSev.c index e1b9fd9b7f68..479f898adff4 100644 --- a/OvmfPkg/PlatformPei/AmdSev.c +++ b/OvmfPkg/PlatformPei/AmdSev.c @@ -324,6 +324,7 @@ AmdSevInitialize ( ) { UINT64 EncryptionMask; + UINT64 CCGuestAttr; RETURN_STATUS PcdStatus; =20 // @@ -407,13 +408,19 @@ AmdSevInitialize ( // technology is active. // if (MemEncryptSevSnpIsEnabled ()) { - PcdStatus =3D PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrAmdS= evSnp); + CCGuestAttr =3D CCAttrAmdSevSnp; } else if (MemEncryptSevEsIsEnabled ()) { - PcdStatus =3D PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrAmdS= evEs); + CCGuestAttr =3D CCAttrAmdSevEs; } else { - PcdStatus =3D PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrAmdS= ev); + CCGuestAttr =3D CCAttrAmdSev; } =20 + if (MemEncryptSevEsDebugSwapIsEnabled ()) { + CCGuestAttr |=3D CCAttrAmdSevFeatureDebugSwap; + } + + PcdStatus =3D PcdSet64S (PcdConfidentialComputingGuestAttr, CCGuestAttr); + ASSERT_RETURN_ERROR (PcdStatus); } =20 --=20 2.38.1 -=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 (#96812): https://edk2.groups.io/g/devel/message/96812 Mute This Topic: https://groups.io/mt/95376262/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-