On 23/01/2018 17:07, Michael S. Tsirkin wrote:
>> It's not clear to me how to do this. E.g need a way to report failure to VM2
>> or #PF?
> 
> Why would there be a failure? qemu running vm1 would be responsible for
> preventing access to vm2's memory not mapped through an IOMMU.
> Basically munmap these.

Access to VM2's memory would use VM2's configured IOVAs for VM1's
requester id.  VM2's QEMU send device IOTLB messages to VM1's QEMU,
which would remap VM2's memory on the fly into VM1's BAR2.

It's not trivial to do it efficiently, but it's possible.  The important
thing is that, if VM2 has an IOMMU, QEMU must *not* connect to a
virtio-vhost-user device that lacks IOTLB support.  But that would be a
vhost-user bug, not a virtio-vhost-user bug---and that's the beauty of
Stefan's approach. :)

Paolo

Reply via email to