From: Kevin Wolf <kwolf@redhat.com>
To: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Cc: qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Maxim Levitsky <mlevitsk@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/1 V2] Add vhost-pci-blk driver
Date: Thu, 8 Nov 2018 15:50:58 +0100 [thread overview]
Message-ID: <20181108145058.GD6006@linux.fritz.box> (raw)
In-Reply-To: <20181105205641.17862-2-v.mayatskih@gmail.com>
Am 05.11.2018 um 21:56 hat Vitaly Mayatskikh geschrieben:
> This driver uses the kernel-mode acceleration for virtio-blk and
> allows to get a near bare metal disk performance inside a VM.
>
> Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
> ---
> configure | 10 +
> default-configs/virtio.mak | 1 +
> hw/block/Makefile.objs | 1 +
> hw/block/vhost-blk.c | 429 ++++++++++++++++++++++++++++++++++
> hw/virtio/virtio-pci.c | 60 +++++
> hw/virtio/virtio-pci.h | 19 ++
> include/hw/virtio/vhost-blk.h | 43 ++++
> 7 files changed, 563 insertions(+)
> create mode 100644 hw/block/vhost-blk.c
> create mode 100644 include/hw/virtio/vhost-blk.h
>
> diff --git a/configure b/configure
> index 46ae1e8c76..787bc780da 100755
> --- a/configure
> +++ b/configure
> @@ -371,6 +371,7 @@ vhost_crypto="no"
> vhost_scsi="no"
> vhost_vsock="no"
> vhost_user=""
> +vhost_blk=""
> kvm="no"
> hax="no"
> hvf="no"
> @@ -869,6 +870,7 @@ Linux)
> vhost_crypto="yes"
> vhost_scsi="yes"
> vhost_vsock="yes"
> + vhost_blk="yes"
> QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
> supported_os="yes"
> libudev="yes"
> @@ -1263,6 +1265,10 @@ for opt do
> ;;
> --enable-vhost-vsock) vhost_vsock="yes"
> ;;
> + --disable-vhost-blk) vhost_blk="no"
> + ;;
> + --enable-vhost-blk) vhost_blk="yes"
> + ;;
> --disable-opengl) opengl="no"
> ;;
> --enable-opengl) opengl="yes"
> @@ -6000,6 +6006,7 @@ echo "vhost-crypto support $vhost_crypto"
> echo "vhost-scsi support $vhost_scsi"
> echo "vhost-vsock support $vhost_vsock"
> echo "vhost-user support $vhost_user"
> +echo "vhost-blk support $vhost_blk"
> echo "Trace backends $trace_backends"
> if have_backend "simple"; then
> echo "Trace output file $trace_file-<pid>"
> @@ -6461,6 +6468,9 @@ fi
> if test "$vhost_user" = "yes" ; then
> echo "CONFIG_VHOST_USER=y" >> $config_host_mak
> fi
> +if test "$vhost_blk" = "yes" ; then
> + echo "CONFIG_VHOST_BLK=y" >> $config_host_mak
> +fi
> if test "$blobs" = "yes" ; then
> echo "INSTALL_BLOBS=yes" >> $config_host_mak
> fi
> diff --git a/default-configs/virtio.mak b/default-configs/virtio.mak
> index 1304849018..765c0a2a04 100644
> --- a/default-configs/virtio.mak
> +++ b/default-configs/virtio.mak
> @@ -1,5 +1,6 @@
> CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
> CONFIG_VHOST_USER_BLK=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
> +CONFIG_VHOST_BLK=$(CONFIG_LINUX)
> CONFIG_VIRTIO=y
> CONFIG_VIRTIO_9P=y
> CONFIG_VIRTIO_BALLOON=y
> diff --git a/hw/block/Makefile.objs b/hw/block/Makefile.objs
> index 53ce5751ae..857ce823fc 100644
> --- a/hw/block/Makefile.objs
> +++ b/hw/block/Makefile.objs
> @@ -14,3 +14,4 @@ obj-$(CONFIG_SH4) += tc58128.o
> obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o
> obj-$(CONFIG_VIRTIO_BLK) += dataplane/
> obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk.o
> +obj-$(CONFIG_VHOST_BLK) += vhost-blk.o
> diff --git a/hw/block/vhost-blk.c b/hw/block/vhost-blk.c
> new file mode 100644
> index 0000000000..4ca8040ee7
> --- /dev/null
> +++ b/hw/block/vhost-blk.c
> @@ -0,0 +1,429 @@
> +/*
> + * vhost-blk host device
> + *
> + * Copyright(C) 2018 IBM Corporation
> + *
> + * Authors:
> + * Vitaly Mayatskikh <v.mayatskih@gmail.com>
> + *
> + * Largely based on the "vhost-user-blk.c" implemented by:
> + * Changpeng Liu <changpeng.liu@intel.com>
You mean contrib/vhost-user-blk/vhost-user-blk.c in the QEMU tree? That
one has the following license:
* This work is licensed under the terms of the GNU GPL, version 2 only.
* See the COPYING file in the top-level directory.
You have this on the other hand:
> + * This work is licensed under the terms of the GNU LGPL, version 2 or later.
> + * See the COPYING.LIB file in the top-level directory.
I think you need to get rid of any vhost-user-blk.c parts before you can
make it LGPL2+.
Kevin
prev parent reply other threads:[~2018-11-08 14:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 20:56 [Qemu-devel] [PATCH 0/1 V2] Add vhost-pci-blk driver Vitaly Mayatskikh
2018-11-05 20:56 ` [Qemu-devel] [PATCH 1/1 " Vitaly Mayatskikh
2018-11-08 14:09 ` Dongli Zhang
2018-11-08 16:47 ` Michael S. Tsirkin
2018-11-09 1:48 ` Dongli Zhang
2018-11-09 9:33 ` Kevin Wolf
2018-11-08 14:50 ` Kevin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181108145058.GD6006@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=v.mayatskih@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.