On 30-04-25, 10:54, Sebastian Ene wrote:
Looking at vring_alloc_queue, if VIRTIO_F_ACCESS_PLATFORM is not set in we don't end up on the dma_alloc APIs and we avoid the set_memory_decrypted path. Instead pages will be allocated with alloc_pages_exact which is what I suggested earlier.
The feature set seems to be returned by the device in response to the VIRTIO_MSG_GET_FEATURES call.
The VIRTIO_F_ACCESS_PLATFORM feature is enabled in our case. And we need to use the dma_alloc APIs, as we want our virtio-msg specific DMA HAL to take care of memory mapping over FFA. We do need dma_alloc_coherent() to be called here.
We have a qemu based setup with Trusty and I landed patches in android16-6.12 to allow a pVM guest to talk to TZ. Maybe Armelle can share this with you if you want to give it a spin ?
I won't be able to give it a try before June (vacations, travel, etc.), but if that is available maybe someone else can get it to work with Trusty. Armelle ?