From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id E9899AC1758 for ; Fri, 8 Mar 2024 15:30:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2q9grXcWUx/g4+0APTnqJCoiDNaJbLPWKyy7Zx+T4wk=; c=relaxed/simple; d=groups.io; h=Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20240206; t=1709911820; v=1; b=XDKcY5aKReMkRs5GEs1793glqBKc8JTjL7YAZDnQNEYlDUWJ6A+xEDbvrXhjNTDpV5nWBsO1 H3HBzQUfVlBtjt/uPUGR4rb2sGJnGe/J+rzfHGryI85xSFir+9ytMZ0NA/ay+Koc9KwrywA0YC1 c2vO70vbztHjvhVGm4nS31gQHc0EaSnUjJEPPvrrpDcmehzkCxuAUw0E0/4TIrcJ4EOQ1fPaUZp j9TNh4cNB5+pdDBKNiQxdhUCINUB4veJZWO576BJrqq2GzVmRT8wHSL2MX06LEFdaQFXQ+i4y7P 7Oi5T7W9tTZOhF6ePpvf+35hy+4ZSHGGot01bukWBaZTw== X-Received: by 127.0.0.2 with SMTP id bhKpYY7687511xxhpjOunN1L; Fri, 08 Mar 2024 07:30:20 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.74]) by mx.groups.io with SMTP id smtpd.web10.24755.1709911820051760833 for ; Fri, 08 Mar 2024 07:30:20 -0800 X-Received: from CY5PR16CA0018.namprd16.prod.outlook.com (2603:10b6:930:10::19) by DM4PR12MB6160.namprd12.prod.outlook.com (2603:10b6:8:a7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.29; Fri, 8 Mar 2024 15:30:18 +0000 X-Received: from CY4PEPF0000E9D9.namprd05.prod.outlook.com (2603:10b6:930:10:cafe::db) by CY5PR16CA0018.outlook.office365.com (2603:10b6:930:10::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.28 via Frontend Transport; Fri, 8 Mar 2024 15:30:17 +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 (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 CY4PEPF0000E9D9.mail.protection.outlook.com (10.167.241.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7362.11 via Frontend Transport; Fri, 8 Mar 2024 15:30:17 +0000 X-Received: from tlendack-t1.amdoffice.net (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.2507.35; Fri, 8 Mar 2024 09:30:16 -0600 From: "Lendacky, Thomas via groups.io" To: CC: Ard Biesheuvel , Erdem Aktas , Gerd Hoffmann , Jiewen Yao , Laszlo Ersek , Liming Gao , Michael D Kinney , Min Xu , Zhiguang Liu , "Rahul Kumar" , Ray Ni , Michael Roth Subject: [edk2-devel] [PATCH v3 02/24] MdePkg: GHCB APIC ID retrieval support definitions Date: Fri, 08 Mar 2024 07:30:20 -0800 Message-ID: In-Reply-To: References: 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: CY4PEPF0000E9D9:EE_|DM4PR12MB6160:EE_ X-MS-Office365-Filtering-Correlation-Id: 987b8923-a0f2-42d7-998c-08dc3f84a8c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: fcUZ7XwlbXxr3sT5ZpIAUB5KyPps1ui9LtYOvwkw2u9+TMY0jI4z2JzwIQlRyTi3yitMuVwVsga6eIh89kDZp5vvR62YwCDs3b+l5Gxm1iwiB2ogMpUsNALYLuhSOojjyun3XHi2/DylrSSO+G4E7mmTDNtBKtlvX+xxxsIYeuXwGcQGbhnkiCeclVO+Oy8Z0HSw/hpxU6ziRd3HNL4c1shSzJZPxTxIj7o8OWUBiTYGY1btDr9VWTBXjGjE/YhmTpsePi6s633hwuU+XPh0HL+KMIvpyEvOpxQXSjiONLecbJh5do2oR84Uv+10x4VPwbQ6Y58SsBdykaQ7m4+Yd7PMOlFHFs1as8nc84q/QqGEVekTJJ1unlEoBMEtYTcp9H6fMsL7yzzC1CFGZD4SZ5a8a6nqxr5qUe28UWjMJXytwSgCDnDB+4D3Vx65hUaUP/uoghP5YuISuE7DlPrbsPg1h2WowfV1GlMTGGJBjzuCkBtslN+ST/t5qzkrlLbQAHivVPAN1jusZLSXU+eA1+iI2ivmg992ncAqX7KW0x9HJwFDFsNNQrElK4beCjcTOzYjf73fLTKXcMWkmFEoc8l2nKzRh8wZxb4QD5NRSZT0XfJhfaM5esEDww/3sRaN5WZdI7R2RY0MztA1mxn9L5bdoLKceQl/TNO7yEP28SS1J/X1ZI+EScKyRnxKwLBjRiyJwtjepWW3WxPZJAq7eQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 15:30:17.8298 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 987b8923-a0f2-42d7-998c-08dc3f84a8c3 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: CY4PEPF0000E9D9.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6160 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 Reply-To: devel@edk2.groups.io,thomas.lendacky@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: QflvSSyDJv4AyBtEazMZhuj6x7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=XDKcY5aK; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4654 When an SVSM is present, starting the APs requires knowledge of the APIC IDs. Create the definitions required to retrieve and hold the APIC ID information of all the vCPUs present in the guest. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Acked-by: Gerd Hoffmann Signed-off-by: Tom Lendacky --- MdePkg/Include/Register/Amd/Ghcb.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Register/Amd/Ghcb.h b/MdePkg/Include/Register/A= md/Ghcb.h index dab396f3ede8..bd7bf986d03f 100644 --- a/MdePkg/Include/Register/Amd/Ghcb.h +++ b/MdePkg/Include/Register/Amd/Ghcb.h @@ -4,7 +4,7 @@ Provides data types allowing an SEV-ES guest to interact with the hyperv= isor using the GHCB protocol. =20 - Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved. + Copyright (C) 2020 - 2024, Advanced Micro Devices, Inc. All rights reser= ved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Specification Reference: @@ -56,6 +56,7 @@ #define SVM_EXIT_AP_JUMP_TABLE 0x80000005ULL #define SVM_EXIT_SNP_PAGE_STATE_CHANGE 0x80000010ULL #define SVM_EXIT_SNP_AP_CREATION 0x80000013ULL +#define SVM_EXIT_GET_APIC_IDS 0x80000017ULL #define SVM_EXIT_HYPERVISOR_FEATURES 0x8000FFFDULL #define SVM_EXIT_UNSUPPORTED 0x8000FFFFULL =20 @@ -170,6 +171,7 @@ typedef union { #define GHCB_HV_FEATURES_SNP_AP_CREATE (GHCB_HV_FEATURES= _SNP | BIT1) #define GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION (GHCB_HV_FEATURES= _SNP_AP_CREATE | BIT2) #define GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION_TIMER (GHCB_HV_FEATURES= _SNP_RESTRICTED_INJECTION | BIT3) +#define GHCB_HV_FEATURES_APIC_ID_LIST BIT4 =20 // // SNP Page State Change. @@ -202,6 +204,14 @@ typedef struct { SNP_PAGE_STATE_ENTRY Entry[SNP_PAGE_STATE_MAX_ENTRY]; } SNP_PAGE_STATE_CHANGE_INFO; =20 +// +// Get APIC IDs +// +typedef struct { + UINT32 NumEntries; + UINT32 ApicIds[]; +} GHCB_APIC_IDS; + // // SEV-ES save area mapping structures used for SEV-SNP AP Creation. // Only the fields required to be set to a non-zero value are defined. --=20 2.43.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 (#116527): https://edk2.groups.io/g/devel/message/116527 Mute This Topic: https://groups.io/mt/104810677/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-