From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.79]) by mx.groups.io with SMTP id smtpd.web10.1375.1585071733754485428 for ; Tue, 24 Mar 2020 10:42:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=2BMvu3PY; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.237.79, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CY4KvkUHnurbrEngW7qMkN0ZTVvNj2Dv229ohkRW9loxdMGJkFmi2U0/QHZMwNlP144JanSXG8UbCwLdWUtQp1cmKzXHxzHOuTdLi+Gq+Vj1R+DIBJR9FIalOKPloGO4LcD7zsk0TlHhjrqNSxgHla47N1ELkmPy3cCPqsrW4MvEsKKi9owUhf6vhXbbLAynETaUapjrs1shTyEg9gV6F5ABarvkhzc0fRCaDRqOH/X4drcmfORNeMxshTC3df2friaYcQEiUpVjjTnF8+Raj/YQTcljLD2bH0on75Foy8Cs2zgS+xqdAOCI2aiYTgthskPFfdlHOerE/xplU3oqyQ== 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-SenderADCheck; bh=cOXLE/xCwAZ1lHdn1AenuYCu6OZmBG6lVmIoJ62hWRs=; b=Kc8NxtsCdaJ8oXcGEJQ5xuDQ5oVZgN9yL7ujMq/WJD4JvE+mRj8nplJ8PiYlfB3tqH1Ii0meM16HvN/Xe0aN4jtju8kH4V4kFfWBdXLW6uUS9FmzDo3FFiteipJGqiIM+oUJ83BruMFqbpvYlW6tDqSqv6/QJMCNhVNwHExV+K9xbV1dsCtoEe/T+8zInTKJhLntD+vF6sP0TO994PgCTx+56Qf9gmvlQoyjjTse4V8EnoFY5q78lqJK3d4zy7OTIopNBjedVjQ7kmHhUEG78Kh1e4R7xCjrqFDXXn6A2/9enKQE88/5pOb6q0X4/6jk2CvO880aJi6fQyc0sv/VNg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cOXLE/xCwAZ1lHdn1AenuYCu6OZmBG6lVmIoJ62hWRs=; b=2BMvu3PYw1tA29QA/0Zlzwjsr71OrujpnTp/mxqE70dGxDses9oxlL3q8ufhzSznmd+bcRqIYV0APtVfNyJQ+lxrTUVMyAZ8nxo8ysKzpgsiIWtB+vuGI5kotMd4QkEyXcgY4NfGlAqT99Uwjz/qtdSYaH30EGv7lKYE8gEuRFA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Received: from DM6PR12MB3163.namprd12.prod.outlook.com (2603:10b6:5:15e::26) by DM6PR12MB4027.namprd12.prod.outlook.com (2603:10b6:5:148::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Tue, 24 Mar 2020 17:42:10 +0000 Received: from DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::f0f9:a88f:f840:2733]) by DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::f0f9:a88f:f840:2733%7]) with mapi id 15.20.2835.023; Tue, 24 Mar 2020 17:42:10 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io Cc: Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Michael D Kinney , Liming Gao , Eric Dong , Ray Ni , Brijesh Singh Subject: [PATCH v6 32/42] OvmfPkg: Reserve a page in memory for the SEV-ES usage Date: Tue, 24 Mar 2020 12:40:46 -0500 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: DM5PR06CA0025.namprd06.prod.outlook.com (2603:10b6:3:5d::11) To DM6PR12MB3163.namprd12.prod.outlook.com (2603:10b6:5:15e::26) Return-Path: thomas.lendacky@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from tlendack-t1.amd.com (165.204.77.1) by DM5PR06CA0025.namprd06.prod.outlook.com (2603:10b6:3:5d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19 via Frontend Transport; Tue, 24 Mar 2020 17:41:40 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [165.204.77.1] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0a4aed16-89d3-4a48-0916-08d7d01a9c3d X-MS-TrafficTypeDiagnostic: DM6PR12MB4027:|DM6PR12MB4027: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 03524FBD26 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(376002)(396003)(346002)(136003)(39860400002)(2906002)(956004)(2616005)(5660300002)(8676002)(19627235002)(6916009)(8936002)(966005)(81156014)(478600001)(81166006)(316002)(36756003)(86362001)(54906003)(52116002)(186003)(6486002)(16526019)(66556008)(66946007)(4326008)(26005)(66476007)(7696005)(136400200001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB4027;H:DM6PR12MB3163.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0oncz4FckQ2SgUHKFoV3wycIuHfs2zDRrI6nsGiHQ9sK25tbjLoyHAXa+lGjIpakCH7z7RdDOsQwfwnQxcURq+ygLUH+KbhGHlFKTGTM17qBN6V/6Y6J/pbEAYIlxNKasSXaSDjTW80CdOskQHU8AApBUqB6Zsv9h96NWRcHY1/+FfEO+C/fisxLnN2qUoLRa718U7gAXWp2Vmivm1fkEUhnlGtmHnaTR5ilWIK7IfsRUTv9nkzbb315SASaVxVaHC+Han1G9HAGYz8+bPDmacOR8yoZvVdMLkJaIMHwoq7LbxE70XzI/8oaZ+P2xOWX8Y+RFY6Cx4vVaC2mHm5bmTRGqoFzltA44NK7U4rfHSSKZNG1jMvboYVRMvbarqHUrQ+/5hdWefPQjMpPeum7dqvI8OgtsUjbxvRoecoetlATII783Qa3ziY4AUK/JJSOeZfDfPLQwq7RFweZ/SeGUXCW92DJozYDR8ScQqMWb7xF6tFIH7+c9yNp6HnpZYk8Oo7uj2KqtmrOccufFr0IKAiVVhy2+MtUHVCtQYrXBhV8MppBqWAvsYDMD701iBfGTpQ5RoPjRm/BO0mB+HerVA== X-MS-Exchange-AntiSpam-MessageData: qsXExR+X840/RT/Nq2Ua04Zdz3CsIBwLXX7sGV3NXO1cOV02dki1iOgun0f3XrdDZ1pMRVDYzyg5AtphhkB+23bbyC+2s8AX5T0F5/PQq8flOqyF/Trdf5o6hN8eNdI4T9x/IHf/+yDmC+FvMK5raw== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a4aed16-89d3-4a48-0916-08d7d01a9c3d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2020 17:41:40.7326 (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: NZmYOhrbdjETQIUTMsSFMFnDyT/pQilzzB7MCdk7c1XaVLtl18jxnvE+pkUl9N5GMC1pgMQZjjLp54xUV6FCUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4027 Content-Type: text/plain BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Reserve a fixed area of memory for SEV-ES use and set a fixed PCD, PcdSevEsWorkAreaBase, to this value. This area will be used by SEV-ES support for two purposes: 1. Communicating the SEV-ES status during BSP boot to SEC: Using a byte of memory from the page, the BSP reset vector code can communicate the SEV-ES status to SEC for use before exception handling can be enabled in SEC. After SEC, this field is no longer valid and the standard way of determine if SEV-ES is active should be used. 2. Establishing an area of memory for AP boot support: A hypervisor is not allowed to update an SEV-ES guest's register state, so when booting an SEV-ES guest AP, the hypervisor is not allowed to set the RIP to the guest requested value. Instead an SEV-ES AP must be re-directed from within the guest to the actual requested staring location as specified in the INIT-SIPI-SIPI sequence. Use this memory for reset vector code that can be programmed to have the AP jump to the desired RIP location after starting the AP. This is required for only the very first AP reset. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Reviewed-by: Laszlo Ersek Signed-off-by: Tom Lendacky --- OvmfPkg/OvmfPkgX64.fdf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index f218ae10a78d..c0889338803e 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -82,6 +82,9 @@ [FD.MEMFD] 0x009000|0x002000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecGhcbSize +0x00B000|0x001000 +gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaBase|gUefiCpuPkgTokenSpaceGuid.PcdSevEsWorkAreaSize + 0x010000|0x010000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize -- 2.17.1