[PATCH 2/2] hw/vhost-user-scsi|blk: set `supports_config` flag correctly

2022-05-25 Thread Changpeng Liu
Currently vhost-user-scsi driver doesn't allow to change the configuration space of virtio_scsi, while vhost-user-blk support that, so here we set the flag in vhost-user-blk driver and unset it in vhost-user-scsi. Signed-off-by: Changpeng Liu --- hw/block/vhost-user-blk.c | 1 + hw/scsi/

[PATCH 1/2] hw/virtio/vhost-user: don't use uninitialized variable

2022-05-25 Thread Changpeng Liu
Variable `vdev` in `struct vhost_dev` will not be ready until start the device, so let's not use it for the error output here. Fixes: 5653493 ("hw/virtio/vhost-user: don't suppress F_CONFIG when supported") Signed-off-by: Changpeng Liu --- hw/virtio/vhost-user.c | 8 +++

[Qemu-devel] [PATCH 0/2] Introduce a new vhost-user-blk device and sample application

2017-07-25 Thread Changpeng Liu
) for vhost-user-blk device. But for this patch, we choose append parameters to Qemu vhost-user-blk as the solution. Changpeng Liu (2): vhost-user-blk: introduce a new vhost-user-blk host device vhost-user-blk: introduce a vhost-user-blk sample application .giti

[Qemu-devel] [PATCH 1/2] vhost-user-blk: introduce a new vhost-user-blk host device

2017-07-25 Thread Changpeng Liu
exist vhost-user messages, Qemu can't get the parameters such as capacity of the backend block device, users need to append such parameters when start Qemu. Signed-off-by: Changpeng Liu --- configure | 11 ++ hw/block/Makefile.objs | 3 + hw/block/

[Qemu-devel] [PATCH 2/2] vhost-user-blk: introduce a vhost-user-blk sample application

2017-07-25 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 2 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 695

[Qemu-devel] [PATCH v2 0/4] *** Introduce a new vhost-user-blk host device to Qemu ***

2017-08-09 Thread Changpeng Liu
device live migration as well. Changpeng Liu (4): vhost-user: add new vhost user messages to support virtio config space vhost-user-blk: introduce a new vhost-user-blk host device contrib/libvhost-user: enable virtio config space messages contrib/vhost-user-blk: introduce a vhost-user-blk

[Qemu-devel] [PATCH v2 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2017-08-09 Thread Changpeng Liu
messages(VHOST_USER_GET_CONFIG) to get block virtio config information from backend process. Signed-off-by: Changpeng Liu --- configure | 11 ++ hw/block/Makefile.objs | 3 + hw/block/vhost-user-blk.c | 360 + hw/virtio

[Qemu-devel] [PATCH v2 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-08-09 Thread Changpeng Liu
, VHOST_USER_SET_CONFIG_FD message is added as the event notifier in case virtio config space change. Signed-off-by: Changpeng Liu --- docs/interop/vhost-user.txt | 31 ++ hw/virtio/vhost-user.c| 86 +++ hw/virtio/vhost.c

[Qemu-devel] [PATCH v2 3/4] contrib/libvhost-user: enable virtio config space messages

2017-08-09 Thread Changpeng Liu
case of virtio config space changed. Signed-off-by: Changpeng Liu --- contrib/libvhost-user/libvhost-user.c | 51 +++ contrib/libvhost-user/libvhost-user.h | 14 ++ 2 files changed, 65 insertions(+) diff --git a/contrib/libvhost-user/libvhost-user.c b

[Qemu-devel] [PATCH v2 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2017-08-09 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 2 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 735

[Qemu-devel] [PATCH] virtio-blk: enable multiple vectors when using multiple I/O queues

2018-01-31 Thread Changpeng Liu
Currently virtio-pci driver hardcoded 2 vectors for virtio-blk device, for multiple I/O queues scenario, all the I/O queues will share one interrupt vector, while here, enable multiple vectors according to the number of I/O queues. Signed-off-by: Changpeng Liu --- hw/virtio/virtio-pci.c | 12

[Qemu-devel] [PATCH v6 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2017-12-04 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 1 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 556

[Qemu-devel] [PATCH v6 0/4] Introduce a new vhost-user-blk host device to QEMU

2017-12-04 Thread Changpeng Liu
toring the vhost user block example patch based on new libvhost-user library. v2-v3: add new vhost user message to get/set virtio config space. Changpeng Liu (4): vhost-user: add new vhost user messages to support virtio config space vhost-user-blk: introduce a new vhost-user-blk host device

[Qemu-devel] [PATCH v6 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-12-04 Thread Changpeng Liu
, VHOST_USER_SET_CONFIG_FD message is added as the event notifier in case virtio config space change in the I/O target. Signed-off-by: Changpeng Liu --- docs/interop/vhost-user.txt | 44 hw/virtio/vhost-user.c| 107 ++ hw/virtio/vhost.c

[Qemu-devel] [PATCH v6 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2017-12-04 Thread Changpeng Liu
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 --- default-configs/pci.mak| 1 + hw/block/Makefile.objs

[Qemu-devel] [PATCH v6 3/4] contrib/libvhost-user: enable virtio config space messages

2017-12-04 Thread Changpeng Liu
case of virtio config space changed. Signed-off-by: Changpeng Liu --- contrib/libvhost-user/libvhost-user.c | 80 +++ contrib/libvhost-user/libvhost-user.h | 36 +++- 2 files changed, 115 insertions(+), 1 deletion(-) diff --git a/contrib/libvhost-user

[Qemu-devel] [PATCH v7 3/4] contrib/libvhost-user: enable virtio config space messages

2017-12-12 Thread Changpeng Liu
case of virtio config space changed. Signed-off-by: Changpeng Liu --- contrib/libvhost-user/libvhost-user.c | 80 +++ contrib/libvhost-user/libvhost-user.h | 36 +++- 2 files changed, 115 insertions(+), 1 deletion(-) diff --git a/contrib/libvhost-user

[Qemu-devel] [PATCH v7 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-12-12 Thread Changpeng Liu
, VHOST_USER_SET_CONFIG_FD message is added as the event notifier in case virtio config space change in the I/O target. Signed-off-by: Changpeng Liu --- docs/interop/vhost-user.txt | 45 hw/virtio/vhost-user.c| 107 ++ hw/virtio/vhost.c

[Qemu-devel] [PATCH v7 0/4] Introduce a new vhost-user-blk host device to QEMU

2017-12-12 Thread Changpeng Liu
valid data buffers. v4-v5: add header offset and size for virtio config space. v3-v4: refactoring the vhost user block example patch based on new libvhost-user library. v2-v3: add new vhost user message to get/set virtio config space. Changpeng Liu (4): vhost-user: add new vhost user messages

[Qemu-devel] [PATCH v7 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2017-12-12 Thread Changpeng Liu
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 --- default-configs/pci.mak| 1 + hw/block/Makefile.objs

[Qemu-devel] [PATCH v7 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2017-12-12 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 1 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 550

[Qemu-devel] [PATCH v5 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-11-16 Thread Changpeng Liu
, VHOST_USER_SET_CONFIG_FD message is added as the event notifier in case virtio config space change in the I/O target. Signed-off-by: Changpeng Liu --- docs/interop/vhost-user.txt | 39 hw/virtio/vhost-user.c| 98 +++ hw/virtio/vhost.c

[Qemu-devel] [PATCH v5 0/4] *** Introduce a new vhost-user-blk host device to Qemu ***

2017-11-16 Thread Changpeng Liu
live migration as well. V4-v5: add header offset and size for virtio config space. v3-v4: refactoring the vhost user block example patch based on new libvhost-user library. v2-v3: add new vhost user message to get/set virtio config space. Changpeng Liu (4): vhost-user: add new vhost user messages

[Qemu-devel] [PATCH v5 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2017-11-16 Thread Changpeng Liu
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 --- default-configs/pci.mak| 1 + hw/block/Makefile.objs

[Qemu-devel] [PATCH v5 3/4] contrib/libvhost-user: enable virtio config space messages

2017-11-16 Thread Changpeng Liu
case of virtio config space changed. Signed-off-by: Changpeng Liu --- contrib/libvhost-user/libvhost-user.c | 79 +++ contrib/libvhost-user/libvhost-user.h | 24 ++- 2 files changed, 102 insertions(+), 1 deletion(-) diff --git a/contrib/libvhost-user

[Qemu-devel] [PATCH v5 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2017-11-16 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 1 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 536

[Qemu-devel] [RFC v1] Introduce a new NVMe host device type to QEMU

2018-01-14 Thread Changpeng Liu
forward the IO requests through socket message, but this will have huge performance drop; Any feedback is appreciated. Changpeng Liu (1): block/NVMe: introduce a new vhost NVMe host device to QEMU hw/block/Makefile.objs | 3 + hw/block/nvme.h| 28 ++ hw/block

[Qemu-devel] [RFC v1] block/NVMe: introduce a new vhost NVMe host device to QEMU

2018-01-14 Thread Changpeng Liu
. Currently Guest OS must use 4.12 kernel or later. Signed-off-by: Changpeng Liu --- hw/block/Makefile.objs | 3 + hw/block/nvme.h| 28 ++ hw/block/vhost.c | 439 ++ hw/block/vhost_user.c | 588 + hw/block

[Qemu-devel] [Bug 1744654] [NEW] commit: 4fe6d78 "virtio: postpone the execution of event_notifier_cleanup function" will cause vhost-user device crash

2018-01-21 Thread Changpeng Liu
Public bug reported: The new commit: 4fe6d78 break the existing vhost-user devices, such as vhost-user-scsi/blk and vhost-vsocks when exit the host driver, kvm_io_ioeventfd_del will hit the abort(). ** Affects: qemu Importance: Undecided Status: New ** Tags: vhost-user virtio --

[Qemu-devel] [PATCH] virtio-blk: add DISCARD support to virtio-blk driver

2017-03-27 Thread Changpeng Liu
VIRTIO_BLK_T_DISCARD to extend exist virtio-blk protocol. virtio-blk protocol uses a single 8 bytes descriptor containing type,reserved and sector, currently Linux uses the reserved field as IO priority, here we also re-use the reserved field as number of discard sectors. Signed-off-by: Changpeng Liu

[Qemu-devel] [PATCH] vhost-user-blk: enable discard/write zeroes features

2019-01-13 Thread Changpeng Liu
Linux commit 1f23816b8 "virtio_blk: add discard and write zeroes support" added the support in the Guest kernel, while here enable the feature bits support with vhost-user-blk driver. Also enable the test example utility with DISCARD command support. Signed-off-by: Changpeng Liu --

[Qemu-devel] [PATCH v2 2/3] contrib/vhost-user-blk: fix the compilation issue

2019-01-15 Thread Changpeng Liu
Signed-off-by: Changpeng Liu --- contrib/vhost-user-blk/vhost-user-blk.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c index 858221a..49640df 100644 --- a/contrib/vhost-user-blk/vhost

[Qemu-devel] [PATCH v2 1/3] contrib: compile vhost-user-blk tool by default

2019-01-15 Thread Changpeng Liu
Signed-off-by: Changpeng Liu --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 3eee3fc..3d5af97 100755 --- a/configure +++ b/configure @@ -5763,6 +5763,9 @@ if test "$want_tools" = "yes" ; then if [ "$posix" = "

[Qemu-devel] [PATCH v2 3/3] vhost-user-blk: add discard/write zeroes features support

2019-01-15 Thread Changpeng Liu
Linux commit 1f23816b8 "virtio_blk: add discard and write zeroes support" added the support in the Guest kernel, while here also enable the features support with vhost-user-blk driver. Also enable the test example utility with DISCARD and WRITE ZEROES commands. Signed-off-by: Cha

[Qemu-devel] [PATCH v3] vhost-user-blk: add discard/write zeroes features support

2019-01-16 Thread Changpeng Liu
Linux commit 1f23816b8 "virtio_blk: add discard and write zeroes support" added the support in the Guest kernel, while here also enable the features support with vhost-user-blk driver. Also enable the test example utility with DISCARD and WRITE ZEROES commands. Signed-off-by: Cha

[Qemu-devel] [PATCH] vhost-blk: turn on pre-defined RO feature bit

2018-05-18 Thread Changpeng Liu
Read only feature shouldn't be negotiable, because if the backend device reported Read only feature supported, QEMU host driver shouldn't change backend's RO attribute. Signed-off-by: Changpeng Liu --- hw/block/vhost-user-blk.c | 5 + include/hw/virtio/vhost-user

[Qemu-devel] [PATCH] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk

2018-05-18 Thread Changpeng Liu
This patch reports the protocol feature that is only advertised by QEMU if the device implements the config ops. Signed-off-by: Changpeng Liu --- contrib/vhost-user-blk/vhost-user-blk.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib

[Qemu-devel] [PATCH v2] vhost-blk: turn on pre-defined RO feature bit

2018-05-28 Thread Changpeng Liu
Read only feature shouldn't be negotiable, because if the backend device reported Read only feature supported, QEMU host driver shouldn't change backend's RO attribute. While here, also enable the vhost-user-blk test utility to test RO feature. Signed-off-by: Changpeng Liu ---

[Qemu-devel] [PATCH v3 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2017-09-11 Thread Changpeng Liu
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 --- configure | 11 ++ hw/block/Makefile.objs

[Qemu-devel] [PATCH v3 0/4] *** Introduce a new vhost-user-blk host device to Qemu ***

2017-09-11 Thread Changpeng Liu
device live migration as well. Changpeng Liu (4): vhost-user: add new vhost user messages to support virtio config space vhost-user-blk: introduce a new vhost-user-blk host device contrib/libvhost-user: enable virtio config space messages contrib/vhost-user-blk: introduce a vhost-user-blk

[Qemu-devel] [PATCH v3 3/4] contrib/libvhost-user: enable virtio config space messages

2017-09-11 Thread Changpeng Liu
case of virtio config space changed. Signed-off-by: Changpeng Liu --- contrib/libvhost-user/libvhost-user.c | 74 +++ contrib/libvhost-user/libvhost-user.h | 15 +++ 2 files changed, 89 insertions(+) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib

[Qemu-devel] [PATCH v3 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-09-11 Thread Changpeng Liu
, VHOST_USER_SET_CONFIG_FD message is added as the event notifier in case virtio config space change. Signed-off-by: Changpeng Liu --- docs/interop/vhost-user.txt | 32 + hw/virtio/vhost-user.c| 97 +++ hw/virtio/vhost.c

[Qemu-devel] [PATCH v3 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2017-09-11 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 2 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 735

[Qemu-devel] [PATCH v4 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2017-10-18 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 1 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 492

[Qemu-devel] [PATCH v4 3/4] contrib/libvhost-user: enable virtio config space messages

2017-10-18 Thread Changpeng Liu
case of virtio config space changed. Signed-off-by: Changpeng Liu --- contrib/libvhost-user/libvhost-user.c | 75 +++ contrib/libvhost-user/libvhost-user.h | 15 ++- 2 files changed, 89 insertions(+), 1 deletion(-) diff --git a/contrib/libvhost-user/libvhost

[Qemu-devel] [PATCH v4 0/4] *** Introduce a new vhost-user-blk host device to Qemu ***

2017-10-18 Thread Changpeng Liu
live migration as well. v3-v4: refactoring the vhost user block example patch based on new libvhost-user library. v2-v3: add new vhost user message to get/set virtio config space Changpeng Liu (4): vhost-user: add new vhost user messages to support virtio config space vhost-user-blk: introduce

[Qemu-devel] [PATCH v4 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-10-18 Thread Changpeng Liu
, VHOST_USER_SET_CONFIG_FD message is added as the event notifier in case virtio config space change in the I/O target. Signed-off-by: Changpeng Liu --- docs/interop/vhost-user.txt | 33 + hw/virtio/vhost-user.c| 97 +++ hw/virtio/vhost.c

[Qemu-devel] [PATCH v4 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2017-10-18 Thread Changpeng Liu
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 --- configure | 11 ++ hw/block/Makefile.objs

[Qemu-devel] [PATCH v8 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2018-01-01 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 1 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 543

[Qemu-devel] [PATCH v8 0/4] Introduce a new vhost-user-blk host device to QEMU

2018-01-01 Thread Changpeng Liu
v4-v5: add header offset and size for virtio config space. v3-v4: refactoring the vhost user block example patch based on new libvhost-user library. v2-v3: add new vhost user message to get/set virtio config space. Changpeng Liu (4): vhost-user: add new vhost user messages to support virtio co

[Qemu-devel] [PATCH v8 1/4] vhost-user: add new vhost user messages to support virtio config space

2018-01-01 Thread Changpeng Liu
, VHOST_USER_SLAVE_CONFIG_CHANGE_MSG message is added as the event notifier in case virtio config space change in the slave I/O target. Signed-off-by: Changpeng Liu --- docs/interop/vhost-user.txt | 53 + hw/virtio/vhost-user.c| 118 ++ hw

[Qemu-devel] [PATCH v8 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-01 Thread Changpeng Liu
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 --- default-configs/pci.mak| 1 + hw/block/Makefile.objs

[Qemu-devel] [PATCH v8 3/4] contrib/libvhost-user: enable virtio config space messages

2018-01-01 Thread Changpeng Liu
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between QEMU host device and the I/O target. Signed-off-by: Changpeng Liu --- contrib/libvhost-user

[Qemu-devel] [PATCH v9 0/4] Introduce a new vhost-user-blk host device to QEMU

2018-01-03 Thread Changpeng Liu
-user get/set messages' payload doesn't contain invalid data buffers. v4-v5: add header offset and size for virtio config space. v3-v4: refactoring the vhost user block example patch based on new libvhost-user library. v2-v3: add new vhost user message to get/set virtio config space. Changp

[Qemu-devel] [PATCH v9 1/4] vhost-user: add new vhost user messages to support virtio config space

2018-01-03 Thread Changpeng Liu
, VHOST_USER_SLAVE_CONFIG_CHANGE_MSG message is added as the event notifier in case virtio config space change in the slave I/O target. Signed-off-by: Changpeng Liu --- docs/interop/vhost-user.txt | 55 ++ hw/virtio/vhost-user.c| 118 ++ hw

[Qemu-devel] [PATCH v9 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-03 Thread Changpeng Liu
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 --- default-configs/pci.mak| 1 + hw/block/Makefile.objs

[Qemu-devel] [PATCH v9 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2018-01-03 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 1 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 545

[Qemu-devel] [PATCH v9 3/4] contrib/libvhost-user: enable virtio config space messages

2018-01-03 Thread Changpeng Liu
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between QEMU host device and the I/O target. Signed-off-by: Changpeng Liu --- contrib/libvhost-user

[Qemu-devel] [PATCH v10 1/4] vhost-user: add new vhost user messages to support virtio config space

2018-01-03 Thread Changpeng Liu
, VHOST_USER_SLAVE_CONFIG_CHANGE_MSG message is added as the event notifier in case virtio config space change in the slave I/O target. Signed-off-by: Changpeng Liu --- docs/interop/vhost-user.txt | 55 ++ hw/virtio/vhost-user.c| 118 ++ hw

[Qemu-devel] [PATCH v10 3/4] contrib/libvhost-user: enable virtio config space messages

2018-01-03 Thread Changpeng Liu
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between QEMU host device and the I/O target. Signed-off-by: Changpeng Liu --- contrib/libvhost-user

[Qemu-devel] [PATCH v10 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2018-01-03 Thread Changpeng Liu
/path/vhost.socket Signed-off-by: Changpeng Liu --- .gitignore | 1 + Makefile| 3 + Makefile.objs | 1 + contrib/vhost-user-blk/Makefile.objs| 1 + contrib/vhost-user-blk/vhost-user-blk.c | 545

[Qemu-devel] [PATCH v10 0/4] Introduce a new vhost-user-blk host device to QEMU

2018-01-03 Thread Changpeng Liu
set virtio config space. Changpeng Liu (4): vhost-user: add new vhost user messages to support virtio config space vhost-user-blk: introduce a new vhost-user-blk host device contrib/libvhost-user: enable virtio config space messages contrib/vhost-user-blk: introduce a vhost-user-blk sample a

[Qemu-devel] [PATCH v10 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-03 Thread Changpeng Liu
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 --- default-configs/pci.mak| 1 + hw/block/Makefile.objs

[Qemu-devel] [PATCH 1/2] contrib/libvhost-user: add the protocol feature used for SET/GET message

2018-03-29 Thread Changpeng Liu
Signed-off-by: Changpeng Liu --- contrib/libvhost-user/libvhost-user.h | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h index 79f7a53..b27075e 100644 --- a/contrib/libvhost-user/libvhost-user.h +++ b/contrib

[Qemu-devel] [PATCH 2/2] contrib/vhost-user-blk: enable protocol feature for vhost-user-blk

2018-03-29 Thread Changpeng Liu
This patch reports the protocol feature that is only advertised by QEMU if the device implements the config ops. Signed-off-by: Changpeng Liu --- contrib/vhost-user-blk/vhost-user-blk.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib

[Qemu-devel] [PATCH v2] virtio-blk: enable multiple vectors when using multiple I/O queues

2018-02-05 Thread Changpeng Liu
Currently virtio-pci driver hardcoded 2 vectors for virtio-blk device, for multiple I/O queues scenario, all the I/O queues will share one interrupt vector, while here, enable multiple vectors according to the number of I/O queues. Signed-off-by: Changpeng Liu --- hw/virtio/virtio-pci.c | 14

[Qemu-devel] [PATCH] virtio-blk: set correct config size for the host driver

2019-02-11 Thread Changpeng Liu
lizing the host driver, for now, discard/write zeroes are not supported by virtio-blk host driver, so set the config size as before, users can change config size when adding the new feature bits support. Signed-off-by: Changpeng Liu --- hw/block/virtio-blk.c | 15 +++ include

[Qemu-devel] [PATCH v2] virtio-blk: set correct config size for the host driver

2019-02-11 Thread Changpeng Liu
lizing the host driver, for now, discard/write zeroes are not supported by virtio-blk host driver, so set the config size as before, users can change config size when adding the new feature bits support. Signed-off-by: Changpeng Liu --- hw/block/virtio-blk.c | 10 ++ 1 file changed, 6

[Qemu-devel] [PATCH v3] virtio-blk: set correct config size for the host driver

2019-02-12 Thread Changpeng Liu
ed: Invalid argument Since virtio-blk doesn't support the "discard" and "write zeroes" features, it shouldn't even expose the associated fields in the config space actually. Just include all fields up to num_queues to match QEMU 3.1 and older. Signed-off-

[Qemu-devel] [PATCH v4] virtio-blk: set correct config size for the host driver

2019-02-12 Thread Changpeng Liu
ed: Invalid argument Since virtio-blk doesn't support the "discard" and "write zeroes" features, it shouldn't even expose the associated fields in the config space actually. Just include all fields up to num_queues to match QEMU 3.1 and older. Signed-off-