On 26.02.24 05:09, Peng Fan wrote:
> Hi Oleksandr,

Hello Peng


[snip]

>>
>>     ... Peng, we have vhost-vsock (and vhost-net) Xen PoC. Although it is 
>> non-
>> upstreamable in its current shape (based on old Linux version, requires some
>> rework and proper integration, most likely requires involving Qemu and
>> protocol changes to pass an additional info to vhost), it works with Linux
>> v5.10 + patched Qemu v7.0, so you can refer to the Yocto meta layer which
>> contains kernel patches for the details [1].
> 
> Thanks for the pointer, I am reading the code.
> 
>>
>> In a nutshell, before accessing the guest data the host module needs to map
>> descriptors in virtio rings which contain either guest grant based DMA
>> addresses (by using Xen grant mappings) or guest pseudo-physical addresses
>> (by using Xen foreign mappings). After accessing the guest data the host
>> module needs to unmap them.
> 
> Ok, I thought  the current xen virtio code already map every ready.
> 

It does, as you said the virtio-blk-pci worked in your environment. But 
vhost(-vsock) is a special case, unlike for virtio-blk-pci where the 
whole backend resides in Qemu, here we have a split model. As I 
understand the Qemu performs only initial setup/configuration then 
offloads the I/O processing to a separate entity which is the Linux 
module in that particular case.

Reply via email to