On Tue, Dec 05, 2017 at 02:27:17PM +0800, Changpeng Liu wrote: > This commit introduces a new vhost-user device for block, it uses a > chardev to connect with the backend, same with Qemu virito-blk device, > Guest OS still uses the virtio-blk frontend driver. > > To use it, start QEMU with command line like this: > > qemu-system-x86_64 \ > -chardev socket,id=char0,path=/path/vhost.socket \ > -device vhost-user-blk-pci,chardev=char0,num-queues=2, \ > bootindex=2... \ > > Users can use different parameters for `num-queues` and `bootindex`. > > Different with exist Qemu virtio-blk host device, it makes more easy > for users to implement their own I/O processing logic, such as all > user space I/O stack against hardware block device. It uses the new > vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config > information from backend process. > > Signed-off-by: Changpeng Liu <changpeng....@intel.com> > --- > default-configs/pci.mak | 1 + > hw/block/Makefile.objs | 3 + > hw/block/vhost-user-blk.c | 357 > +++++++++++++++++++++++++++++++++++++ > hw/virtio/virtio-pci.c | 55 ++++++ > hw/virtio/virtio-pci.h | 18 ++ > include/hw/virtio/vhost-user-blk.h | 41 +++++ > 6 files changed, 475 insertions(+) > create mode 100644 hw/block/vhost-user-blk.c > create mode 100644 include/hw/virtio/vhost-user-blk.h
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature