From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0081.outbound.protection.outlook.com [104.47.40.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7978821D09197 for ; Thu, 27 Jul 2017 13:53:43 -0700 (PDT) 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=LJPmVutEMMOPLltqnm78Bp5DHEZ8+uH2c4orRAsikyM=; b=C/olM9XigyWxInz6eKMm+1KeyyliUr9QbAyoFq39ch2dyAJwdVmZLZ7bmdWiSwUqB4QvSpF23kIRtt6EAob8UHB6T2IwrSQ9ZYZANw5Mb5X5hDwnEwxuZ0b/CBG7Tbje/mqJxuuS8i6G6IZpub5+usroGoheGcCBpNZmfDiQAmM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [10.236.136.62] (165.204.77.1) by SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1304.14; Thu, 27 Jul 2017 20:55:44 +0000 Cc: brijesh.singh@amd.com, "edk2-devel@lists.01.org" , Tom Lendacky , Jordan Justen , Jason Wang , "Michael S . Tsirkin" , Gerd Hoffmann To: Ard Biesheuvel , Laszlo Ersek References: <1500502151-13508-1-git-send-email-brijesh.singh@amd.com> <841bec5f-6f6e-8b1f-25ba-0fd37a915b72@redhat.com> <4e2fc623-3656-eea7-09a8-b5c6d2f694e1@amd.com> <4071596d-32c9-e6d9-8c93-0d43d28e9b5a@redhat.com> From: Brijesh Singh Message-ID: <6517a7f8-5564-35e1-dc27-1b85a23c815e@amd.com> Date: Thu, 27 Jul 2017 15:55:41 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR16CA0044.namprd16.prod.outlook.com (10.172.42.158) To SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b7fabd16-78b0-45cb-38a5-08d4d531d9d7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254115)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR12MB0157; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 3:pNtd7R3xcDISYKrhnA5/9yf59Nfxk7ENMSzBHLbSs8DR5xcEFh5W4GRXbx8dTcB76BhCgFHqVps9zBhuauIZK/NScsZi7OKcJkibNOZ617Oip2QRid+OBPJGCIDSWxjOY1VNMWzI48Ot1EsRgZnkUoUThzAgSyKWdXotYd09x7q0lV/o4u7iBFOD5viwXUa8DrJyJtstg9DRiYMHsRE4YP9hDJmpZR+45xgRUjBbhdgUUeFrgx4JtoBjqMMcsDARskO3XSwxsKRx8t8IrHgX3rL7fclwwMKpkDnGH+wk2GJneJ061tdNlXJ4mLWni40cay2whyYixNT/WSGd40Gk8yfj7d+FF2vyQGO8HY0xpK9JfpRYeLLD5oQ0Faya0v2MGIX2FbEIHwSqo7r5+IZpfJtrzvQY6CyQ9QfRMNE7UOgm28QeEnFVgydGxloxmqWS8ahnjMZo2eeejJGp09rocfSNtl77NfSvdRKkI9R3RV+9BeArxqlwj7+gC7kQq55NGN/tT/iaAiXds7/IM7oVdJCuAU4C/kUoxp6pVh2nTJcvn0g9N5Axv9Ke2uWgvqbvD5i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EgvXXxIPSjNF6HTJ0393qc1v3qlvCYFVcztc0bXwmwu4qCEwDdlhbM6oOFN2x4Tw2RV7Vz//JmmKkdPKa/kL6aUiFx1aJGhP8C1nun4BiE/567nhZPtjr7As1JWLpLjEqwqbXCNrcSjEAppT/rVEkdoG3KZ+4iAF9rM+5XaV1W42VawhiwDLyzJM4jfY5PxnOC/YzRYffLWyzC3ZTtjrNpNxiD3FrPMMrwneVkkLNddDjTh3LlefUWTUgbIOPyarUL8f13pEHaDM6I7ukYxPHTh9BnY5FbCgDxYbv9uUa5gEBW7dX4qYJdKEZnXKGdX4ppFbXkh2MmJtnpS/07RwggwIn4lmaWuip925TZzIPiOm2P3793LbsUx5rclA7XMFQS2+RdlzWWhHO X-Exchange-Antispam-Report-Test: UriScan:(166708455590820); 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)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR12MB0157; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR12MB0157; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjEyTUIwMTU3OzQ6YXBtM1gxZEtMRjBQY0tDT2FZcU8zajUrbmx4?= =?utf-8?B?bFhpQTV6aHg3L2FYTnR3WDR3UlExaytNRVNqRmRwUHJIcU5oVWZuaW9oTnYr?= =?utf-8?B?L3dLYTdUM01sekRPNFdZVnROcUVTaTFDa3NPaUptSEJ1UFBrNFoxay9iM0E4?= =?utf-8?B?WTAyQmk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3pPUklveGlDYm1GNFlPVnJ6YTVUSVBDbVd6dGJjVW5IalhUcmZqcENkMFlE?= =?utf-8?B?TENPS2VJL2FBcHVicGxpNWhweDlubEEreVc2MCtoR0xkMFR4cU5wQTNXWk95?= =?utf-8?B?clQvVW5jYjZscTR1T2VEYkM4QTBFYk02R0s0aTBFM1phQmVkMnpLTGp2WVBv?= =?utf-8?B?ZW9Cb2dKZXlHWTh0WUdOUktwSVZNcU9lZGg2WHp6Zjc4YnpZQVM4d3YwR3ly?= =?utf-8?B?bytaMVd0SUJ0Q3RFdWlmSExqY2tLZnV4eHYyNlFBRVc0SnZFaCtYUmRrcVAy?= =?utf-8?B?ZjVZSXF3U2FuTHpuZnhWd3BBbStvYkZ5SUR4VVZJZTFnUWY1UmJNeTk1OE5G?= =?utf-8?B?SUFnMlBwVDUrK1NOUGp2cUpXcXdKUzM0YVhZMnN3dWQ1L0NNRXNZdC81cEV6?= =?utf-8?B?ZTYyN3JlUTgrc1VGWk42T0hiSG51WkdydklaUndtMlVianhtYk1LSWdCYnV4?= =?utf-8?B?ai94Q3YrVTBBWHNyRmZWUUpJYzJlbHI5Rm5UMWhRUGNHL3pPa0lKTUMyUVRy?= =?utf-8?Q?539bNiQCarX+UCruuGv?= X-Forefront-PRVS: 03818C953D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(6049001)(39400400002)(39410400002)(39850400002)(39840400002)(39860400002)(39450400003)(24454002)(199003)(377454003)(189002)(42186005)(54906002)(478600001)(83506001)(2950100002)(76176999)(4001350100001)(101416001)(3846002)(6116002)(4326008)(6306002)(6666003)(33646002)(50986999)(25786009)(53546010)(31696002)(77096006)(36756003)(7350300001)(54356999)(97736004)(93886004)(966005)(189998001)(23676002)(229853002)(64126003)(230700001)(6486002)(50466002)(106356001)(2906002)(90366009)(86362001)(8676002)(38730400002)(68736007)(6246003)(7736002)(53936002)(5660300001)(66066001)(305945005)(31686004)(81166006)(65826007)(65806001)(47776003)(81156014)(65956001)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0157; H:[10.236.136.62]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjEyTUIwMTU3OzIzOmNYbEJ5ZnlhNDkzSVI4NkZFSFEwNzMyc2FN?= =?utf-8?B?T2syYlVrSXZCMFpNNGdwZmp0ZEF0SzE5NzNObVVWZnB3RVlJczltRHo0cDZV?= =?utf-8?B?Q1ExNHFDUE9JL1I2TlJHUlYwTlVRMDBFQkxIeHNjYWpXNytEYzRvQlRYMExV?= =?utf-8?B?RDJOMXR2UStSaE9CdmZiUG5laSt3T2hYa094QXVwYWZqdE04RUs2WUw0Mm1v?= =?utf-8?B?aW8wMGFVT3NhZ1QxbmlvV3ZNSUxSNnhoaWRqYy9QTEZQNmtsSFRlYms3MHlB?= =?utf-8?B?eHppclNnYmg5WWFUUUJwZGp0YXY0cmcrNG50eHBBVHZKUkI3TTc0Y2c3RllG?= =?utf-8?B?TCttczl2SjBYU1RIVUpUYk1uMmE0Qjl5eDdWaW82UVZNQnBXNDk4Q25XV3dl?= =?utf-8?B?bjBuWHdFYjFIZ0Q3ZDNkTjg0bmpaRXhraGlCMWpIRlJKZndoUnBFOW9BTSt6?= =?utf-8?B?ZHYzVXhnYWtld2s5bFFseVg5WGdlL1BqV2ZqZENQL1NoTGV0VnlBRDlDWjBz?= =?utf-8?B?THBXaGI3aE1LMkVmeWlvOEQzcHdUSTRkNFNwaVIrcFYwMTd2R0FEK0pjZUY5?= =?utf-8?B?Q3ZpVUFQM0FVZ0J0MDBBUEN6SXFUcTVQVDNwVmZ6dzE3aDJaTms3QzZZY0Uz?= =?utf-8?B?ejF0Ynh3Yjhnbmp4ZzZXdlA3NWZZaTNvRjM1emlkczIzM0o0a054cG85dWpZ?= =?utf-8?B?TUVISkpnMkxLd2R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SWhodUlpM1ZQTHVSQzFVMGEx?= =?utf-8?B?eHJnWlc0cXFFTVRTaVVpRHEvbXVuVlFmK0hFSk1IakthbUpEUDRZejVweDhX?= =?utf-8?B?V1h4T2NTa05xQ2VKSkpTVHkrbE91NTRTSStEcE95TkhqL3g2Nmozb1o0YVBq?= =?utf-8?B?NVRZQjlVN29RWEhpWmhTNy9Uc2ZtSlowNGNMU05HeEt4OHlTV1BhNSs0ZGpX?= =?utf-8?Q?LbqE0y7?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 5:QYCR5BAQTPWbTke/D3qI5Iiw+0v5bYf7ALdGkTJlLsT9R7W9mX1wa4VDxoi1PvmKOzkNASmKg5crM1nrZu3TlEItdDlrCIqsAHRnzrqjm6N80JHXxSf8jVd3fGkdDnSp00ZA0X66CrpCKhQpR7pNKFy//WCMTW9cfd9lfqe3lmyQbpi3wPEwV+BCslXFt7mKRq0Q1p5hJpfsaiPz/GccIAQBtnShsqy4bSRQzjDBS76PGQZwrUI7QCYXY41di8f54bs8Ic02DpyGfeN2XHn739J9EX6eZYH04uD4j+PiQtlZmXsRUaWGOfxE1tbsmrXCItE2QGh41d3Yov5M9t7JCggHOnlBOilRss/D1Z9Z/Z1bxi0i4NtExvu7AgZ1xaJ+hJi05NKgTOdPGyqFU6coOtaaUbw2YfWmb3e2Eptm9GaPT2igtHuJYIkdYHbv2sCY2sNC7Mz9KKPpQDPP3IgyB+zdrvVYwj7aI9U5aApIT4uzNUoTKmpvCctx41z49MvO; 24:MX37SfJjaERuJz4eSXsvCm0rgxS0MzjhubYt+a61vmdvtWhZwob44B+wXMNJ1MDtiDBijQvnevMdDPUQXCaVV8lTwajtnqakPLM0pMH8PsI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 7:7Yo9TQUCHdo64vlRvsknLAXlRUDu7kGlJlT1akhI80RnBTBspMrSJ4FNk9aA301WobKsnb29NAfOc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riginalArrivalTime: 27 Jul 2017 20:55:44.6043 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0157 Subject: Re: [RFC v1 0/3] Add VIRTIO_F_IOMMU_PLATFORM support 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: , X-List-Received-Date: Thu, 27 Jul 2017 20:53:43 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 07/27/2017 02:00 PM, Brijesh Singh wrote: >>> This distribution of operations seems wrong. The key point is that >>> AllocateBuffer() *need not* result in a buffer that is immediately >>> usable, and that client code is required to call Map() >>> *unconditionally*, even if BusMasterCommonBuffer is the desired >>> operation. Therefore, the right distribution of operations is: >>> >>> - IoMmuAllocateBuffer() allocates pages and does not touch the >>> encryption mask.. >>> >>> - IoMmuFreeBuffer() deallocates pages and does not touch the encryption >>> mask. >>> > > Actually one of main reason why we cleared and restored the memory encryption mask > during allocate/free is because we also consume the IOMMU protocol in QemuFwCfgLib > as a method to allocate and free a DMA buffer. I am certainly open to suggestions. > > [1] https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c#L159 > [2] https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c#L197 > >>> - IoMmuMap() does not allocate pages when BusMasterCommonBuffer is >>> requested, and it allocates pages (bounce buffer) otherwise. >>> > > I am trying to wrap my head around how we can support BusMasterCommonBuffer > when buffer was not allocated by us. Changing the memory encryption mask in > a page table will not update the contents. Also since the memory encryption > mask works on PAGE_SIZE hence changing the encryption mask on not our allocated > buffer could mess things up (e.g if NumberOfBytes is not PAGE_SIZE aligned). > I may be missing something in my understanding. Here is a flow I have in my mind, please correct me. OvmfPkg/VirtIoBlk.c: VirtioBlkInit() .... .... VirtioRingInit Virtio->AllocateSharedPages(RingSize, &Ring->Base) PciIo->AllocatePages(RingSize, &RingAddress) Virtio->MapSharedPages(...,BusMasterCommonBuffer, Ring->Base, RingSize, &RingDeviceAddress) ..... ..... This case is straight forward and we can easily maps. No need for bounce buffering. VirtioBlkReadBlocks(..., BufferSize, Buffer,) ...... ...... SynchronousRequest(..., BufferSize, Buffer) .... Virtio->MapSharedPages(..., BusMasterCommonBuffer, Buffer, BufferSize, &DeviceAddress) VirtioAppendDesc(DeviceAddress, BufferSize, ...) VirtioFlush (...) In the above case, "Buffer" was not allocated by us hence we will not able to change the memory encryption attributes. Am I missing something in the flow ? >>> *Regardless* of BusMaster operation, the following actions are carried >>> out unconditionally: >>> >>> . the memory encryption mask is cleared in this function (and in this >>> function only), >>> >>> . An attempt is made to grab a MAP_INFO structure from an internal >>> free list (to be introduced!). The head of the list is a new static >>> variable. If the free list is empty, then a MAP_INFO structure is >>> allocated with AllocatePool(). The NO_MAPPING macro becomes unused >>> and can be deleted from the source code. >>> >>> - IoMmuUnmap() clears the encryption mask unconditionally. (For this, it >>> has to consult the MAP_INFO structure that is being passed in from the >>> caller.) In addition: >>> >>> . If MapInfo->Operation is BusMasterCommonBuffer, then we know the >>> allocation was done separately in AllocateBuffer, so we do not >>> release the pages. Otherwise, we do release the pages. >>> >>> . MapInfo is linked back on the internal free list (see above). It is >>> *never* released with FreePool(). >>> >>> This approach guarantees that IoMmuUnmap() can de-program the IOMMU (= >>> re-set the memory encryption mask) without changing the UEFI memory >>> map. (I trust that MemEncryptSevSetPageEncMask() will not split page >>> tables internally when it *re*sets the encryption mask -- is that >>> correct?) >