On Tue, Oct 6, 2020 at 4:33 PM Alex Bennée alex.bennee@linaro.org wrote:
Jean-Philippe Brucker jean-philippe@linaro.org writes:
The problem with static regions is that all of the traffic will require copying. Sub-page payloads will need bounce buffering anyway, for proper isolation.
Shouldn't sub-page payloads be embedded directly in the virtqueues (direct vs indirect buffers)?
It appears that one of us misunderstands how direct buffers in virtqueues work. ;-)
From my reading of the specification and the source code, there are
never any buffers within the virtqueue itself. The difference is that in "direct" virtqueues, the queue contains descriptors pointing directly at arbitrary physical pages in the guest-virtual address space, while in indirect mode, the descriptors in the virtqueue point to another set of dynamically allocated descriptors outside of the virtqueue, which then point to the actual data.
In case of indirect virtqueues, full isolation requires special care for sub-page mappings of both the (indirect) descriptors and the data.
Arnd