Re: [PATCH v2] crypto: ccp - Allocate TEE ring and cmd buffer using DMA APIs

2023-01-03 Thread Rijo Thomas
On 12/30/2022 1:54 PM, Herbert Xu wrote: > On Fri, Dec 23, 2022 at 05:45:24PM +0530, Rijo Thomas wrote: >> >>> dma_alloc_coherent memory is just as contiguous as __get_free_pages, and >>> calling dma_alloc_coherent from a guest does not guarantee that the memory >>> is >>> contiguous in host me

Re: [PATCH v2] crypto: ccp - Allocate TEE ring and cmd buffer using DMA APIs

2022-12-31 Thread Herbert Xu
On Fri, Dec 23, 2022 at 05:45:24PM +0530, Rijo Thomas wrote: > > > dma_alloc_coherent memory is just as contiguous as __get_free_pages, and > > calling dma_alloc_coherent from a guest does not guarantee that the memory > > is > > contiguous in host memory either. The memory would look contiguous f

Re: [PATCH v2] crypto: ccp - Allocate TEE ring and cmd buffer using DMA APIs

2022-12-23 Thread Rijo Thomas
On 12/15/2022 6:59 PM, Jeremi Piotrowski wrote: > On Tue, Dec 13, 2022 at 04:40:27PM +0530, Rijo Thomas wrote: >> For AMD Secure Processor (ASP) to map and access TEE ring buffer, the >> ring buffer address sent by host to ASP must be a real physical >> address and the pages must be physically c

Re: [PATCH v2] crypto: ccp - Allocate TEE ring and cmd buffer using DMA APIs

2022-12-16 Thread Alex Deucher
On Fri, Dec 16, 2022 at 3:20 AM Jeremi Piotrowski wrote: > > On Tue, Dec 13, 2022 at 04:40:27PM +0530, Rijo Thomas wrote: > > For AMD Secure Processor (ASP) to map and access TEE ring buffer, the > > ring buffer address sent by host to ASP must be a real physical > > address and the pages must be

Re: [PATCH v2] crypto: ccp - Allocate TEE ring and cmd buffer using DMA APIs

2022-12-16 Thread Jeremi Piotrowski
On Tue, Dec 13, 2022 at 04:40:27PM +0530, Rijo Thomas wrote: > For AMD Secure Processor (ASP) to map and access TEE ring buffer, the > ring buffer address sent by host to ASP must be a real physical > address and the pages must be physically contiguous. > > In a virtualized environment though, whe

[PATCH v2] crypto: ccp - Allocate TEE ring and cmd buffer using DMA APIs

2022-12-13 Thread Rijo Thomas
For AMD Secure Processor (ASP) to map and access TEE ring buffer, the ring buffer address sent by host to ASP must be a real physical address and the pages must be physically contiguous. In a virtualized environment though, when the driver is running in a guest VM, the pages allocated by __get_fre