[libvirt] [PATCH 0/3] Add vhost-user-scsi/blk support

Michal Privoznik mprivozn at redhat.com
Mon Sep 30 15:20:34 UTC 2019


On 9/30/19 8:54 AM, Li Feng wrote:
> The latest qemu has support the vhost-user-scsi and vhost-user-blk backend for
> better performance.
> 
> This patch let the libvirt could manage the vhost-user disks.
> 
> Usage in xml like this:
>     <vhost-user-blk-pci type='unix'>
>         <source type='bind' path='/tmp/vhost-blk.sock'>
>             <reconnect enabled='yes' timeout='5' />
>         </source>
>         <queue num='4'/>
>     </vhost-user-blk-pci>

This is not so nice XML. We tend to hide these implementation details 
from users. We already have <drive/> element which has <driver name=''/> 
sub-element. Maybe we can use that somehow? It's better to create the 
abstraction at libvirt layer instead of blindly exposing qemu's 
features. For instance, recently vhost-user-vga and vhost-user-gpu-pci 
was introduced into libvirt and it's hidden under <video/> element:

fc91a182d7cc78fe5ce0e03ef709c834035e0f33 and friends

> 
> Li Feng (3):
>    qemu: Add vhost-user-scsi/blk support
>    vhost-user-scsi/blk: add xml validation check
>    qemu: Add multiqueue support for vhost-user-scsi/blk
> 
>   docs/schemas/domaincommon.rng                      |  48 ++++++++++

And you want to document every new feature that's added (and also 
mention it in docs/news.xml).

>   src/conf/device_conf.h                             |   5 +
>   src/conf/domain_conf.c                             |  93 +++++++++++++++++-
>   src/conf/domain_conf.h                             |   9 ++
>   src/qemu/qemu_alias.c                              |  16 ++++
>   src/qemu/qemu_command.c                            | 105 +++++++++++++++++++++
>   src/qemu/qemu_domain.c                             |   2 +
>   .../vhost-user-blk.x86_64-latest.args              |  37 ++++++++
>   tests/qemuxml2argvdata/vhost-user-blk.xml          |  38 ++++++++
>   .../vhost-user-scsi.x86_64-latest.args             |  37 ++++++++
>   tests/qemuxml2argvdata/vhost-user-scsi.xml         |  37 ++++++++
>   tests/qemuxml2argvtest.c                           |   3 +
>   12 files changed, 429 insertions(+), 1 deletion(-)
>   create mode 100644 tests/qemuxml2argvdata/vhost-user-blk.x86_64-latest.args
>   create mode 100644 tests/qemuxml2argvdata/vhost-user-blk.xml
>   create mode 100644 tests/qemuxml2argvdata/vhost-user-scsi.x86_64-latest.args
>   create mode 100644 tests/qemuxml2argvdata/vhost-user-scsi.xml
> 

I haven't looked at any code, because we need to figure out XML design 
first.

Michal




More information about the libvir-list mailing list