Hi,
On Thu, Oct 29, 2020 at 10:26:32AM +0200, Dan Milea wrote:
Hi,
The virtio spec generated from this repository https://github.com/oasis-tcs/ virtio-spec includes a section dedicated to shared memory regions, described as "an additional facility available to devices that need a region of memory that’s continuously shared between the device and the driver, rather than passed between them in the way virtqueue elements are".
This version of the spec does not seem to have been released yet, although some time ago there was an attempt to use shared memory regions with virtio-fs ( https://lwn.net/Articles/774495/).
The most recent spec does use this shared memory extension in virtio-fs (commit ef5a7f405b95 ("virtio-fs: add DAX window") in the above virtio-spec repository). In particular it mandates that virtio-fs uses shared memory region 0 if present, so I guess an extension to share virtqueue and buffers memory would need a read-only register specifying which shared region is used for that, to avoid conflicts?
On 10/29/20 1:55 AM, Stefano Stabellini wrote: Dan Milea discussed the usage of virtio between heterogeneous clusters, i.e. virtio frontends on the Cortex-R cluster and virtio backends on the Cortex-A cluster. They used a setup based on pre-shared memory to make it work, which I believe is similar to the swiotlb approach we discussed in Stratos. They noted that the last version of the virtio spec on github had something in regards to virtio and pre-shared memory regions that might help us cover this use-case from a spec perspective.
I've considered having such an extension described externally [1] but reusing the virtio shared mem feature is interesting. Did you publish any driver or specification update yet? [1] https://op-lists.linaro.org/pipermail/stratos-dev/2020-October/000094.html
Thanks, Jean