From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on060f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::60f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9354D82123 for ; Sun, 26 Feb 2017 09:43:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gBZTiJzuxRkBy0p8W38ebigRxf7V19ZWi5zhwUvA3+g=; b=hT89y3Gs7z+/8CiLH/UTa7wN8QMJ0pPAWQv77za3zJjrEWu7PeRR2ZQJI87IMhMzgbrFWoJUEKb7ark9xg19HAyrZBhQ3OkKYFi4PLbVRuDGNGZRpgYtsToUPPVw4TrM+RcwYAGI/sHvFaOx+2eH77BuCW+j4pIJeUUJmIapfhg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by CY4PR12MB1238.namprd12.prod.outlook.com (10.168.167.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Sun, 26 Feb 2017 17:43:17 +0000 From: Leo Duran To: CC: Leo Duran Date: Sun, 26 Feb 2017 11:43:01 -0600 Message-ID: <1488130987-2544-1-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR13CA0028.namprd13.prod.outlook.com (10.168.240.142) To CY4PR12MB1238.namprd12.prod.outlook.com (10.168.167.13) X-MS-Office365-Filtering-Correlation-Id: 427e2518-5e2d-47de-4690-08d45e6ef2e6 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:CY4PR12MB1238; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 3:dHiZ2nxQwrY7BqW63WKm5hTErEH1OVdohlLnYR75JryCyBV6XaoWEQdsb7WuMmGXrPK5VBj958mSfsfgg0AYXsQUlnMCblVReqsAjPshRY48DSTOacV232ht1i7We+blwhcZht0+Ju2I6fPH1fwyMtO+N76eGxtkPtwnw025/WMyoLWwRPfnVsOA8IfeQ355qe3NQTncLLod+EXy2m9MaFmGJRHf189jOlMUGJl7b0zSHlRgdnFaXsMpz6fnYJ3sYUrqiYgS7xTcQUjwYbLeM5/+AeS3sRw7eyAHV721Mv0=; 25:D/17Np83cNDa7il9eHmor2CGlVBkoVXFbk5HCYIoG7LN5ScX4O7348/5k7+y6NArSgL54leX3Whn/GgdiNQ1ZnmeuxyHvMIy/qktQI0oQYPs1z6yNsWCBapDSJ+93X+WYP7qJqU/xQL5G1pJyBP3lkmjaHScFehiSedejHwPHG54a6ivzK+c5QEOaiHiW+NBidsa0zzJpYug4o2bKd/JWhFLvl+evk4CgonBSleh82HOZVpKA8GyGR1EAquDtil4tufl6jM4EzMq0tkt1NgnQ7PrbQyT7e4uDrcNk56R6iUqx1cRLn2frrUyZ2lc9JdxuGb3DDHHUw++ARBY9M0yUTktt0nPzckNJ6WrgH9qE0J0+M5adymF2MPDxqQC6uGUjdMtE6jghvh5E69AP33BlDMwJs+5WFCSA8VrqeKQ7SkoqWBDbu/54zYVY8acI1D/WsRjaqS/wl7S4Iy6W5mxPQ== X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 31:uWcKuXIaND5B/WUVFYVb15qabWZlffU5Cp0wamRKt+f8IJGWE0IcRbTqP0phA+9MxoVLsW2nhuLYaNwJAybYoKSAjvMvzfoxmWDDtRtwMa2r5gXO4hDn6PGKNU9b8aMcw1ER9i9vudmwtCscoimEtHd2Xd8LErgXkbV5UR4Bkw/qCNArigbJ0YPajviSQjTyxZKHx5oCXi+IXqhtChbbgRKgPQMz7pHRJl2nvA7cjlM=; 20:Bhu0Eue/6gh+uuSNoWXuD/BsqowtO0frR+ekeMrN4CJL9gRZoIugsCaCyEyGy9j3tv+QfeuR6MGTcfSMoVxgeaf4BLEpp/0ZcfPCJKEQ4dW+PZ1RIJmApeanTIEydaWk7+VUeT9M0sC6VnGO2A0uG3dhKl72znbbMRqM3fbsjFcVTleEb3GDepZVYZHb2zNRI50mvqe7mc/IHeeN3SO2Yf5MK9k3Yto1NS+rit3DoGrbsAmg3YLvmYL61OYSqcQHzFeBQ7PU8MJ+Yd9Q8DS/ohaSqlijB1tXK6TroHKMxElvIhjPeYkoMCnlh7ZHc28wd2ajuIexDp8tXu3Z/EQ/V1iRz9ICFFfuEH0domPS/2S8i5wL/A9FgWbszkc61B7pB27w38dm6t/MccN/PtOmNDnO+XeG0zriLk1rT/Il1Y16l2r1k6qebhox66ZXPWCn2CY25Gwnq1hyx2PlWBO3/vNE694U/gX+pHUGKnNAwv2NsiqOojirveG/HqR43Oxe X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(20161123558025)(6072148); SRVR:CY4PR12MB1238; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1238; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 4:gEbZe7Cd8Pn8r66OTXI2kICEIiZL/vX6W6QeKqSKHMZYwKipY866mX/qfu+lQHE+6qJWZtWugtLVKm/vd7uu7/HX+/fN4Towrh6ye/RqcvoyY+ksNl6WyLoEOV2jfM2KxX0HBO959goqwXDaKlf8dOTBnfDqxS69dQs8euPmogQ2x9/WYeFAF0M0TgYnWjrs6u5oEUMT2ZivQXCMnIOlxvfKKU+iIU3vQUPIi9ul35T5YAVP1whN0b8jLbWbbFvrIdVW6ltLRGIYinwA7Ts+fwAcci1IcJKG0V2y+r7dj5sF67UTFgOofBLinQRo86Su/Hs+p03s3tB/eXCRxzPpaJYNg6nMe5Of4mLggLgh1Aok4oBYsX27r67S9raeExOU4omcZBVtrDNr7W2IFwyKhJjkC6c8Hp2dZ14n6BBKpFOOqbuMZrjm7nrlex1D0Ldpi1x2O1XjFRebEPiEeuJCnWlRPp9AfMIKhB10Vjg+qIAbDYz9bOP7/vEpjcIbSZVkJweA55RIbmlh4TLIlkkS22SfRHx6nqDX8FF5ZduoqmH1BzzcbJ6oVdk1+ro5YNifNV3hnwRj6rjF8UPbvPodecKj4Z8CQf4WWK64hzT1yr7FrxJKKnQUkoF52sRIBE8l X-Forefront-PRVS: 0230B09AC4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6029001)(6009001)(7916002)(39450400003)(39840400002)(39410400002)(39850400002)(189002)(199003)(305945005)(53416004)(105586002)(106356001)(68736007)(33646002)(5003940100001)(92566002)(2351001)(189998001)(42186005)(81156014)(86362001)(450100001)(97736004)(7736002)(6116002)(81166006)(36756003)(8676002)(3846002)(50226002)(110136004)(6486002)(47776003)(66066001)(101416001)(25786008)(53936002)(38730400002)(50986999)(48376002)(50466002)(6666003)(5660300001)(2906002)(6916009)(4326007)(213903007)(19627235001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1238; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1238; 23:s/OrH26YLNvi8phx02KaeBm3U/2jdm/pjHlei4iZw?= =?us-ascii?Q?UT35CAuVR104ZF5t/bjtcD4UcAZUOWYaDqkpVQDChOLxtdvxIu1d0/8eH3af?= =?us-ascii?Q?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HazkCnfLzjUs5ZN5FOXSf8pkH/9IbarCKC7PkN4aSyyNzZs/TDPIS4mj/HwLAw9rml8QrRiuwBjwoZ1VuLkG1Kz9xjG93FKRQaPw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1238; 7:FMuNpvRKZrMCSyfj04yeHutcO1MNVkk7bsogKoVwxkAoz1b7T3XhLWc1nHsn2rmQ1b9QvQdM2ZbY5kKr7HNqAE22zycbU4AwQFDpwJ7DZj1Nw3suIp9xSN8lf0vA1JLOlOYC1BYG8TIsJukpunc0pvaQwP+lS8pndQsuoZYe/V75yeAyq40XlIrjGScZUAKAsVYg8IHmtV6VqZc0wkKVmVS3jMZ/GEpMxxsd1sgYhEnk6L9IkYpQN6d86/wfMgRhps4AImMkmcMlX7gbpO8c2vE4oQf7isYt6cc7isw1BQtMj8gzMFrdS3rkp1hldCI8Y3UDI2rTw+EE2fpTUtubQQ==; 20:6SqNmPLRKM+yaD4N0m/p3Nz+hA+uv/Tz7N9kJTEcH+3uMzNEb1pEu3Dn7o65LzN9NrP8gdBU++KFgs1aS+0nCETmLgu+c7oOGpfQJdHLzT9al53oOCA8BMdxnTAWfd/t9tDYaA2iqTsCGTbiI/rHjvNplDi9p1PYn3NnxJOhUHDHuvrKIk7X04AEeBx52bXMbQOrnej/12mRJldK0LLUL96tsCCfNew14ZW8mr7g+Ada9XhLOhpWN1H5obBMVwO1 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2017 17:43:17.9232 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1238 Subject: [PATCH v4 0/6] Add PCD PcdPteMemoryEncryptionAddressOrMask X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2017 17:43:21 -0000 Content-Type: text/plain This new PCD holds the address mask for page table entries when memory encryption is enabled on AMD processors supporting the Secure Encrypted Virtualization (SEV) feature. This mask is be applied when creating or modifying page-table entries. For example, the OvmfPkg would set the PCD when launching SEV-enabled guests. Changes since v3: - Break out changes to MdeModulePkg/Core/DxeIplPeim to a separate patch - Add few cases of applying the mask that were previously missed - Add PCD support for UefiCpuPkg/PiSmmCpuDxeSmm Leo Duran (6): MdeModulePkg: Add PCD PcdPteMemoryEncryptionAddressOrMask MdeModulePkg/Core/DxeIplPeim: Add support for PCD PcdPteMemoryEncryptionAddressOrMask MdeModulePkg/Universal/CapsulePei: Add support for PCD PcdPteMemoryEncryptionAddressOrMask UefiCpuPkg/Universal/Acpi/S3Resume2Pei: Add support for PCD PcdPteMemoryEncryptionAddressOrMask MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe: Add support for PCD PcdPteMemoryEncryptionAddressOrMask UefiCpuPkg/PiSmmCpuDxeSmm: Add support for PCD PcdPteMemoryEncryptionAddressOrMask MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 5 +- MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 12 +++- MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 39 +++++++--- MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h | 5 ++ MdeModulePkg/MdeModulePkg.dec | 8 +++ .../BootScriptExecutorDxe.inf | 2 + .../Acpi/BootScriptExecutorDxe/ScriptExecute.c | 7 ++ .../Acpi/BootScriptExecutorDxe/ScriptExecute.h | 5 ++ .../Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c | 15 ++-- MdeModulePkg/Universal/CapsulePei/CapsulePei.inf | 2 + .../Universal/CapsulePei/Common/CommonHeader.h | 5 ++ MdeModulePkg/Universal/CapsulePei/UefiCapsule.c | 17 +++-- MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c | 24 +++++-- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c | 6 +- UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 83 +++------------------- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 14 ++++ UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 8 ++- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 2 + UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 14 ++-- UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 16 +++-- UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 41 ++++++----- UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c | 32 +++++---- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 17 +++-- .../Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf | 2 + 24 files changed, 224 insertions(+), 157 deletions(-) mode change 100644 => 100755 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c -- 2.7.4