From nobody Fri Dec 27 02:31:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1501529493259167.17144699488745; Mon, 31 Jul 2017 12:31:33 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AD6ED21D19958; Mon, 31 Jul 2017 12:29:21 -0700 (PDT) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0076.outbound.protection.outlook.com [104.47.42.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7C5562095D9CE for ; Mon, 31 Jul 2017 12:29:19 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Mon, 31 Jul 2017 19:31:25 +0000 X-Original-To: edk2-devel@lists.01.org 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=MSHlTG4dMj3xbSg123HLjKir+rdfdvCh5cZLGqTedW0=; b=anwuUL4htR0ReH1STk04l9sGosWmudeOFyxi6iLQm8kknhhaL6uNWS8DPsrYH/FE4dFCRJcaxhoE2xGS0zkQ73nAn8zMBvNwTXi2qlgsR2vjP+b1QGGe783InhrtcKSQdB4+zy2u43ECnKi1/haIqZCoBk1g5JebKtdluQMSvcc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Mon, 31 Jul 2017 15:31:11 -0400 Message-Id: <1501529474-20550-2-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501529474-20550-1-git-send-email-brijesh.singh@amd.com> References: <1501529474-20550-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR19CA0017.namprd19.prod.outlook.com (10.175.226.155) To SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) X-MS-Office365-Filtering-Correlation-Id: 5697f643-4f6b-4545-b91a-08d4d84abbb1 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 3:chF4t4UQOgtey+wAH5is3vaGyrxCapLzegm6h36qo3Met6idjGVXLJOX3gROmRDZ8Bk0IEVVniNGCSuHnN8HmORjmlEd7YQfn2rWKvxPsTovI/Nsx0lniWHsqwoRp+G1VXEyLRwE/XbyVbg/zxJawrtPnulL9qRaBjw4pyfimN3j+S88Dz1quqo+rsasW3quDu8RBA5scsW4AvfE1hQk18lcsBE+BNCOVSOkayiIOiHGXt7F5NL1fkBt7rnlpNZ9vjk/IMvSx2wkK3H8uxKG/Mtgl5X+Bu8XvWI3vo98PlJqxWRSD5oZ6htn0bBd8PTNx9As7zwWKreKcThFP2369eI6FYY4egGGzNMgzd2h+/mu5VN5R4arhq4pC4wAMRBxPSeK9olwtG70Rph8lih1QF/S7Tan2jTasiicAOC+LmnAr2N/lQaN0HRxz6rq8hv9Gi/oqJMXe2k6qK6I3SVl/A8/x3rpPN5Wbv91gRkK5tWD6Kz7BbSlvzK+5zGCDWJdoM4NWLJjHV7JJBbQ2fjXmgY29aTuREuKkXt5OK1nw+qbe9HK9tEihpxLBK0F+qbANVshbWeXwXVxDQ5tTi4zXg/9e/UldFgc3sFxU6UZ12WhTy1uYlzySx6d7ftt4a+EyZstko6kJUHyCCpJOrUbPNINxi/wKcZoqJt6sydjN6bmcs8nqklzncrf3sVRwI9EPsKAPBGOihGviQyUlEe08Rh3v4gP/rPHNULtXoNoherDyCrdxhhBQTlkWU9uh+O7GLxOj4vrB9hDNLPCq8phbVYWHr3IzurAwTeUBdQqSb2M5ZIiSzyRofYCXuUuiEaFAkh0R/I1KzCF7pPm4nkkKg== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PR12MB0158: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 25:w6ebuF7Lhua89pGn3iu45uCiKlHVfbY9UM189kdHva1strn/CJQXQxxgm2JYnqVt0A1eNi0GcH2wjt4ezWN7tg0W9RxRUAXvwutZw6hbkeOqVjXHoKjtYEAsJoXQgLu8i4NL0Y+a+P7sMwJZwezUdzBgW01CDr0HyCUjwn7B82xd1iaXnO37lVhiM8ajbdHQTV571rPmHOjIITcYES4Nssrkw0T0i35x+Tyi3//7Q5dj2N/FPOGgK3zGu8RbPdC+0ISe7PH53Cv4FaA2TOD7WBQJ/dOH3L7rdPE5AAvD8eUZj0iTQvkIgP7uP469VWw34HvRuP/LuESwE2MLDeHDoezN2sBDEIZP/SGc6xWHntOZfwfDU14nCV1aeibItbuwsAD20i+RanmbVDkxhLtemoywpd4uMjfzCRaLN8e4SRuiEerRinQY3b+pizsdpucF6d/ny56zoT8dSqTUENt9hzgYBmAG1wKF0ls67Owx8KnYpN2BrPY0od1xE4I1sfqB7RTvjznfvv/nkXzXTTS8EbQCnedCw8t4T4QdA+JcTLa+MxorIY1KAyra7IMX//WP9Ob7H6GHqiI/6zpygf/gDvQZG2vfEKEf/rz9Wk7oj10Yh4sCPVtEzjkpTZyiF4uEGRbTbnH+ISg1Hzg+0JylZ0z6ZNRffi7u5U1jECC72ATC16UFgV6fI43ENJS1e+90WFcb5G/eAFxqXcycgmBZpzNcMcb3m4W478tNNKpleT6g9rr8k4EgbKrrSUQfU8+mbW8t7DHKCsKwn7DSQSvJBCGdbz864GImFh+yg/ggtATTAevXt6RvXkzHrJt0mxnJok+NJtjiKeF2zvfuvvJhxI6v60p3/WxyHSLGaWv8Ym6iww9xId6C0kTT9UBavQOTD06bBNWpZL6LE/303SYq7hXgcCiVoNkXFgtYhi4kITY= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 31:6tNse/oCRUH0an53Be3RgnkJZjIDPDzOOgTRw05b6FuWa8scAwLzxAR+eVBGq2Rrvr40j3RLBOPJJWGoPLwcAaU4XXoiYAQcDMLzfR/OjWGlgOawt1dSagTTfixgPJy+sVul69pGSqnHDOy3KVWy31lOBq6HniYtzWSBdoTIWOriAtqkWIHTvBfruADPDswKNgjLXP2s338FVSGEj+povXvsCo5JNGKNKI4dEACNypW/gxyHtLWzJ8fRgJW40eT/vBomrLJ4CPW4+Z1vWWOCVrzMFKwa2EoggO7cDae7FXP6wmyMHHtpmhtV/XguOSptPxnoaGyPqpJY38kBzMWCTU4hzGBZT3AC6wCLHg6bJU3Da2jiwhAHulioanFxR0cRtgLtTCHejTNyU3Gbbl79eH9YNeuJYL7LViG9u7CjHVgHx8Em2MZjvi/FLbcyhS3oBV4XXGc5xt7FXb6vxsv8xSXVTw55WRUfXubA8GdvCGBLVYhS6mUd703IWSHB8+xIJKHgqfyeKDPLhYO4de9Mp1xoDboUzDxb8aNtQHsX7KTBOgsV/83Z1WLIXVne2sbRVQhYaIBZrQq1VNnNft8jVCSbEA1fRSvebgAbIYcsD9N5+RIr8ecXrPPWeniOWCi42OgRSPqjl8rHa7kjzrgI68059M+smKMnCixu6MXwSK0= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:o1bfwLg5ogyK83huMB85wBb7fLAPr+8c1jwdDiL/Zj3hDrQmTw+HP6OUAQoU8l+suUBfq/tHE3Tsjm/JXRL1v1biEcMgzO0htHta8IHeFMeRKvBru/hH5bXTEA1zCGgEAGI684LnF4Y8yuKKSQWGJvK8A3Tt5e30vyTM7NCo+VAt0q+yb5EhCBkj6GmdQ1h5rGSD9Dg8qwgHhtnwUiZkQFvACET/X36bQTfbiyipJYJ5U3Fid22Gk+FT/eaoaqHFArQxCw4Qwzt1rNdKNQaF4/6bR4vdHTxvBQRztnJB9LvCv9fjJRIS5/t53SGemQJqIkKEbiZYg4kPDmqyI+USQDIgXjU9qWX8UDESehaRxxbzQ16DboKybrImjmXlTAO9W5YNLtT5Go5Irce6mvY1j13dax/9+LuMTkC3/Q9CyQCLC6YhfupYVxloh5iXUbS1heUEGlNbf6cJfMu91+GqQGh74/yoAp4XkWlMt7KEo9+RBx4z1dZLlbJTxQyMQ4kJ X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(162533806227266)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123558100)(20161123560025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR12MB0158; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 4:BWA+2BCegvXOz9l08dwmOSZXYlpaWaS+wGuOmQiS5Z?= =?us-ascii?Q?nI50sLpm5PbGUiv9gE6D0FvsI9fkpH57hQ4HBElxuKwSCnSXP6zHt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uErFnZqoc93XsYuGM/f9vUkhWIYuFN0K1lMWobK8DoUmM7/?= =?us-ascii?Q?Ds7fYmTO6ksXTO8li2UOgs1P1J2wKoeRIv7HZ9HhqvFKl95sOgG9UJwTwIQI?= =?us-ascii?Q?EkCHOldrMzpLzE43DLsCbIiC+o/czTiK1zP2rancD1vBB0SSPREdSDvTCske?= =?us-ascii?Q?Gpm0VXi165QJLpcS0Fe3KeblP3nhjWjicqHreSc3hg2hYYtQAVEqJZP/BVm1?= =?us-ascii?Q?MenD49H7wZ8XTRfIXx091a0mD6Z0TTMIzX77AjrQE9CCquW7J0uOT9b3PWOw?= =?us-ascii?Q?7+yKgWar8xhLqvupii8ZQOq+UQuD9XQxtUlaJ1?= X-Forefront-PRVS: 03853D523D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39840400002)(39860400002)(39450400003)(39850400002)(39410400002)(39400400002)(189002)(199003)(47776003)(4326008)(7350300001)(101416001)(50986999)(33646002)(478600001)(66066001)(2361001)(25786009)(76176999)(6306002)(189998001)(54906002)(6116002)(3846002)(5003940100001)(86362001)(38730400002)(110136004)(53936002)(2351001)(97736004)(6486002)(106356001)(48376002)(7736002)(50466002)(36756003)(50226002)(42186005)(81156014)(305945005)(68736007)(81166006)(6916009)(2906002)(2950100002)(53416004)(6666003)(8676002)(105586002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0158; H:brijesh-build-machine.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 23:FH4ZEVoYocxmm9hfXbTo9lpBJe2wcIV1IDp6pYWa5?= =?us-ascii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8MFzbgfzuD2alVOfva2mdPHZ4g4BH2wLEw2T/W0P3PkBvOk4LKqPEM3?= =?us-ascii?Q?AB7fozOT3I/Ldme4ZpFY7w/RKVLwlMTpw+guIUqype6GqHJ7gF12Y5JlE4dq?= =?us-ascii?Q?iEKLwK2P96A26oDh/JMZCPi0rCpYEu3o8/3jOF1w+raHPfRgiOfcI/WwssbU?= =?us-ascii?Q?icBdHhHOdLDocegUHrcNFmHj/3/1vylc+QG2C2R94zsHQJR3bQeJrD7eQsoM?= =?us-ascii?Q?XI/LT6ScgEu4OGwdUJjxXtXtZLl+391y92xnCA24Gj9uGBahfUCCAwOkZCZe?= =?us-ascii?Q?e47uNRmTb5F6wGq2+AX9xnJioW3e/6tiLZgucUvPydfz1msy+/Wfp7lcdUNy?= =?us-ascii?Q?G/17zHWluJlAICKtvEnah7jYzBiB/TmE4CjErYwCU70gIri3TG5H9VpCPhwG?= =?us-ascii?Q?tDUDib5iRa1kTiYyn/KuvwRVfSbBrGajZ1cMq823KBR2RChj0fe6AigT5JSY?= =?us-ascii?Q?uR7ieJXU2nmIqx0J1BV3DkD8Dak2kyDLeE3QsTrh5tg8TAY039CdTa6iMP8K?= =?us-ascii?Q?MhZdNGPI0lLYIBmArvUjfWxN+CTsrkHbk/NiFsMDDN0MCBFCKBLnYEyV43ff?= =?us-ascii?Q?MTs0VYdBftm8nv+8gzhOFX?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 5:wAKJcLV6EwGtnwDZ/YxPw4fEU1fKEalEKdBPRDzvVdCncsifrmNap3FzrzdPFv1egEbzJSS0OvYc6YTOmnfGfUFl5yj+yNqk+/ugD0dD0f+GFUEI79zAjh56UPlcylrduPDnx6CzGIR2VLFHWBBpmeQg12lzwYHhhMEzye/zrntLZhaG5NbjA9mysliCQ18Yv0IjE2jooyROqzf04wOw1kv9ND/gtigOQd7yY906pKt/0aaFAK2OQu1fxrr0hucxh4WE3XETHdH+DG/v/vT4kUYGCJLy3iRnyR197qsCr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zhStgjgtXAHkyeiw5sC5CuJyN1JOjmjY7b38jc2AVx5QG0Z3AmHBHyjnnlXgkj9BErEm8ypLZQ4Vy0NeVQ2rMqVwZAjE0F+z4FZ/kIr+Hrz9LK5DsL1X0A6EV5asprl0t4AkufV1f4= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:l7oFxP8mDpaC9QqXs2Sk2qGURk/Rc+SmcRY+J6CULBy9LalXYjNIx6a5ue21VbWPpAo5wRrsR/R/L1AUsn8a6N1+M3lGaaAfyLqT7l1jgM8KVHKg+0YacPh8FsGrX8U5svEWnxoW3mSaEe0eK1OQzqa0yuh+TqGOU6uaKGSWyYHpcK8RDeAs3jB7JcNnUizfFxePCbB0rp2gy9cCtUIikd903pYukZjcLzpAZ1ronkgczUT6wW3zO6PtwtG61pmK X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 19:31:25.0342 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0158 Subject: [edk2] [PATCH v1 1/4] OvmfPkg: IommuDxe: Do not clear C-bit in Allocate() and Free() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Lendacky , Laszlo Ersek , Jordan Justen , Ard Biesheuvel Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" As per the discussion [1], the buffer allocated using IOMMU->AllocateBuffer= () need not result in a buffer that is immediately usable for the DMA device operation. Client is required to call Map() unconditionally with BusMasterCommonBuffer before performing the desired DMA bus master operation. [1]https://lists.01.org/pipermail/edk2-devel/2017-July/012652.html Suggested-by: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Signed-off-by: Brijesh Singh Reviewed-by: Laszlo Ersek --- OvmfPkg/IoMmuDxe/AmdSevIoMmu.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c index 9e78058b7242..cc3c979d4484 100644 --- a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c +++ b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c @@ -333,12 +333,6 @@ IoMmuAllocateBuffer ( ); if (!EFI_ERROR (Status)) { *HostAddress =3D (VOID *) (UINTN) PhysicalAddress; - - // - // Clear memory encryption mask - // - Status =3D MemEncryptSevClearPageEncMask (0, PhysicalAddress, Pages, T= RUE); - ASSERT_EFI_ERROR(Status); } =20 DEBUG ((DEBUG_VERBOSE, "%a Address 0x%Lx Pages 0x%Lx\n", __FUNCTION__, P= hysicalAddress, Pages)); @@ -365,14 +359,6 @@ IoMmuFreeBuffer ( IN VOID *HostAddress ) { - EFI_STATUS Status; - - // - // Set memory encryption mask - // - Status =3D MemEncryptSevSetPageEncMask (0, (EFI_PHYSICAL_ADDRESS)(UINTN)= HostAddress, Pages, TRUE); - ASSERT_EFI_ERROR(Status); - DEBUG ((DEBUG_VERBOSE, "%a Address 0x%Lx Pages 0x%Lx\n", __FUNCTION__, (= UINTN)HostAddress, Pages)); return gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress, Pages= ); } --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Fri Dec 27 02:31:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1501529497627800.2872214563696; Mon, 31 Jul 2017 12:31:37 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3A24A21D1995F; Mon, 31 Jul 2017 12:29:22 -0700 (PDT) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0076.outbound.protection.outlook.com [104.47.42.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D847E2095D9CE for ; Mon, 31 Jul 2017 12:29:19 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Mon, 31 Jul 2017 19:31:25 +0000 X-Original-To: edk2-devel@lists.01.org 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=CRGxhUNtSgV+BG+DIdE8+1lGHgfRBV2QP69zGKHAf9Q=; b=daFkjcDI0WWhUba7I8/GxV3em+vRqlDMCH/Oy17Ok1xkCa3W5RL7yOY0kFoKSJRICvwFX3EjIgkAou78sihzHlnog4yptrulRCpaHIjQxx6IZbeye06aR+SqOqGN4mk3f6w7SIt2wRh2WE5kl7BbtIr16FRAHHZ9D+y2vxkaKfg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Mon, 31 Jul 2017 15:31:12 -0400 Message-Id: <1501529474-20550-3-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501529474-20550-1-git-send-email-brijesh.singh@amd.com> References: <1501529474-20550-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR19CA0017.namprd19.prod.outlook.com (10.175.226.155) To SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) X-MS-Office365-Filtering-Correlation-Id: 8557e372-454e-446b-0278-08d4d84abc1d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 3:EUQ+G+9gZ/naR5b5K2BVs5J7+tziI+DKr4f+AKeqwsgX1gouf8KPOS1aZK4FVki1RBXsNXv/rbUHtJqNWsZqRo1fyaJxArOjQTQoXE9eJK7NSsuON/eaZggKTJFQgflhtLeGkoL/DnkLHN9g5RRh+TVNBYk1sdTM/NwN6PzW3SCGsqb6VGK8nFnc8XKuLucNAqubMDy+mKr1GdoxoFz1dZN4G5rXOLXLQU67n1UnVJ007Je4QmjeZ7Ku94kMBhq27HDVzZSO9s19ZfwPekyMJVwDeKCu7RsIoe0evjzbuMta9EZX/WTmFe55LhpvTq5b86X7Qf0m4ZZvDPSQSdGMC8csgMgtreKB/LXu0W6QxRM6fp0aapQF+7rpoBRl7Ma/gip5B1qMMPHkENEI6E99aby4D/4MgxDJzq2n/tXAW1i8x17Nxsy7kDrNP+LqPGJhYbPD0mbCn7xSKvkKfkRJJS7GoVa/zTN4dsWd0YdUxpQY/cCY9eLBILB5XjAa+l+Xev53anHDI/LQEBjtoB+PT+JTdTHgUf3EVyAhW2Vba+LMWy1UPAXHnKN9jN4jtE9tRgJi1xkGPZU0aOtM8xs/A/XhsiLYlFgiwH0zryaS3cJwpE1uf9DASs1m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1DrQN4fNeWAhf2+zP73d0f1Yq0av5Mv/9jIaEfxHSetLs9NipmfZn2XvBue8tWexDZVZkizysecTdCwerYmFUIvwPaHp+jDVPleKpmhb+cfcGdIrTZjXsePWTSec0GnqHNM7TwHVImhToWKVMSojoc6Ten/ej07NN1GD9xin+tHCx3ZBVF7SEQ4PAXu8OvlK9Atj/f/79GBPo9HzMRHb7wG2X5Av/K3N+/Ug3wL6YRm3SEqQM36gtLRWYKqNAArD6q+hn2kCotV9gswLfYHwlEsC4840ApeBDh541ieTWQKfCYkiqJs2JNZ3FOrjoWVNh4W2GU34hYW3zjKzgHRzb+oy/Kdjc04+Rm/q1ZxI4KcdWW5L X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123558100)(20161123560025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR12MB0158; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 4:co8it7R8+9N6QF/cMpdPbyKRz+LuE7IC/LSWX4YIhY?= =?us-ascii?Q?PmEJ0HnXP10/2Gs2pT+GWsWO8lf6LCklV/wpi1ymyeCsjcPAfScou8nF00Zj?= =?us-ascii?Q?4mbbG1VBuSPXv83u5iILlHr4xwbZCbMNZ5IUMqGwS60ve0kYG+zfkStXMtix?= =?us-ascii?Q?ldbKkb7IoYV+QlZo3gIZOyRu6P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ilotpsWq?= =?us-ascii?Q?Bma4wTIMZmNmLnYM1KlLLO9NWl9GSxLwgt3kf8LRF3c7MpZ8Y2UuIrXUT1i2?= =?us-ascii?Q?VuVNmpEAAyGbo9FaRWp4QNFqkPvX9WkkoS3ZgeYeIJcNF6O9s+9NdVkCt+OU?= =?us-ascii?Q?g/RFXB4pLviTIeD0CnWNdOBZLtTkTfeZE92dSZ8+fP3S2fFxTBktf0n+nyPy?= =?us-ascii?Q?pVtsUtQdhetgHHM2U=3D?= X-Forefront-PRVS: 03853D523D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39840400002)(39860400002)(39450400003)(39850400002)(39410400002)(39400400002)(189002)(199003)(47776003)(4326008)(7350300001)(101416001)(50986999)(33646002)(478600001)(66066001)(2361001)(25786009)(76176999)(189998001)(54906002)(6116002)(3846002)(5003940100001)(86362001)(38730400002)(110136004)(53936002)(2351001)(97736004)(6486002)(106356001)(48376002)(7736002)(50466002)(36756003)(50226002)(42186005)(81156014)(305945005)(68736007)(81166006)(6916009)(2906002)(2950100002)(53416004)(6666003)(8676002)(105586002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0158; H:brijesh-build-machine.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 23:IS1ILW0TczWziFr4NOtLfEiqbImSXlhfD4gdgT09z?= =?us-ascii?Q?VqFUOSIhpRrejDT5kqLLbdGgmFzZARzLqkkGu7PpbCIP+BvEN7ze4nbpZGjp?= =?us-ascii?Q?rQoZP14KyeE2w4PgY4WqdAPrZa7PpHPYT+g72gUOFVqHsinpou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r+FlEMCcnQbv/ZmkSNHLRF4mYMGBEC2zbv?= =?us-ascii?Q?7N/UulBc2Osoa2Gbjk56tyLIICGG94NscAYFCOKfLMTbQrubV3zC0b3WOyx5?= =?us-ascii?Q?bjJgXvS1MBhJrATL2vunfoXxpx0wadlInoedr7RppZNomC9WS9Opoc3tM16r?= =?us-ascii?Q?O50Q0ZSJ5oeAh4IxxHc2o1zXy5QT1WrJESt2w7wqrWF+TG5H5A8cKhZBGw+4?= =?us-ascii?Q?rCyRKIBidBk0qZio25bWbEk+Iz0FOPG0RVmLBu2ebZZyJW0f2uxEFCIUnU3X?= =?us-ascii?Q?FTSU/griSigvJfc99vXq5k=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 6:Z2Dq79yDpxApusbAct2O5/YZylUrbmkoAwXnU8NunZ?= =?us-ascii?Q?dYP45EYLHuLiWFk0PQz3N4JJgZL7xtY6cJadMOl16M8radn2UjmWqyaBEEvk?= =?us-ascii?Q?cFvHPqe38SzS8E9YE6aw9UViyQ2yuTTxq6E5/ZmAaMolT3BH8GkgaXrvKkcp?= =?us-ascii?Q?yzFbMDYPgd88Erf5w4UfVDBcoEritO+3NLbey3d7dx0EMCZ4dX//Qnbcj5G+?= =?us-ascii?Q?6+CoLFrNiIsjGHlNtY8YiZx5phwl9scEqacZAonYgU69ix189ox0I4uRVd3U?= =?us-ascii?Q?KmWanjlLltnNLjJib67gLBDBScMguCkb7rsjo8ONXaj7nOl4D8CIeMQmd3j9?= =?us-ascii?Q?SbkFv+kSQFORPWFqfrBEEmvcPrP9+F2KGZxy24KlBTqv7k8rzA9vLRcwSdUw?= =?us-ascii?Q?BofCDRxafUfnbQGiLRoz0VV1Uuh86Of2rNyq7ArFAGr3pRCbTT/LmIsHBg9V?= =?us-ascii?Q?EH8YxIaoArCXubApEF3PYuqyCQkD1b4UbmsPXVVxHxOQ6zIX1jJJsK8mBFYK?= =?us-ascii?Q?/n3teNGRJlPRmrW9f2tchk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X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:0+0Infr6KpTwEK5zjltdSJMaRD69rxy6guwz/SNgkkMMdAVzhyBz8a/JnSVxAktp8jcz6XpJfAUpVfKmGTPV3iqqQGudVRCGP45BtwsrjR2pYzCYcGY/CDpF22LiGNstneT9v2GsBOzUX/opJaQ0cQ99Yy4l/VgizJj+I/NJSeVpUN5B5GayLoo9mJr9yuzRLSLoAWQRz8zDoZBIU8/RCDIYGcU4ja2krv7FZSn+bA8fH66yrL4LTNeGwKS667rc X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 19:31:25.7373 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0158 Subject: [edk2] [PATCH v1 2/4] OvmfPkg: IommuDxe: Provide support for mapping BusMasterCommonBuffer operation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Lendacky , Laszlo Ersek , Jordan Justen , Ard Biesheuvel Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The current implementation was making assumption that AllocateBuffer() returns a buffer with C-bit cleared. Hence when we were asked to Map() with BusMasterCommonBuffer, we do not change the C-bit on host buffer. In previous patch, we changed the AllocateBuffer() to not clear C-bit during allocation. The patch adds support for handling the BusMasterCommonBuffer operations when SEV is active. A typical DMA Bus master Common Operation follows the below step: 1. Client calls AllocateBuffer() to allocate a common buffer 2. Client fill some data in common buffer (optional) 3. Client calls Map() with BusMasterCommonBuffer 4. Programs the DMA bus master with the device address returned by Map() 5. The common buffer can now be accessed equally by the processor and the DMA bus master. 6. Client calls Unmap() 7. Client calls FreeBuffer() In order to handle steps #2 (in which common buffer may contain data), we perform in-place encryption to ensure that device address returned by the Map() contains the correct data after we clear the C-bit during Map(). In my measurement I do not see any noticable perform degradation when performing in-place encryption/decryption on common buffer. Suggested-by: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Laszlo Ersek Cc: Jordan Justen Signed-off-by: Brijesh Singh --- OvmfPkg/IoMmuDxe/AmdSevIoMmu.c | 190 +++++++++++++++++--- 1 file changed, 164 insertions(+), 26 deletions(-) diff --git a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c index cc3c979d4484..5ae54482fffe 100644 --- a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c +++ b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c @@ -28,7 +28,127 @@ typedef struct { EFI_PHYSICAL_ADDRESS DeviceAddress; } MAP_INFO; =20 -#define NO_MAPPING (VOID *) (UINTN) -1 +/** + + The function is used for mapping and unmapping the Host buffer with + BusMasterCommonBuffer. Since the buffer can be accessed equally by the + processor and the DMA bus master hence we can not use the bounce buffer. + + The function changes the underlying encryption mask of the pages that ma= ps the + host buffer. It also ensures that buffer contents are updated with the d= esired + state. + +**/ +STATIC +EFI_STATUS +SetBufferAsEncDec ( + IN MAP_INFO *MapInfo, + IN BOOLEAN Enc + ) +{ + EFI_STATUS Status; + EFI_PHYSICAL_ADDRESS TempBuffer; + + // + // Allocate an intermediate buffer to hold the host buffer contents + // + Status =3D gBS->AllocatePages ( + AllocateAnyPages, + EfiBootServicesData, + MapInfo->NumberOfPages, + &TempBuffer + ); + if (EFI_ERROR (Status)) { + return Status; + } + + // + // If the host buffer has C-bit cleared, then make sure the intermediate + // buffer matches with same encryption mask. + // + if (!Enc) { + Status =3D MemEncryptSevClearPageEncMask (0, MapInfo->DeviceAddress, + MapInfo->NumberOfPages, TRUE); + ASSERT_EFI_ERROR (Status); + } + + // + // Copy the data from host buffer into a temporary buffer. At this + // time both host and intermediate buffer will have same encryption + // mask. + // + CopyMem ( + (VOID *) (UINTN) TempBuffer, + (VOID *) (UINTN)MapInfo->HostAddress, + MapInfo->NumberOfBytes); + + // + // Now change the encryption mask of the host buffer + // + if (Enc) { + Status =3D MemEncryptSevSetPageEncMask (0, MapInfo->HostAddress, + MapInfo->NumberOfPages, TRUE); + ASSERT_EFI_ERROR (Status); + } else { + Status =3D MemEncryptSevClearPageEncMask (0, MapInfo->HostAddress, + MapInfo->NumberOfPages, TRUE); + ASSERT_EFI_ERROR (Status); + } + + // + // Copy the data from intermediate buffer into host buffer. At this + // time encryption masks will be different on host and intermediate + // buffer and the hardware will perform encryption/decryption on + // accesses. + // + CopyMem ( + (VOID *) (UINTN)MapInfo->HostAddress, + (VOID *) (UINTN)TempBuffer, + MapInfo->NumberOfBytes); + + // + // Restore the encryption mask of the intermediate buffer + // + if (!Enc) { + Status =3D MemEncryptSevSetPageEncMask (0, MapInfo->DeviceAddress, + MapInfo->NumberOfPages, TRUE); + ASSERT_EFI_ERROR (Status); + } + + // + // Free the intermediate buffer + // + gBS->FreePages (TempBuffer, MapInfo->NumberOfPages); + return EFI_SUCCESS; +} + +/** + This function will be called by Map() when mapping the buffer buffer to + BusMasterCommonBuffer type. + +**/ +STATIC +EFI_STATUS +SetHostBufferAsEncrypted ( + IN MAP_INFO *MapInfo + ) +{ + return SetBufferAsEncDec (MapInfo, TRUE); +} + +/** + This function will be called by Unmap() when unmapping host buffer + from the BusMasterCommonBuffer type. + +**/ +STATIC +EFI_STATUS +SetHostBufferAsDecrypted ( + IN MAP_INFO *MapInfo + ) +{ + return SetBufferAsEncDec (MapInfo, FALSE); +} =20 /** Provides the controller-specific addresses required to access system mem= ory from a @@ -113,18 +233,6 @@ IoMmuMap ( } =20 // - // CommandBuffer was allocated by us (AllocateBuffer) and is already in - // unencryted buffer so no need to create bounce buffer - // - if (Operation =3D=3D EdkiiIoMmuOperationBusMasterCommonBuffer || - Operation =3D=3D EdkiiIoMmuOperationBusMasterCommonBuffer64) { - *Mapping =3D NO_MAPPING; - *DeviceAddress =3D PhysicalAddress; - - return EFI_SUCCESS; - } - - // // Allocate a MAP_INFO structure to remember the mapping when Unmap() is // called later. // @@ -144,6 +252,25 @@ IoMmuMap ( MapInfo->DeviceAddress =3D DmaMemoryTop; =20 // + // If the requested Map() operation is BusMasterCommandBuffer then map + // using internal function otherwise allocate a bounce buffer to map + // the host buffer to device buffer + // + if (Operation =3D=3D EdkiiIoMmuOperationBusMasterCommonBuffer || + Operation =3D=3D EdkiiIoMmuOperationBusMasterCommonBuffer64) { + + Status =3D SetHostBufferAsDecrypted (MapInfo); + if (EFI_ERROR (Status)) { + FreePool (MapInfo); + *NumberOfBytes =3D 0; + return Status; + } + + MapInfo->DeviceAddress =3D MapInfo->HostAddress; + goto Done; + } + + // // Allocate a buffer to map the transfer to. // Status =3D gBS->AllocatePages ( @@ -178,6 +305,7 @@ IoMmuMap ( ); } =20 +Done: // // The DeviceAddress is the address of the maped buffer below 4GB // @@ -219,18 +347,25 @@ IoMmuUnmap ( return EFI_INVALID_PARAMETER; } =20 - // - // See if the Map() operation associated with this Unmap() required a ma= pping - // buffer. If a mapping buffer was not required, then this function simp= ly - // buffer. If a mapping buffer was not required, then this function simp= ly - // - if (Mapping =3D=3D NO_MAPPING) { - return EFI_SUCCESS; - } - MapInfo =3D (MAP_INFO *)Mapping; =20 // + // If this is a CommonBuffer operation from the Bus Master's point of + // view then Map() have cleared the memory encryption mask from Host + // buffer. Lets restore the memory encryption mask before returning + // + if (MapInfo->Operation =3D=3D EdkiiIoMmuOperationBusMasterCommonBuffer || + MapInfo->Operation =3D=3D EdkiiIoMmuOperationBusMasterCommonBuffer64= ) { + + Status =3D SetHostBufferAsEncrypted (MapInfo); + if (EFI_ERROR (Status)) { + return Status; + } + + goto Done; + } + + // // If this is a write operation from the Bus Master's point of view, // then copy the contents of the mapped buffer into the real buffer // so the processor can read the contents of the real buffer. @@ -244,9 +379,6 @@ IoMmuUnmap ( ); } =20 - DEBUG ((DEBUG_VERBOSE, "%a Device 0x%Lx Host 0x%Lx Pages 0x%Lx Bytes 0x%= Lx\n", - __FUNCTION__, MapInfo->DeviceAddress, MapInfo->HostAddress, - MapInfo->NumberOfPages, MapInfo->NumberOfBytes)); // // Restore the memory encryption mask // @@ -254,9 +386,15 @@ IoMmuUnmap ( ASSERT_EFI_ERROR(Status); =20 // - // Free the mapped buffer and the MAP_INFO structure. + // Free the bounce buffer // gBS->FreePages (MapInfo->DeviceAddress, MapInfo->NumberOfPages); + +Done: + DEBUG ((DEBUG_VERBOSE, "%a Device 0x%Lx Host 0x%Lx Pages 0x%Lx Bytes 0x%= Lx\n", + __FUNCTION__, MapInfo->DeviceAddress, MapInfo->HostAddress, + MapInfo->NumberOfPages, MapInfo->NumberOfBytes)); + FreePool (Mapping); return EFI_SUCCESS; } --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Fri Dec 27 02:31:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1501529494809721.4173222304422; Mon, 31 Jul 2017 12:31:34 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EDBBE21D1995B; Mon, 31 Jul 2017 12:29:21 -0700 (PDT) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0076.outbound.protection.outlook.com [104.47.42.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AC6C721D19954 for ; Mon, 31 Jul 2017 12:29:19 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Mon, 31 Jul 2017 19:31:26 +0000 X-Original-To: edk2-devel@lists.01.org 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=oMDMoiN8aqG+4Q/9EfzMHCU6XodDxqTUUX65Ws6m5aQ=; b=CTaJIE0OscuXePyM8e5K2RuwOr1j7Err93+2MjmCelBxcNiPxpM7X1Opv1A+4eQeOY/PT4dgX6x9TPp7tOUyQEMeiED/n6yjVbb9gc160cWul/ur/cLQJCSkM/pZV6CSANoJxHBdLMHhbOKOFnXptbxTtEZ3+xvoaVzJ52Ad+6o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Mon, 31 Jul 2017 15:31:13 -0400 Message-Id: <1501529474-20550-4-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501529474-20550-1-git-send-email-brijesh.singh@amd.com> References: <1501529474-20550-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR19CA0017.namprd19.prod.outlook.com (10.175.226.155) To SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) X-MS-Office365-Filtering-Correlation-Id: 4a8a61f3-29f0-433f-4bcb-08d4d84abc88 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 3:H1pX5kADmwj8NVB/4e8IMzVVQwd1K52cOZGYRYg3Cpt8nXxcyfypnaLsBCZ9omxzethbiIQeF8ltuROWFZ69JFdqqtBjNrkc5ifCArBG8Esy8tRgs6Pd02UT7/ElYqurwj+V7d7M/8KgF3Ed2OgPRaGEWhkzp9zGDAbXKM/IGtRmuisDLsf9F7lCalRAqpPzFkl+V2p5vCkhckSSuzPUEQt9P4VTvvRi5vkY5ScBq7yDzFAY8zpMQzmS+UZGBEgIhAeyUSsHTeLq0zwPIAFjRQwGBaKqYhUJ7zt2j2IEvDhXBNYzW1F3yoSfbfcJIDmV0BLNscy/04AwOm/KxcB/MK0S0+4v2np2U0gaq79Ww3DoSbQK4B0LmchkGCUAxRfsaGF3D4QvDu5xwvPVmEJbWHHZIkFABlHWf5PgRsZg5vZ9x1y9yA/td0LUecu144AggTVVjAQJUiRn5txML5PfNfKuxx8iq+FW5tbRC8N856lbl2sqCj67wrxSSBEaEKS3Wg1xNxBX0HZICnxJ6GB+eZLDAn9fLmYTJ3UHfYjgsddmUWJalhhcrq3qFdSjNRvGBgBMFrLWzZyYJgRBpsXkuZNF/NZYMT5xAGete/8A9pGbPla3vu4cPx3a+M/LZIGBGHD3rvn+pCip3EEbGY72bPbANQzrNwROEK3RcpepEyeRzDsb3XpC6JXGx3whfYMtWtjzOKR9il1ayHHLWgyEozLmCX/hx5ycnswEH3KyTOtneaU9s2mW4JcPvGnYUaTCMy+cSy+Jcez1KSVK9WxBY2HUEqoP2BnvYsjottgZhvvE+/yDQVuBHipAWtFylJZXA2WxNT9ZMSbPTqrTNgjcsw== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PR12MB0158: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 25:ErunrjXHFMWpmFusTgQR76RXhtA+Ur33cthN8t9E1A4wU+MJpPDjbB+pRpjUzcVs7SVcz0nx1H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Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123558100)(20161123560025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR12MB0158; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 4:T6IdbO+cskthfuihVgVprl/ocKhHxOhEs21Ma7pamn?= =?us-ascii?Q?uRXX2tjzILLzHcZubqCcqkH3D7JLjV7OMXVMxYkCYo0C9UodruZXUb+rNhMo?= =?us-ascii?Q?WaegIdanaMx2h521IzO0GxfU5o/ZtAlME3raemc76YgZy7+uOPfpZTLRYG+Q?= =?us-ascii?Q?Da+oEihAHXEBcgdi/6Q0MW8eyPvfa7JJVT6JrUZkGPXPbxNC9U3rKWUEU8zp?= =?us-ascii?Q?MhTccdjW3jpKGaaSsXwAwB5fIgeOzHIUDyVaWZYUXFCg2niDa37XrevteLMM?= =?us-ascii?Q?o0LPNC8AGMFK2vGs8v+se6VRc+HR1Hu0Kww0H/so4opzeMqm0Wam7UdkeIZw?= =?us-ascii?Q?+UpWXkBI403+hpwmjDTm8EG/T672vtxyHRILj14OiSykExm+DX8MjuZprPTC?= =?us-ascii?Q?dtXKhAUsZroKujbUdpUimeMah+JxQVX/VzxIn2n7VpOClAt0VZ+xxSlGRx5Y?= =?us-ascii?Q?kBxbb6hSsvhFj16RedBnlr5TqyEb8/tFNlOM3b0sznauWWezWTKSapBwUG/8?= =?us-ascii?Q?0I1a9d0ATdGjoL4kOeKxsp4KBdbz+7b/bv5eoT0EQecWNyTOVOtBdR7gOFTF?= =?us-ascii?Q?dPHv5tzyNDlgeOLty3I0LCVLPyYpsQhIW/ynPtCiNAEa6ex89I7Et0FMPlNb?= =?us-ascii?Q?EpDatlb3bF3YNbhzQOTVtXMiyZImBfX8X6/BCXjXv2wBRnVrV9Q04sB7S2Hf?= =?us-ascii?Q?4cEJpqcFqShbKrTGsPjssWLuU1o/J1Pimq9GFtfkzKOVfQaFEIBe+0EDFv34?= =?us-ascii?Q?Z9dPW10f/J+HYUOdlgoFQaaHdYPEnK/9jM806fiCAX2TQiLubHDQ8ReTsOk2?= =?us-ascii?Q?dsixfBifoJzJx1zleLTB43+bWdxPD0JvKKyXzYPj+fSt/3R/tAgHuqZiXV7G?= =?us-ascii?Q?u4npNoFmfWBsGBxJY2vMBv3563tDfXZDHnSbBx97Z6iTnJo9rGh+1qK29NgT?= =?us-ascii?Q?IsB9ktZrW3NUiuQpJklA9Gwslo7FBzGSu6f7JO0s5eUVjrkscUBcgrsgEKj5?= =?us-ascii?Q?YDZBzIh1WuGP6ZD4mWjvBj8MulyByiy1kqs1tQxfG7exTVFdWEzYtUT10woQ?= =?us-ascii?Q?3/H5Q0lpPh72f7APvUnxNWh1MjkhxIzTN+sPsviUhfyG+k6uLkF2sIRqL+Pn?= =?us-ascii?Q?GHHxuzvPMJOLB3a++BhTQgC+bK3HjgC3jx4WTzwRo3izuT2XJQf0K34Vl5fQ?= =?us-ascii?Q?vNcl56fZ/iEXISTTpYgRiVu9180PunKUbxaVFjbTT/iOzr4Fgcu22cfSBAc2?= =?us-ascii?Q?kbyCkHwMOH3d3De8k=3D?= X-Forefront-PRVS: 03853D523D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39840400002)(39860400002)(39450400003)(39850400002)(39410400002)(39400400002)(189002)(199003)(47776003)(4326008)(7350300001)(101416001)(50986999)(33646002)(478600001)(66066001)(2361001)(25786009)(76176999)(189998001)(54906002)(6116002)(3846002)(5003940100001)(86362001)(38730400002)(110136004)(53936002)(2351001)(97736004)(6486002)(106356001)(48376002)(7736002)(50466002)(36756003)(50226002)(42186005)(81156014)(305945005)(68736007)(81166006)(6916009)(2906002)(2950100002)(53416004)(6666003)(8676002)(105586002)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0158; H:brijesh-build-machine.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 23:d/kV6GvqejnB9MhA9Mbp1G+rUA42WysDaLMWc+vu8?= =?us-ascii?Q?HQSTm43Fe6lb43Y48APg2IiZonXzVeLi72yeg1fB5uKUI3w1BS9dK2ovKkUF?= =?us-ascii?Q?97+IsEPU+NUkr5CEg6wVjuYOTIcmGEocrzKDAwp/1G/TPcmOFAce62qfcjnX?= =?us-ascii?Q?XHT/BWCo5xmCw73sUWEL1MCdbo1ZDGOKjGnBAFxrBIOJocA9GoQA8OTCyrNg?= =?us-ascii?Q?yU7EjZTrZF5LXu4PXl3cfqIPqoGCDfoA0Q8d8lSvzIFB8iVlDpKsGnjM4zpv?= =?us-ascii?Q?S5rT0fVlQhBd6mFmOZBfFV4wzvAIIslJtB9ap+yrnohXZgTNDnabGJl0iRCg?= =?us-ascii?Q?rQwz6BaAjwZFANVuvZzCR4vcJ7HgzcYnBX3wFdb33YREEHt+k5fln1RSbmSY?= =?us-ascii?Q?gLaCGVlLCOaJZ4He6aOln3GGvnaEXwTemdpOfzdnfm9cdRhSYHjbwlT3okRX?= =?us-ascii?Q?p85jkyxPWb2lE8GnUlnkoHcCU5RaUNnS04ei9mpDnf4666Re/sGNFoIPBPOt?= =?us-ascii?Q?ntl1ajo3p8g6p/CT0T3+hw5u2N2kIUMQL5swDVLlUAPA9TdWMUytZgb8kji5?= =?us-ascii?Q?KzW4mlSTYdActcFihGmQYqIRlLEHG26XQ4tRROpipzQmSUHI+2dkzMyoqf8r?= =?us-ascii?Q?/Lvk6lvP4tBdI/x0RMeZrDKcN24hVFHKzkwzs+2Jd/og93i7gXApvk0NgxJB?= =?us-ascii?Q?UATkPGoSTB3sLdIXmUtdGanew3RcVRZdfko9qNufkwtRxo7CRaELbCleMC5x?= =?us-ascii?Q?EdRgT27wJwWcvUhCSSmE5mYI8R62DKC1cbSuLcfcOOPuU1WsHeLrRtk/H65X?= =?us-ascii?Q?NTEtzNxrXd5djKC/n2xgl2b3K4/2igbIxWmZXQTay+leIP6zb+uwJbwphuvd?= =?us-ascii?Q?na2sxZ7BUen+Dq/cqTIxfuSZeBDUfFs/e207W2BN1eOQDCnZBbXOTjE+QtEf?= =?us-ascii?Q?dcadCHSiORGosN091dIbqcMBNg3dU8egAcaIarobSecEDMVOBM7Ls5Ru5Q0R?= =?us-ascii?Q?kK49l7v5T6BvrpPtrE/G51bwFYvcaz22+xkkpark0Hi40a66ZDNXEiic8gtL?= =?us-ascii?Q?AyfrI7vokEds/75J7bch8H1HZ9S40QrKVth8kOB0BD3OB+7QdZ2KtVajqYkm?= =?us-ascii?Q?UA0rW8sRLOKgUxbuBfSIuivGqHceDS7WRSeMBHaFHhXmeHKwbyHdLEbt1mdR?= =?us-ascii?Q?BkGclc+nb75tTKlsp9aNFNz7Onwj10hHYriq+3+HllmuSrD673xsCWsh6U4K?= =?us-ascii?Q?MiVT8Dy6GaI8px2hebRFStZ3I8O0jwUtfG7+KR22xOjFrmbEoNr9uWjt2Ovy?= =?us-ascii?Q?mGxQaSObl9AUFyUFbAikUI=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 6: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= =?us-ascii?Q?d55NSbYHOyfJFmYcpc9mfaPHv8CiIrrug1ayZYnDe85ccDbwn3ScOKOnLrms?= =?us-ascii?Q?HGD0XqJi6mQoU+GmbivVZrv0+d2iRG3YqD6Y+BJNVmjWBqmwMvhGj99iOcOI?= =?us-ascii?Q?a8u4CVUgPJrBSmHolrsqdu?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 5:auHjO6jTM4d4elqOstl46iP8M4COHaP5ygA18pYG7R7HEqQfSgeGtMFyLUftryny8FZC2GZVi2W5pGFH3N9UVgOgQyAdLk/1zNE2uIOy4nPOQyYaiQuiGFypwMwZiEioJ+HQCrGLvPgAM5uglAKDUxZRd4w0M+cgdZ7a/HdAQc4NusOUET3ONva7xEPJZmc9Fr4dQGLc2sd2pasjHFPnyKwiPgB1U5apgzZDKjLetyk4cGux8Iz7MiUpxy3mxeBjfBDXuROsJ4oR40jHt0ck4pOjf8CSZhf4PUUBuBlhXMP6b8ZktR29xLKHYn3sqrw06RCwQ/KZwgvqpj3AjVwHNgWQeRzUmGdPkb8lR7r0KkyNlS7h9Tr78DSnwtqm0tjl28V7tYJOS1mKlKsAqrgNkAJiWbIWmsI6S77R812wC3itGPhh4TUSPerJ2fO4DPGlQBLiRUkEFoOFlKDcnSXkgxo08iD7pE5ncmxa6MzDtgLz1bJE7RZWcFSJp4qLdOxv; 24:6YXAFNfY65YbvhrooRInCRkICYB4cN5cW7rb/3vtOUPMnGEzS6a0IuKele3ng7POYYQeST9MO1AsrnFls4k4h58gagCOmPyIPXQlwDAExd8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 7:S8g0znKwa+jK5pkqxfg5+DlJCPDw4zAwVbND7DdveZrkPaCf3WUvE6f6uuJPJAeMZUF6nnqTeEWGwF22Z6Ah0PMq9e2Om5Qc94DAdukAHLlNQWVHsFJFYtSRVrJoqA3R46KBF4REaX2Feq6a/loEsL6kh5IYXX3MEoTKG4HFZAtjFvWYc4hcsJJLUDxQbmOU79dh1XmdHc7hbqWORGgSPtYMiski6OR0OzKWflnYWYUJn+FIlok2cfx58k8d0NAXlJ2LdNyjS44uB2nFvFDF/cl2MwtCbGkfIrau3Gh8WD6mSckr9hAlCzk9lcQMTUDlsr/ytmpCmnYqsk3JIjBVvmjHni9xlWywUMhEyBcdVpzOfWMHAKq7MotIAfXNOFz9CAjWXr+emN8XISFe6yr9aOxelh/ofZjG9yziNmuaVVwbp57unfG6mPb6zaFq+HxgYG1ZX4y29K7SSY0ci/BztVT1Y4LaSWUwU09kz4KQHO7qvB6+xKwbUFI3qIiu18YE0Q2hzC99R9Ct1Dd/jQk9SGhYkzjjHGMsKZVb6BgjL37s6rCG4P8wLwCSZF3CG935tuGS/MpWLlZIfg/XtKg4weZN1wslDN/tffM8Hwd+VyhAfu7Avnb74jfv99ANP/xUMsGi4rXzpx6cknJsAIDVJmk43RuDMWEj+qagbeSfywkWWWdBY01pQlbJQIMf5VuFmtEm6XtxTervHRIjp6tudB+G9YzGnHZ1Gt1HP8SYqwivnqJ7fUbvsaLScwHiOrQr/d2k4t5lSaUrnOjaiCn/pmWpQlDxWYQdUYTshjIsK+4= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:pkGEjMarOsyVicgF5HbJuAx20pzuJN3L6fRdrwrXAo2EzV/YrAiJg4TxvA3C3ccqdSms24lCbB0VF58jeo4Zcz1ttnLYOP9wsTDFnSM+yDxOoWcDRyENDmZL5EnA3KiJyXjcFjw+2fCruiXxDptAnmr2SG3/kpr0W6j6x5KfLVDlLcTYm4DJmEDSbhmLffrEUNnFeDkRFuU+XNjg/ie9UruGKsO/5qccv44vRK7OpaYjJymFl+ElENOfND5W4GdR X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 19:31:26.4248 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0158 Subject: [edk2] [PATCH v1 3/4] OvmfPkg: IommuDxe: Zero the shared page(s) on Unmap() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Lendacky , Laszlo Ersek , Jordan Justen , Ard Biesheuvel Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" To support the Map(), we allocate bounce buffer with C-bit cleared, the buffer is referred as a DeviceAddress. Typically, DeviceAddress is used as communication block between guest and hypervisor. When guest is done with communication block, it calls Unmap().The Unmap() free's the DeviceAddress, if we do not clear the content of shared communication block during Unmap() then data remains readble to the hypervisor for an unpredicatable time. Let's zero the bounce buffer after we are done using it. I did some benchmark and did not see any measure perform impact of zeroing the page(s). Suggested-by: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Laszlo Ersek Cc: Jordan Justen Signed-off-by: Brijesh Singh --- OvmfPkg/IoMmuDxe/AmdSevIoMmu.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c index 5ae54482fffe..04e3725ff7e6 100644 --- a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c +++ b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c @@ -67,8 +67,7 @@ SetBufferAsEncDec ( // buffer matches with same encryption mask. // if (!Enc) { - Status =3D MemEncryptSevClearPageEncMask (0, MapInfo->DeviceAddress, - MapInfo->NumberOfPages, TRUE); + Status =3D MemEncryptSevClearPageEncMask (0, TempBuffer, MapInfo->Numb= erOfPages, TRUE); ASSERT_EFI_ERROR (Status); } =20 @@ -79,7 +78,7 @@ SetBufferAsEncDec ( // CopyMem ( (VOID *) (UINTN) TempBuffer, - (VOID *) (UINTN)MapInfo->HostAddress, + (VOID *) (UINTN) MapInfo->HostAddress, MapInfo->NumberOfBytes); =20 // @@ -109,11 +108,8 @@ SetBufferAsEncDec ( // // Restore the encryption mask of the intermediate buffer // - if (!Enc) { - Status =3D MemEncryptSevSetPageEncMask (0, MapInfo->DeviceAddress, - MapInfo->NumberOfPages, TRUE); - ASSERT_EFI_ERROR (Status); - } + Status =3D MemEncryptSevSetPageEncMask (0, TempBuffer, MapInfo->NumberOf= Pages, TRUE); + ASSERT_EFI_ERROR (Status); =20 // // Free the intermediate buffer @@ -386,6 +382,12 @@ IoMmuUnmap ( ASSERT_EFI_ERROR(Status); =20 // + // Zero the shared memory so that hypervisor no longer able to get intel= ligentable + // data. + // + SetMem ((VOID *) (UINTN)MapInfo->DeviceAddress, MapInfo->NumberOfBytes, = 0); + + // // Free the bounce buffer // gBS->FreePages (MapInfo->DeviceAddress, MapInfo->NumberOfPages); --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Fri Dec 27 02:31:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 150152950072626.57650659161186; Mon, 31 Jul 2017 12:31:40 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 79A2921D19956; Mon, 31 Jul 2017 12:29:24 -0700 (PDT) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0050.outbound.protection.outlook.com [104.47.42.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E54D521D19956 for ; Mon, 31 Jul 2017 12:29:20 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Mon, 31 Jul 2017 19:31:27 +0000 X-Original-To: edk2-devel@lists.01.org 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=FLI0F5GDYC6O/5se1Hnaw0/N4OK1IqUvyhJDAnutzI8=; b=ptv7MRr5wmTmYLdyFqcUcP2W9SlmxAkGnTxkZzLXALZRNH59U+z3rCdnLDRSB72mUuuUBPnstkQi+QjKS3tAL5SsREAvVHAFmHuO4xQ8r4CbkgfC+lsFA/1yfS1/7zXmOMqNxoCMnxIg/9rX4scLEuEjYtSTQfI00Uay2A7MA6U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Mon, 31 Jul 2017 15:31:14 -0400 Message-Id: <1501529474-20550-5-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501529474-20550-1-git-send-email-brijesh.singh@amd.com> References: <1501529474-20550-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR19CA0017.namprd19.prod.outlook.com (10.175.226.155) To SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a5eac12-5101-4363-32c4-08d4d84abcf1 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 3:AClGgccU3lTFVR/SiDp8hVJNN0sK3ajdVTkzq8LPG2bh40HMcWdkdPUCgRdrII07se85v5fBt+0w9F/lrn7N5GHC5++YfHJEq6OoTxeGldoaGO+d0wmMD/0UzycBUFRHyzp3ud74wDmJhmW9sv8f+8rJqLOm/H3P8U4WVqVQLAPNcz55j8TQDg+8fMHSxy3kIhoqZtSQpn01DkliV7ooTAIkiuJn7zPwT+8DI2feIU+QMi4VVzI8bwNZmHfhu5n1IAMY+88k3xY1Ha+u3qBc1gpDCjs03acTxQ2ShGqabs1LJ0oyiWoEAftxLsNNe37NT9FYPTl8gKuTCcX2VTWNS2PlsV8LZAU8pHB0ZVIwYFq3KclHlC0zdeMNwHN1EVMh+SqOnqcElWGMamn6mL1/CL4isLL5ESjmtUfBSIeIWzEvdEgYNdJ7JbycINPD9tJnaQgCN8PmryWHmINfP43NjGPVUGgTHyw1wOWo63ERo8wh4p9pt94AQXpDc36x3qMv+J1rZ3B2GwG+SdXS9rCnOWNrV7QVwxJLBTYkBSoFi+7yqy2btRg9blfi9rnTUdXkebxbFq+bc5T2pEJ0o86n8/AbSHOi9sOrX5M/WzdtKjNQpfCK8g43LeU3j2ZteSFP1JCiIqwpVY+FO1dprPO/qoi7bnG8klrLtoTdK+Wj0iy7j5QCLvuztdhIfp0Oo1nNduGiTYDsLvntYr1/oo1Tho9w8bBmi/SAJeGLnpLnYKZ5UnwZHD9v9sZhRmXCXgQS6ftSQsOYwfBXbjnfxl9NWlLuChsXls0bT+09mv5CR61OrwVsTLbCH+LI+25dYLBRibngcmxd/tOQ2Ha3fIXqjA== X-MS-TrafficTypeDiagnostic: SN1PR12MB0158: X-Microsoft-Exchange-Diagnostics: 1; SN1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Hu/pdOLTZbm3ixmz5YspZ/b6ZarWfTdqtDb6xpGC9OI5nDDPkh0 X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(162533806227266)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123558100)(20161123560025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR12MB0158; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 4:K2nWo6kkSCXAi7P6iS4ZxMYmPAvpSfh0BoNdahZlXk?= =?us-ascii?Q?lQ41uRLH5AG/oFwBMHhzmHb7d0hxfmCF+SCFfkBo3QgAIjAbP775Nmz7WXq6?= =?us-ascii?Q?oxjlhBGUgabJiqy9lLCxyDdK6BsciEpBEDALawH9JXbZmjCc5BGd8P1/djfZ?= =?us-ascii?Q?MizSOzT2BtR9HzAT4K8dom9QoMy9cwxQyMnGK0Pxl/JbMF7wqaP8G556z07m?= =?us-ascii?Q?7+EO1ECMMYawukFvQXljBogQo2nyWrVyQScEqckwEtccTgum9Ootn0NBjCvs?= =?us-ascii?Q?dw/GSi0XiEDONQzVJuw+zXI9DtuuM6DBb6mBMNNSwjOHwlw+9mPBXHocxVCb?= =?us-ascii?Q?aDMRBof6WXttk3XRkfufJBLANBYBOxPbXA41rTlb2NcUX5RVOiQupzC1A/ir?= =?us-ascii?Q?J+wbIx6XblhGFajixXhPZvkFH7EkU6U+Rlu71qxXGbOvLNptVRM9IIJA6rYR?= =?us-ascii?Q?EOgftUjult87J2GrH/gOzu9xNubOHEQA7+8goFeeiAcmm/dcuByltkYX9UjO?= =?us-ascii?Q?y/fdVc3Q58JjaRrUZG55DPonXBEWT3ojvCartYNZ/TcxRQ9XR079uRQWRXIk?= =?us-ascii?Q?pqtWhGx+11zvqu1HzzuaEA8pRX26CPYsRw5NmXsJSxlYhaYuuXBKwKTMh14q?= =?us-ascii?Q?js4F40jupo6XKA9T071j4BNh18olpA0dVKNyYs8N862DloA0nPqUVh+8ax/S?= =?us-ascii?Q?sgU2S4hhMM6Ut75yJHK8gLpzCXhzkNsBD8qfm3YBd8gcWwwBgA+5LkQn3qnp?= =?us-ascii?Q?TaS3KwkGKETsevyPFMCUEGdpOfekuJIRLvYb7hctnSs01PKnyGx7tQyMI+wE?= =?us-ascii?Q?2gwj/Ujl0cZIB8L5EPGOH0c3HXNWUuajK362GwKGOaCcIDSpwDJ4fP758VSY?= =?us-ascii?Q?TrgAeloYNNsLCcAGotFb9lCkHxRdm8XlTA49fldmfl9kPh+n5MaPlEK554RM?= =?us-ascii?Q?apYzpXrC3hLN+5p1TYl/jqBhWaOl1CTn0vmFsDi5i91gM+RFicnCFLIkpdOU?= =?us-ascii?Q?QdYWoubmE4v/qf3cMhgIJG5nh+0q3YTMrfn+Djrxu0N7N56bPm0HSKzHsk+h?= =?us-ascii?Q?Qgg/miGc0K3hq3IkikCZzTtF6TKK/yl+dzMyfJmaEg6UDuoablkKFrpVe10u?= =?us-ascii?Q?/I14Sav8hMr6mzgmD7DnVqF5fiBRHIDS1VzdfUVKy0VMcG3uM1WkJM5vsybg?= =?us-ascii?Q?OaW3zAdPR6YEAa4NntbD2earH5mbFguyWt2Anxoi/FU5kQU9x4wNUYs3z3P4?= =?us-ascii?Q?+BXkTsggn1gG3wt/tT5zY26RI7sw1cGkzRNkwv?= X-Forefront-PRVS: 03853D523D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6029001)(6009001)(39840400002)(39860400002)(39450400003)(39850400002)(39410400002)(39400400002)(189002)(199003)(47776003)(4326008)(7350300001)(101416001)(50986999)(33646002)(478600001)(966005)(66066001)(2361001)(25786009)(76176999)(6306002)(189998001)(54906002)(6116002)(3846002)(5003940100001)(86362001)(38730400002)(110136004)(53936002)(2351001)(97736004)(6486002)(106356001)(48376002)(7736002)(50466002)(36756003)(50226002)(42186005)(81156014)(305945005)(68736007)(81166006)(6916009)(2906002)(2950100002)(53416004)(6666003)(8676002)(105586002)(5660300001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0158; H:brijesh-build-machine.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 23:NBPuhLOyfT9PKSTkQlG9tE0CzP0w6BBF70GChsFMF?= =?us-ascii?Q?tGUQxkylaHkFDs7m6FuMaAXUi5zvy85n5Ba3c0+V1IgG3tLQ/oGcWwm34HVT?= =?us-ascii?Q?t6PJaJk4aZaMfN9JrRpMkIo5CKiGURRiajgsA0CqAMy5wqaeAuTuKZtRA3a1?= =?us-ascii?Q?Zy9LdJlSoUmuTQUiR4y/zya/APKgWxZKH78q8bIlN0m9Pp0qTVi0Y1Q0S2/V?= =?us-ascii?Q?m4bHESrDj2jG35IDnSrvw9puyrgC7GuO5eJJ1S0z7Ne1RjvDWP+SelwJTKiY?= =?us-ascii?Q?++x2y4Zfir33XwcK7nGuNeN5exaeffTEtw8CEjLDNYmiBFVJA0C7/kVhNePQ?= =?us-ascii?Q?JJU0am+D1qxea4PfKUchHWuwyKuvwhtNZGnoWx4my0o/N3W28LQITpO+DIXt?= =?us-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6zs1omGtp85ffs84IJrClsFua?= =?us-ascii?Q?RxXNPAEWEaegjjejh9kQF1jzaFxHeGQEwaOR4Ko02OldNjw/hXGlbq/1Fkxj?= =?us-ascii?Q?SnNXwgk8mkarRHhQ471/KUTwpA/nSzFZUdegGLyg26otEHE?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0158; 6:GkRBBxWRHM0lEOvN8zutigRDH3ds6IpSxRSX0u+XA7?= =?us-ascii?Q?AnZj9dy1gLyJdD6SM8ivrnjaz8QmhuCIPmtGzCweHJ+JiJtDtNc7TuxruF/H?= =?us-ascii?Q?CroMSVVtAQ6QTNzB/9fJQhh07OMzyTApaWzi2HLDVz3mwn49he2Q/WLRckzy?= =?us-ascii?Q?LWywVTogdZXb3hBdU13vZ/zMFFSg4DlhxX/RihdK2o5J6W+lBSBMgJz/Tjpv?= =?us-ascii?Q?N/9E6SvE9ArZTr6RhDRSVxUhRZ3Ljv2Tx8mLUgn0o3ps+M4RM1BoSsybKl5c?= =?us-ascii?Q?1ocle/kuf1JjC0Zrw9sz0MIKJ6JSTE+LC2pA2eA+HGBTV4JaHbQ399qQEaDT?= =?us-ascii?Q?VfhywdBZ08qV33zwCwImDI5eySiXKxtuNcXevxkDD0Iorj2wAWzK02vPJiUJ?= =?us-ascii?Q?K4XKSnuVfaYN2VRg4wgBhKciItbzyBGsbhVyjDHGBL9Nm9l7aijxGuKRa+dY?= =?us-ascii?Q?9W0EKKV62Zr6D+j3mqKIypsCjAtpg0p/2rVPGi2aehdRFzC1aRbarw7SFDlh?= =?us-ascii?Q?RvTiQLKsqCUCi3W55rLu/9VVeHFCqaSkfd5HnLNX6jM67zb/kB19YqKXlTqI?= =?us-ascii?Q?Gq0vuZ/g/UXccCzYr8HL644ywijji39dZY57ZlpIWT65L8xwG53SBfJ2fySn?= =?us-ascii?Q?MHDCSSKTFJ+/Ib7+YMdpePNtWAXguQyBYKe/2fRBPxrwswz4BVwalueJ8IWp?= =?us-ascii?Q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2YpGbO5EcvuSWEj9BcDcuNI6faKHBY1X7mL5A6eehuqADPvQ4R4ZpcXKbpI0ICHyjzhudXvAszp7EUxDixoAVRxYtesrKCU X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 19:31:27.1279 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0158 Subject: [edk2] [PATCH v1 4/4] OvmfPkg : QemuFwCfgLib: Map DMA buffer with CommonBuffer when SEV is enable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Lendacky , Laszlo Ersek , Jordan Justen , Ard Biesheuvel Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Commit 09719a01b11b (OvmfPkg/QemuFwCfgLib: Implement SEV internal function = for Dxe phase) uses IOMMU protocol to allocate and free DMA buffer used by QemuFwCfgDxe when SEV is enabled. During the initial commit we made assumption that IOMMU.AllocateBuffer() will provide a buffer with C-bit cleared. But inorder to comply with EFI PCI protocol, recent changes in IoMmuDxe driver does not provide a buffer with C-bit cleared. If the DMA buffer need to be bi-directional (i.e processor and the DMA bus master can access the buffer equally) then buffer must be Map() with BusMasterCommonBuffer operation. The patch refactors the code and add the support to Map() the FW_CFG_DMA_ACCESS buffer using BusMasterCommonBuffer operation. The complete discussion about this and recommendation from Laszlo can be found here [1] [1] https://lists.01.org/pipermail/edk2-devel/2017-July/012652.html Suggested-by: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Jordan Justen Cc: Laszlo Ersek Signed-off-by: Brijesh Singh --- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h | 42 ++-- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c | 247 ++++++++++++++++= ---- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c | 131 ----------- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c | 101 +++++--- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c | 56 ++--- 5 files changed, 292 insertions(+), 285 deletions(-) diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h b/OvmfPkg/= Library/QemuFwCfgLib/QemuFwCfgLibInternal.h index 8cfa7913ffae..327f1d37e17d 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibInternal.h @@ -45,39 +45,25 @@ InternalQemuFwCfgDmaIsAvailable ( ); =20 /** - Returns a boolean indicating whether SEV support is enabled + Transfer an array of bytes, or skip a number of bytes, using the DMA + interface. =20 - @retval TRUE SEV is enabled - @retval FALSE SEV is disabled -**/ -BOOLEAN -InternalQemuFwCfgSevIsEnabled ( - VOID - ); + @param[in] Size Size in bytes to transfer or skip. =20 -/** - Allocate a bounce buffer for SEV DMA. - - @param[out] Buffer Allocated DMA Buffer pointer - @param[in] NumPage Number of pages. + @param[in,out] Buffer Buffer to read data into or write data from. Ign= ored, + and may be NULL, if Size is zero, or Control is + FW_CFG_DMA_CTL_SKIP. =20 + @param[in] Control One of the following: + FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buff= er. + FW_CFG_DMA_CTL_READ - read from fw_cfg into Buf= fer. + FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg. **/ VOID -InternalQemuFwCfgSevDmaAllocateBuffer ( - OUT VOID **Buffer, - IN UINT32 NumPages +InternalQemuFwCfgDmaBytes ( + IN UINT32 Size, + IN OUT VOID *Buffer OPTIONAL, + IN UINT32 Control ); =20 -/** - Free the DMA buffer allocated using InternalQemuFwCfgSevDmaAllocateBuffer - - @param[in] NumPage Number of pages. - @param[in] Buffer DMA Buffer pointer - -**/ -VOID -InternalQemuFwCfgSevDmaFreeBuffer ( - IN VOID *Buffer, - IN UINT32 NumPages - ); #endif diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c b/OvmfPkg/Library/= QemuFwCfgLib/QemuFwCfgDxe.c index f8eb03bc3a9a..e03647bae3bd 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c @@ -20,6 +20,7 @@ #include =20 #include +#include #include #include #include @@ -157,74 +158,228 @@ InternalQemuFwCfgDmaIsAvailable ( } =20 /** - Allocate a bounce buffer for SEV DMA. - - @param[in] NumPage Number of pages. - @param[out] Buffer Allocated DMA Buffer pointer + Function is used for allocating a bi-directional FW_CFG_DMA_ACCESS used + between Host and device to exchange the information. The buffer must be = free'd + using FreeFwCfgDmaAccessBuffer (). =20 **/ -VOID -InternalQemuFwCfgSevDmaAllocateBuffer ( - OUT VOID **Buffer, - IN UINT32 NumPages +STATIC +EFI_STATUS +AllocFwCfgDmaAccessBuffer ( + OUT VOID **Access, + OUT VOID **Mapping ) { - EFI_STATUS Status; + UINTN Size; + UINTN NumPages; + EFI_STATUS Status; + VOID *HostAddress; + EFI_PHYSICAL_ADDRESS DmaAddress; =20 - ASSERT (mIoMmuProtocol !=3D NULL); + Size =3D sizeof (FW_CFG_DMA_ACCESS); + NumPages =3D EFI_SIZE_TO_PAGES (Size); =20 + // + // As per UEFI spec, in order to map a host address with BusMasterCommo= mBuffer64, + // the buffer must be allocated using the IOMMU AllocateBuffer() + // Status =3D mIoMmuProtocol->AllocateBuffer ( - mIoMmuProtocol, - 0, - EfiBootServicesData, - NumPages, - Buffer, - EDKII_IOMMU_ATTRIBUTE_MEMORY_CACHED + mIoMmuProtocol, + AllocateAnyPages, + EfiBootServicesData, + NumPages, + &HostAddress, + EDKII_IOMMU_ATTRIBUTE_MEMORY_CACHED ); + + // + // Map the host buffer with BusMasterCommonBuffer64 + // + Status =3D mIoMmuProtocol->Map ( + mIoMmuProtocol, + EdkiiIoMmuOperationBusMasterCommonBuffer64, + HostAddress, + &Size, + &DmaAddress, + Mapping + ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, - "%a:%a failed to allocate %u pages\n", gEfiCallerBaseName, __FUNCTIO= N__, - NumPages)); - ASSERT (FALSE); - CpuDeadLoop (); + mIoMmuProtocol->FreeBuffer (mIoMmuProtocol, NumPages, HostAddress); } =20 - DEBUG ((DEBUG_VERBOSE, - "%a:%a buffer 0x%Lx Pages %u\n", gEfiCallerBaseName, __FUNCTION__, - (UINT64)(UINTN)Buffer, NumPages)); + *Access =3D HostAddress; + return Status; +} + +/** + Function is to used for freeing the Access buffer allocated using + AllocFwCfgDmaAccessBuffer() + +**/ +STATIC +VOID +FreeFwCfgDmaAccessBuffer ( + IN VOID *Access, + IN VOID *Mapping + ) +{ + UINTN NumPages; + + NumPages =3D EFI_SIZE_TO_PAGES (sizeof (FW_CFG_DMA_ACCESS)); + + mIoMmuProtocol->Unmap (mIoMmuProtocol, Mapping); + + mIoMmuProtocol->FreeBuffer (mIoMmuProtocol, NumPages, Access); +} + +/** + Function is used for mapping host address to device address. The buffer = must + be unmapped with UnmapDmaDataBuffer (). + +**/ +STATIC +EFI_STATUS +MapFwCfgDmaDataBuffer ( + IN BOOLEAN IsWrite, + IN VOID *HostAddress, + IN UINT32 Size, + OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, + OUT VOID **Mapping + ) +{ + EFI_STATUS Status; + UINTN NumberOfBytes; + + NumberOfBytes =3D Size; + Status =3D mIoMmuProtocol->Map ( + mIoMmuProtocol, + IsWrite ? EdkiiIoMmuOperationBusMasterRead64 = : EdkiiIoMmuOperationBusMasterWrite64, + HostAddress, + &NumberOfBytes, + DeviceAddress, + Mapping + ); + return Status; +} + +EFI_STATUS +UnmapFwCfgDmaDataBuffer ( + IN VOID *Mapping + ) +{ + return mIoMmuProtocol->Unmap (mIoMmuProtocol, Mapping); } =20 /** - Free the DMA buffer allocated using InternalQemuFwCfgSevDmaAllocateBuffer + Transfer an array of bytes, or skip a number of bytes, using the DMA + interface. =20 - @param[in] NumPage Number of pages. - @param[in] Buffer DMA Buffer pointer + @param[in] Size Size in bytes to transfer or skip. =20 + @param[in,out] Buffer Buffer to read data into or write data from. Ign= ored, + and may be NULL, if Size is zero, or Control is + FW_CFG_DMA_CTL_SKIP. + + @param[in] Control One of the following: + FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buff= er. + FW_CFG_DMA_CTL_READ - read from fw_cfg into Buf= fer. + FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg. **/ VOID -InternalQemuFwCfgSevDmaFreeBuffer ( - IN VOID *Buffer, - IN UINT32 NumPages +InternalQemuFwCfgDmaBytes ( + IN UINT32 Size, + IN OUT VOID *Buffer OPTIONAL, + IN UINT32 Control ) { - EFI_STATUS Status; + volatile FW_CFG_DMA_ACCESS LocalAccess; + volatile FW_CFG_DMA_ACCESS *Access; + UINT32 AccessHigh, AccessLow; + UINT32 Status; + VOID *AccessMapping, *DataMapping; =20 - ASSERT (mIoMmuProtocol !=3D NULL); + ASSERT (Control =3D=3D FW_CFG_DMA_CTL_WRITE || Control =3D=3D FW_CFG_DMA= _CTL_READ || + Control =3D=3D FW_CFG_DMA_CTL_SKIP); =20 - Status =3D mIoMmuProtocol->FreeBuffer ( - mIoMmuProtocol, - NumPages, - Buffer - ); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, - "%a:%a failed to free buffer 0x%Lx pages %u\n", gEfiCallerBaseName, - __FUNCTION__, (UINT64)(UINTN)Buffer, NumPages)); - ASSERT (FALSE); - CpuDeadLoop (); + if (Size =3D=3D 0) { + return; } =20 - DEBUG ((DEBUG_VERBOSE, - "%a:%a buffer 0x%Lx Pages %u\n", gEfiCallerBaseName,__FUNCTION__, - (UINT64)(UINTN)Buffer, NumPages)); + // + // When SEV is enabled, map Buffer to DMA address before issuing the DMA= request + // + if (MemEncryptSevIsEnabled ()) { + VOID *AccessBuffer; + EFI_PHYSICAL_ADDRESS DataBuffer; + + // + // Allocate DMA Access buffer + // + Status =3D AllocFwCfgDmaAccessBuffer (&AccessBuffer, &AccessMapping); + ASSERT_EFI_ERROR (Status); + + Access =3D AccessBuffer; + + // + // Map actual data buffer + // + if (Buffer) { + Status =3D MapFwCfgDmaDataBuffer (Control =3D=3D FW_CFG_DMA_CTL_WRIT= E ? 1 : 0, + Buffer, Size, &DataBuffer, &DataMapping); + ASSERT_EFI_ERROR (Status); + + Buffer =3D (VOID *) (UINTN) DataBuffer; + } + } else { + Access =3D &LocalAccess; + AccessMapping =3D NULL; + DataMapping =3D NULL; + } + + Access->Control =3D SwapBytes32 (Control); + Access->Length =3D SwapBytes32 (Size); + Access->Address =3D SwapBytes64 ((UINTN)Buffer); + + // + // Delimit the transfer from (a) modifications to Access, (b) in case of= a + // write, from writes to Buffer by the caller. + // + MemoryFence (); + + // + // Start the transfer. + // + AccessHigh =3D (UINT32)RShiftU64 ((UINTN)Access, 32); + AccessLow =3D (UINT32)(UINTN)Access; + IoWrite32 (FW_CFG_IO_DMA_ADDRESS, SwapBytes32 (AccessHigh)); + IoWrite32 (FW_CFG_IO_DMA_ADDRESS + 4, SwapBytes32 (AccessLow)); + + // + // Don't look at Access.Control before starting the transfer. + // + MemoryFence (); + + // + // Wait for the transfer to complete. + // + do { + Status =3D SwapBytes32 (Access->Control); + ASSERT ((Status & FW_CFG_DMA_CTL_ERROR) =3D=3D 0); + } while (Status !=3D 0); + + // + // After a read, the caller will want to use Buffer. + // + MemoryFence (); + + // + // If Access buffer was dynamically allocated then free it. + // + if (AccessMapping) { + FreeFwCfgDmaAccessBuffer ((VOID *)Access, AccessMapping); + } + + if (DataMapping) { + UnmapFwCfgDmaDataBuffer (DataMapping); + } } diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c b/OvmfPkg/Library/= QemuFwCfgLib/QemuFwCfgLib.c index d4e09c434e6a..7f42f38d1c05 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c @@ -45,137 +45,6 @@ QemuFwCfgSelectItem ( IoWrite16 (FW_CFG_IO_SELECTOR, (UINT16)(UINTN) QemuFwCfgItem); } =20 - -/** - Transfer an array of bytes, or skip a number of bytes, using the DMA - interface. - - @param[in] Size Size in bytes to transfer or skip. - - @param[in,out] Buffer Buffer to read data into or write data from. Ign= ored, - and may be NULL, if Size is zero, or Control is - FW_CFG_DMA_CTL_SKIP. - - @param[in] Control One of the following: - FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buff= er. - FW_CFG_DMA_CTL_READ - read from fw_cfg into Buf= fer. - FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg. -**/ -VOID -InternalQemuFwCfgDmaBytes ( - IN UINT32 Size, - IN OUT VOID *Buffer OPTIONAL, - IN UINT32 Control - ) -{ - volatile FW_CFG_DMA_ACCESS LocalAccess; - volatile FW_CFG_DMA_ACCESS *Access; - UINT32 AccessHigh, AccessLow; - UINT32 Status; - UINT32 NumPages; - VOID *DmaBuffer, *BounceBuffer; - - ASSERT (Control =3D=3D FW_CFG_DMA_CTL_WRITE || Control =3D=3D FW_CFG_DMA= _CTL_READ || - Control =3D=3D FW_CFG_DMA_CTL_SKIP); - - if (Size =3D=3D 0) { - return; - } - - // - // set NumPages to suppress incorrect compiler/analyzer warnigns - // set NumPages to suppress incorrect compiler/analyzer warnings - // - NumPages =3D 0; - - // - // When SEV is enabled then allocate DMA bounce buffer - // - if (InternalQemuFwCfgSevIsEnabled ()) { - UINTN TotalSize; - - TotalSize =3D sizeof (*Access); - // - // Skip operation does not need buffer - // - if (Control !=3D FW_CFG_DMA_CTL_SKIP) { - TotalSize +=3D Size; - } - - // - // Allocate SEV DMA buffer - // - NumPages =3D (UINT32)EFI_SIZE_TO_PAGES (TotalSize); - InternalQemuFwCfgSevDmaAllocateBuffer (&BounceBuffer, NumPages); - - Access =3D BounceBuffer; - DmaBuffer =3D (UINT8*)BounceBuffer + sizeof (*Access); - - // - // Decrypt data from encrypted guest buffer into DMA buffer - // - if (Control =3D=3D FW_CFG_DMA_CTL_WRITE) { - CopyMem (DmaBuffer, Buffer, Size); - } - } else { - Access =3D &LocalAccess; - DmaBuffer =3D Buffer; - BounceBuffer =3D NULL; - } - - Access->Control =3D SwapBytes32 (Control); - Access->Length =3D SwapBytes32 (Size); - Access->Address =3D SwapBytes64 ((UINTN)DmaBuffer); - - // - // Delimit the transfer from (a) modifications to Access, (b) in case of= a - // write, from writes to Buffer by the caller. - // - MemoryFence (); - - // - // Start the transfer. - // - AccessHigh =3D (UINT32)RShiftU64 ((UINTN)Access, 32); - AccessLow =3D (UINT32)(UINTN)Access; - IoWrite32 (FW_CFG_IO_DMA_ADDRESS, SwapBytes32 (AccessHigh)); - IoWrite32 (FW_CFG_IO_DMA_ADDRESS + 4, SwapBytes32 (AccessLow)); - - // - // Don't look at Access.Control before starting the transfer. - // - MemoryFence (); - - // - // Wait for the transfer to complete. - // - do { - Status =3D SwapBytes32 (Access->Control); - ASSERT ((Status & FW_CFG_DMA_CTL_ERROR) =3D=3D 0); - } while (Status !=3D 0); - - // - // After a read, the caller will want to use Buffer. - // - MemoryFence (); - - // - // If Bounce buffer was allocated then copy the data into guest buffer a= nd - // free the bounce buffer - // - if (BounceBuffer !=3D NULL) { - // - // Encrypt the data from DMA buffer into guest buffer - // - if (Control =3D=3D FW_CFG_DMA_CTL_READ) { - CopyMem (Buffer, DmaBuffer, Size); - } - - InternalQemuFwCfgSevDmaFreeBuffer (BounceBuffer, NumPages); - } -} - - /** Reads firmware configuration bytes into a buffer =20 diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c b/OvmfPkg/Library/= QemuFwCfgLib/QemuFwCfgPei.c index 40f89c3b53e2..bc649b40aec3 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPei.c @@ -16,6 +16,7 @@ **/ =20 #include +#include #include #include #include @@ -85,7 +86,7 @@ QemuFwCfgInitialize ( // (which need to allocate dynamic memory and allocating a PAGE size'd // buffer can be challenge in PEI phase) // - if (InternalQemuFwCfgSevIsEnabled ()) { + if (MemEncryptSevIsEnabled ()) { DEBUG ((DEBUG_INFO, "SEV: QemuFwCfg fallback to IO Port interface.\n= ")); } else { mQemuFwCfgDmaSupported =3D TRUE; @@ -129,56 +130,80 @@ InternalQemuFwCfgDmaIsAvailable ( } =20 /** + Transfer an array of bytes, or skip a number of bytes, using the DMA + interface. =20 - Returns a boolean indicating whether SEV is enabled + @param[in] Size Size in bytes to transfer or skip. =20 - @retval TRUE SEV is enabled - @retval FALSE SEV is disabled + @param[in,out] Buffer Buffer to read data into or write data from. Ign= ored, + and may be NULL, if Size is zero, or Control is + FW_CFG_DMA_CTL_SKIP. + + @param[in] Control One of the following: + FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buff= er. + FW_CFG_DMA_CTL_READ - read from fw_cfg into Buf= fer. + FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg. **/ -BOOLEAN -InternalQemuFwCfgSevIsEnabled ( - VOID +VOID +InternalQemuFwCfgDmaBytes ( + IN UINT32 Size, + IN OUT VOID *Buffer OPTIONAL, + IN UINT32 Control ) { - return MemEncryptSevIsEnabled (); -} + volatile FW_CFG_DMA_ACCESS Access; + UINT32 AccessHigh, AccessLow; + UINT32 Status; =20 -/** - Allocate a bounce buffer for SEV DMA. + ASSERT (Control =3D=3D FW_CFG_DMA_CTL_WRITE || Control =3D=3D FW_CFG_DMA= _CTL_READ || + Control =3D=3D FW_CFG_DMA_CTL_SKIP); =20 - @param[in] NumPage Number of pages. - @param[out] Buffer Allocated DMA Buffer pointer + if (Size =3D=3D 0) { + return; + } + + if (MemEncryptSevIsEnabled ()) { + // + // SEV does not support DMA operations in PEI stage, we should + // not have reached here. + // + ASSERT (FALSE); + } + + Access.Control =3D SwapBytes32 (Control); + Access.Length =3D SwapBytes32 (Size); + Access.Address =3D SwapBytes64 ((UINTN)Buffer); =20 -**/ -VOID -InternalQemuFwCfgSevDmaAllocateBuffer ( - OUT VOID **Buffer, - IN UINT32 NumPages - ) -{ // - // We should never reach here + // Delimit the transfer from (a) modifications to Access, (b) in case of= a + // write, from writes to Buffer by the caller. // - ASSERT (FALSE); - CpuDeadLoop (); -} + MemoryFence (); + + // + // Start the transfer. + // + AccessHigh =3D (UINT32)RShiftU64 ((UINTN)&Access, 32); + AccessLow =3D (UINT32)(UINTN)&Access; + IoWrite32 (FW_CFG_IO_DMA_ADDRESS, SwapBytes32 (AccessHigh)); + IoWrite32 (FW_CFG_IO_DMA_ADDRESS + 4, SwapBytes32 (AccessLow)); =20 -/** - Free the DMA buffer allocated using InternalQemuFwCfgSevDmaAllocateBuffer + // + // Don't look at Access.Control before starting the transfer. + // + MemoryFence (); =20 - @param[in] NumPage Number of pages. - @param[in] Buffer DMA Buffer pointer + // + // Wait for the transfer to complete. + // + do { + Status =3D SwapBytes32 (Access.Control); + ASSERT ((Status & FW_CFG_DMA_CTL_ERROR) =3D=3D 0); + } while (Status !=3D 0); =20 -**/ -VOID -InternalQemuFwCfgSevDmaFreeBuffer ( - IN VOID *Buffer, - IN UINT32 NumPages - ) -{ // - // We should never reach here + // After a read, the caller will want to use Buffer. // - ASSERT (FALSE); - CpuDeadLoop (); + MemoryFence (); } + diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c b/OvmfPkg/Library/= QemuFwCfgLib/QemuFwCfgSec.c index 071b8d9b91d4..62ddb69d3b4d 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSec.c @@ -97,53 +97,25 @@ InternalQemuFwCfgDmaIsAvailable ( } =20 /** + Transfer an array of bytes, or skip a number of bytes, using the DMA + interface. =20 - Returns a boolean indicating whether SEV is enabled + @param[in] Size Size in bytes to transfer or skip. =20 - @retval TRUE SEV is enabled - @retval FALSE SEV is disabled -**/ -BOOLEAN -InternalQemuFwCfgSevIsEnabled ( - VOID - ) -{ - // - // DMA is not supported in SEC phase hence SEV support is irrelevant - // - return FALSE; -} - -/** - Allocate a bounce buffer for SEV DMA. - - @param[in] NumPage Number of pages. - @param[out] Buffer Allocated DMA Buffer pointer - -**/ -VOID -InternalQemuFwCfgSevDmaAllocateBuffer ( - OUT VOID **Buffer, - IN UINT32 NumPages - ) -{ - // - // We should never reach here - // - ASSERT (FALSE); -} - -/** - Free the DMA buffer allocated using InternalQemuFwCfgSevDmaAllocateBuffer - - @param[in] NumPage Number of pages. - @param[in] Buffer DMA Buffer pointer + @param[in,out] Buffer Buffer to read data into or write data from. Ign= ored, + and may be NULL, if Size is zero, or Control is + FW_CFG_DMA_CTL_SKIP. =20 + @param[in] Control One of the following: + FW_CFG_DMA_CTL_WRITE - write to fw_cfg from Buff= er. + FW_CFG_DMA_CTL_READ - read from fw_cfg into Buf= fer. + FW_CFG_DMA_CTL_SKIP - skip bytes in fw_cfg. **/ VOID -InternalQemuFwCfgSevDmaFreeBuffer ( - IN VOID *Buffer, - IN UINT32 NumPages +InternalQemuFwCfgDmaBytes ( + IN UINT32 Size, + IN OUT VOID *Buffer OPTIONAL, + IN UINT32 Control ) { // --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel