[libvirt] [RFC] support vhost-user-scsi configuration

wangjian wangjian161 at huawei.com
Tue Apr 18 14:12:00 UTC 2023



On 2023/4/18 21:50, wangjian (AN) wrote:
> 
> On 4/15/23 15:48, wangjian (AN) wrote:
>> Hi Guys,
>>
>>  
>>
>> Currently qemu and spdk already support vhost-user-scsi, but there is 
>> no vhost-user-scsi configuration in libvirt.
>>
>> We hope that libvirt supports the following configurations to 
>> facilitate docking with qemu.
>>
>>  
>>
>> <controller type='scsi' index='0' model='vhost-user-scsi'>
>>
>>    <driver queues='4'/>
>>
>>    <source type='unix' path='/var/tmp/scsi'>
>>
>>      <reconnect enabled='yes' timeout='3'/>
>>
>>    </source>
>>
>>    <address type='pci' domain='0x0000' bus='0x02' slot='0x02'
>> function='0x0'/>
>>
>> </controller>
>>
>>  
>>
>> The usage in qemu like this:
>>
>> -chardev socket,id=chr-vu-virtio-disk10,path=/var/tmp/scsi,reconnect=3
>>
>> -device
>> vhost-user-blk-pci,num-queues=4,bus=pci.2,addr=0x0,chardev=chr-vu-virt
>> io-disk10,id=scsi0
>>
>>  
>>
>> Could anyone give some suggestions?
>>
> 
> That's very likely because nobody wrote patches for it. I do not think there was a discussion where we decided to deliberately not support it.
> But I guess, what advantage there is in letting an external helper manage a <controller/> ? I though, vhost-user-* is ideal for individual devices rather than controllers.
> 
> Meanwhile, for testing purposes (definitely NOT production), you can use qemu:command line passthrough:
> 
> https://libvirt.org/kbase/qemu-passthrough-security.html
> 
> Michal
> 

In spdk, a vhost-user-blk controller will only be associated with one disk, and a vhost-user-blk controller will only be associated with one socket file.
Therefore, for the vhost-user-blk disk, it is appropriate to use the vhost-user-blk disk associated socket file configuration in libvirt.
But in spdk, a vhost-user-scsi controller will be associated with multiple disks, and a vhost-user-scsi controller will only be associated with one socket file.
Therefore, we think that for vhost-user-scsi, it is appropriate to use the controller to associate the socket file configuration in libvirt.



More information about the libvir-list mailing list