Re: [PATCH] fuzz: avoid building twice, when running on gitlab

2021-08-10 Thread Coiby Xu
On Tue, Aug 10, 2021 at 07:01:45AM +0200, Philippe Mathieu-Daudé wrote: +Coiby Xu & qemu-block@ Thanks for adding me to the Cc list. On 8/9/21 9:36 PM, Peter Maydell wrote: On Mon, 9 Aug 2021 at 20:30, Alexander Bulekov wrote: On 210809 1506, Alexander Bulekov wrote: On 210809

Re: intermittent hang in qos-test for qemu-system-i386 on 32-bit arm host

2021-07-16 Thread Coiby Xu
On Mon, Jul 12, 2021 at 10:39:50AM +0100, Peter Maydell wrote: On Sun, 11 Jul 2021 at 23:55, Coiby Xu wrote: On Mon, Jul 12, 2021 at 06:20:33AM +0800, Coiby Xu wrote: >On Sun, Jul 11, 2021 at 04:53:51PM +0100, Peter Maydell wrote: >>On Sat, 10 Jul 2021 at 14:30, Peter Mayde

Re: intermittent hang in qos-test for qemu-system-i386 on 32-bit arm host

2021-07-11 Thread Coiby Xu
On Mon, Jul 12, 2021 at 06:20:33AM +0800, Coiby Xu wrote: On Sun, Jul 11, 2021 at 04:53:51PM +0100, Peter Maydell wrote: On Sat, 10 Jul 2021 at 14:30, Peter Maydell wrote: I've noticed recently that intermittently 'make check' will hang on my aarch32 test system (really an aarch64 box

Re: intermittent hang in qos-test for qemu-system-i386 on 32-bit arm host

2021-07-11 Thread Coiby Xu
On Sun, Jul 11, 2021 at 04:53:51PM +0100, Peter Maydell wrote: On Sat, 10 Jul 2021 at 14:30, Peter Maydell wrote: I've noticed recently that intermittently 'make check' will hang on my aarch32 test system (really an aarch64 box with an aarch32 chroot). I think from grep that this must be the

Re: intermittent hang in qos-test for qemu-system-i386 on 32-bit arm host

2021-07-11 Thread Coiby Xu
On Sun, Jul 11, 2021 at 06:23:41AM -0700, Richard Henderson wrote: On 7/11/21 5:16 AM, Peter Maydell wrote: On Sun, 11 Jul 2021 at 13:10, Coiby Xu wrote: Hi Peter, On Sat, Jul 10, 2021 at 02:30:36PM +0100, Peter Maydell wrote: I've noticed recently that intermittently 'make check

Re: intermittent hang in qos-test for qemu-system-i386 on 32-bit arm host

2021-07-11 Thread Coiby Xu
Hi Peter, On Sat, Jul 10, 2021 at 02:30:36PM +0100, Peter Maydell wrote: I've noticed recently that intermittently 'make check' will hang on my aarch32 test system (really an aarch64 box with an aarch32 chroot). I have a newbie question. How do you do an aarch32 chroot on an aarch64 box? At

Re: [PATCH v2 05/12] test: new qTest case to test the vhost-user-blk-server

2020-12-18 Thread Coiby Xu
On Mon, Dec 07, 2020 at 05:20:23PM +, Stefan Hajnoczi wrote: From: Coiby Xu This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Since the vhost-user-blk export only serves one client one time, two exports are started by qemu-storage-daemon

Re: [PATCH for-5.2 01/10] test: new qTest case to test the vhost-user-blk-server

2020-12-18 Thread Coiby Xu
On Mon, Dec 07, 2020 at 11:28:38AM +, Stefan Hajnoczi wrote: On Wed, Nov 25, 2020 at 04:28:20PM +0800, Coiby Xu wrote: On Wed, Nov 25, 2020 at 04:20:56PM +0800, Coiby Xu wrote: > On Wed, Nov 11, 2020 at 12:43:22PM +, Stefan Hajnoczi wrote: > > +static void quit_storage_da

Re: [PATCH for-5.2 05/10] vhost-user-blk-test: close fork child file descriptors

2020-12-18 Thread Coiby Xu
On Thu, Dec 03, 2020 at 01:57:21PM +, Stefan Hajnoczi wrote: On Tue, Nov 24, 2020 at 08:08:26PM +0800, Coiby Xu wrote: Hi Stefan, On Wed, Nov 11, 2020 at 12:43:26PM +, Stefan Hajnoczi wrote: > Do not leave stdin and stdout open after fork. stdout is the > tap-driver.pl pipe. If w

Re: [PATCH for-5.2 01/10] test: new qTest case to test the vhost-user-blk-server

2020-11-25 Thread Coiby Xu
On Wed, Nov 25, 2020 at 04:20:56PM +0800, Coiby Xu wrote: On Wed, Nov 11, 2020 at 12:43:22PM +, Stefan Hajnoczi wrote: From: Coiby Xu This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Since vhost-user server can only server one client one

Re: [PATCH for-5.2 01/10] test: new qTest case to test the vhost-user-blk-server

2020-11-25 Thread Coiby Xu
On Wed, Nov 11, 2020 at 12:43:22PM +, Stefan Hajnoczi wrote: From: Coiby Xu This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Since vhost-user server can only server one client one time, two instances of vhost-user-blk-server are started

Re: [PATCH for-5.2 05/10] vhost-user-blk-test: close fork child file descriptors

2020-11-24 Thread Coiby Xu
Hi Stefan, On Wed, Nov 11, 2020 at 12:43:26PM +, Stefan Hajnoczi wrote: Do not leave stdin and stdout open after fork. stdout is the tap-driver.pl pipe. If we keep the pipe open then tap-driver.pl will not detect that qos-test has terminated and it will hang. I wonder under which

Re: [PATCH v10 0/7] vhost-user block device backend implementation

2020-10-10 Thread Coiby Xu
On Fri, Oct 09, 2020 at 11:18:43AM +0100, Stefan Hajnoczi wrote: On Fri, Sep 18, 2020 at 04:09:05PM +0800, Coiby Xu wrote: v10 - Use a linked list of VuFdWatch objects to keep kick info [Stefan] - Merge improvements and fixes from Stefan - Rename libvhost-user's vu_message_read

Re: [PATCH v10 6/7] test: new qTest case to test the vhost-user-blk-server

2020-10-10 Thread Coiby Xu
On Wed, Sep 23, 2020 at 01:36:06PM +0100, Stefan Hajnoczi wrote: On Fri, Sep 18, 2020 at 04:09:11PM +0800, Coiby Xu wrote: +int qtest_socket_client(char *server_socket_path) +{ +struct sockaddr_un serv_addr; +int sock; +int ret; +int retries = 0; +sock = socket(PF_UNIX

Re: [PATCH v9 0/5] vhost-user block device backend implementation

2020-09-18 Thread Coiby Xu
On Tue, Sep 15, 2020 at 04:35:57PM +0100, Stefan Hajnoczi wrote: On Mon, Jun 15, 2020 at 02:39:02AM +0800, Coiby Xu wrote: v9 - move logical block size check function to a utility function - fix issues regarding license, coding style, memory deallocation, etc. Hi, Any update on v10? Please

[PATCH v10 7/7] MAINTAINERS: Add vhost-user block device backend server maintainer

2020-09-18 Thread Coiby Xu
Suggested-by: Stefano Garzarella Signed-off-by: Coiby Xu --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3d17cad19a..55ad6abe73 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3039,6 +3039,14 @@ L: qemu-bl...@nongnu.org S: Supported F

[PATCH v10 5/7] block/export: vhost-user block device backend server

2020-09-18 Thread Coiby Xu
-by: Stefan Hajnoczi Signed-off-by: Coiby Xu --- block/export/vhost-user-blk-server.c | 661 +++ block/export/vhost-user-blk-server.h | 36 ++ block/meson.build| 1 + softmmu/vl.c | 4 + 4 files changed, 702 insertions(+) create

[PATCH v10 6/7] test: new qTest case to test the vhost-user-blk-server

2020-09-18 Thread Coiby Xu
, vhost-user-blk-server will send "quit" command to qemu-storage-daemon's QMP monitor. So a function is added to libqtest.c to establish socket connection with socket server. Suggested-by: Thomas Huth Signed-off-by: Coiby Xu --- tests/qtest/libqos/libqtest.h | 17 + tests/qt

[PATCH v10 4/7] block: move logical block size check function to a common utility function

2020-09-18 Thread Coiby Xu
Move the constants from hw/core/qdev-properties.c to util/block-helpers.h so that knowledge of the min/max values is Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu --- hw/core/qdev-properties.c | 31 +- util/block-helpers.c | 46

[PATCH v10 3/7] util/vhost-user-server: generic vhost user server

2020-09-18 Thread Coiby Xu
Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Suggested-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu --- util/meson.build | 1 + util/vhost-user-server.c | 428

[PATCH v10 0/7] vhost-user block device backend implementation

2020-09-18 Thread Coiby Xu
vhost-user-blk_vhost.socket -device vhost-user-blk-pci,id=blk0,chardev=char1 And guest OS could access this vhost-user block device after mounting it. Coiby Xu (7): libvhost-user: Allow vu_message_read to be replaced libvhost-user: remove watch for kick_fd when de-initialize vu-dev util/vhost-u

[PATCH v10 1/7] libvhost-user: Allow vu_message_read to be replaced

2020-09-18 Thread Coiby Xu
Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. For slave channel, we still use the default vu_message_read. Reviewed-by: Marc-André Lureau Signed-off-by: Coiby Xu --- contrib/libvhost-user

[PATCH v10 2/7] libvhost-user: remove watch for kick_fd when de-initialize vu-dev

2020-09-18 Thread Coiby Xu
When the client is running in gdb and quit command is run in gdb, QEMU will still dispatch the event which will cause segment fault in the callback function. Signed-off-by: Coiby Xu --- contrib/libvhost-user/libvhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/libvhost

Re: Should I delete created coroutines manually?

2020-09-17 Thread Coiby Xu
On Tue, Aug 18, 2020 at 04:19:58PM +0100, Stefan Hajnoczi wrote: On Mon, Aug 17, 2020 at 2:13 PM Coiby Xu wrote: I'm working on vhost-user block device backend [1]. When I tested my patches on the latest version of QEMU (commit d0ed6a69d399ae193959225cdeaa9382746c91cc) with --enable-sanitizer

Should I delete created coroutines manually?

2020-08-17 Thread Coiby Xu
Hi, I'm working on vhost-user block device backend [1]. When I tested my patches on the latest version of QEMU (commit d0ed6a69d399ae193959225cdeaa9382746c91cc) with --enable-sanitizer turned on, the follow error will be thrown out, ==46631==ERROR: LeakSanitizer: detected memory leaks

Re: [PATCH 2/6] vhost-user-server: drop unused #include

2020-08-17 Thread Coiby Xu
On Fri, Jun 19, 2020 at 01:00:42PM +0100, Stefan Hajnoczi wrote: Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index e94a8d8a83..49ada8bc78 100644 --- a/util/vhost-user-server.c

Re: [PATCH v9 4/5] vhost-user block device backend server

2020-08-17 Thread Coiby Xu
On Thu, Jun 18, 2020 at 05:57:40PM +0200, Kevin Wolf wrote: Am 14.06.2020 um 20:39 hat Coiby Xu geschrieben: By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs

Re: [PATCH v9 2/5] generic vhost user server

2020-08-17 Thread Coiby Xu
On Thu, Jun 18, 2020 at 03:29:26PM +0200, Kevin Wolf wrote: Am 14.06.2020 um 20:39 hat Coiby Xu geschrieben: Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Signed-off-by: Coiby Xu --- util/Makefile.objs | 1 + util/vhost

Re: [PATCH v9 2/5] generic vhost user server

2020-08-17 Thread Coiby Xu
On Fri, Jun 19, 2020 at 01:13:00PM +0100, Stefan Hajnoczi wrote: On Mon, Jun 15, 2020 at 02:39:04AM +0800, Coiby Xu wrote: +/* + * a wrapper for vu_kick_cb + * + * since aio_dispatch can only pass one user data pointer to the + * callback function, pack VuDev and pvt into a struct. Then unpack

Re: [PATCH v9 0/5] vhost-user block device backend implementation

2020-08-17 Thread Coiby Xu
On Thu, Jun 18, 2020 at 09:28:44AM +0100, Stefan Hajnoczi wrote: On Tue, Jun 16, 2020 at 02:52:16PM +0800, Coiby Xu wrote: On Sun, Jun 14, 2020 at 12:16:28PM -0700, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20200614183907.514282-1-coiby...@gmail.com/ > &g

Re: [PATCH v9 5/5] new qTest case to test the vhost-user-blk-server

2020-08-17 Thread Coiby Xu
On Wed, Jun 24, 2020 at 05:14:22PM +0200, Thomas Huth wrote: On 14/06/2020 20.39, Coiby Xu wrote: This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Since vhost-user server can only server one client one time, two instances of qemu-storage-daemon

Re: [PATCH v9 0/5] vhost-user block device backend implementation

2020-06-25 Thread Coiby Xu
On Fri, Jun 19, 2020 at 01:07:46PM +0100, Stefan Hajnoczi wrote: On Mon, Jun 15, 2020 at 02:39:02AM +0800, Coiby Xu wrote: v9 - move logical block size check function to a utility function - fix issues regarding license, coding style, memory deallocation, etc. I have replied with patches

Re: [PATCH v9 0/5] vhost-user block device backend implementation

2020-06-23 Thread Coiby Xu
On Fri, Jun 19, 2020 at 01:07:46PM +0100, Stefan Hajnoczi wrote: On Mon, Jun 15, 2020 at 02:39:02AM +0800, Coiby Xu wrote: v9 - move logical block size check function to a utility function - fix issues regarding license, coding style, memory deallocation, etc. I have replied with patches

Re: [PATCH v9 5/5] new qTest case to test the vhost-user-blk-server

2020-06-23 Thread Coiby Xu
On Thu, Jun 18, 2020 at 04:17:51PM +0100, Stefan Hajnoczi wrote: On Mon, Jun 15, 2020 at 02:39:07AM +0800, Coiby Xu wrote: This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Since vhost-user server can only server one client one time, two instances

Re: [PATCH v9 0/5] vhost-user block device backend implementation

2020-06-23 Thread Coiby Xu
On Thu, Jun 18, 2020 at 09:27:48AM +0100, Stefan Hajnoczi wrote: On Tue, Jun 16, 2020 at 02:52:16PM +0800, Coiby Xu wrote: On Sun, Jun 14, 2020 at 12:16:28PM -0700, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20200614183907.514282-1-coiby...@gmail.com/ > &g

Re: [PATCH v9 1/5] Allow vu_message_read to be replaced

2020-06-23 Thread Coiby Xu
On Thu, Jun 18, 2020 at 12:43:47PM +0200, Kevin Wolf wrote: Am 14.06.2020 um 20:39 hat Coiby Xu geschrieben: Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. Signed-off-by: Coiby Xu

Re: [PATCH v8 0/4] vhost-user block device backend implementation

2020-06-16 Thread Coiby Xu
On Mon, Jun 15, 2020 at 10:46:10AM +0200, Stefano Garzarella wrote: On Mon, Jun 15, 2020 at 02:46:40AM +0800, Coiby Xu wrote: Hi Stefano Garzarella, On Thu, Jun 11, 2020 at 02:37:03PM +0200, Stefano Garzarella wrote: > Hi Coiby Xu, > > On Fri, Jun 05, 2020 at 07:35:34AM +0800, Coiby

Re: [PATCH v9 0/5] vhost-user block device backend implementation

2020-06-16 Thread Coiby Xu
On Sun, Jun 14, 2020 at 12:16:28PM -0700, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200614183907.514282-1-coiby...@gmail.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can

Re: [PATCH v8 3/4] vhost-user block device backend server

2020-06-14 Thread Coiby Xu
On Thu, Jun 11, 2020 at 04:24:52PM +0100, Stefan Hajnoczi wrote: On Fri, Jun 05, 2020 at 07:35:37AM +0800, Coiby Xu wrote: +static void coroutine_fn vu_block_virtio_process_req(void *opaque) +{ +struct req_data *data = opaque; +VuServer *server = data->server; +VuVirtq *vq = d

Re: [PATCH v8 0/4] vhost-user block device backend implementation

2020-06-14 Thread Coiby Xu
Hi Stefano Garzarella, On Thu, Jun 11, 2020 at 02:37:03PM +0200, Stefano Garzarella wrote: Hi Coiby Xu, On Fri, Jun 05, 2020 at 07:35:34AM +0800, Coiby Xu wrote: v8 - re-try connecting to socket server to fix asan error - fix license naming issue v7 - fix docker-test-debug@fedora errors

Re: [PATCH v8 2/4] generic vhost user server

2020-06-14 Thread Coiby Xu
On Thu, Jun 11, 2020 at 02:14:49PM +0100, Stefan Hajnoczi wrote: On Fri, Jun 05, 2020 at 07:35:36AM +0800, Coiby Xu wrote: +static bool coroutine_fn +vu_message_read(VuDev *vu_dev, int conn_fd, VhostUserMsg *vmsg) +{ +struct iovec iov = { +.iov_base = (char *)vmsg, +.iov_len

[PATCH v9 5/5] new qTest case to test the vhost-user-blk-server

2020-06-14 Thread Coiby Xu
will send "quit" command to qemu-storage-daemon's QMP monitor. So a function is added to libqtest.c to establish socket connection with socket server. Signed-off-by: Coiby Xu --- tests/Makefile.include | 3 +- tests/qtest/Makefile.include| 2 + tests/qtest/li

[PATCH v9 1/5] Allow vu_message_read to be replaced

2020-06-14 Thread Coiby Xu
Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. Signed-off-by: Coiby Xu --- contrib/libvhost-user/libvhost-user-glib.c | 2 +- contrib/libvhost-user/libvhost-user.c | 11

[PATCH v9 4/5] vhost-user block device backend server

2020-06-14 Thread Coiby Xu
By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- block

[PATCH v9 0/5] vhost-user block device backend implementation

2020-06-14 Thread Coiby Xu
could act as a client, $ -m 256 -object memory-backend-memfd,id=mem,size=256M,share=on -numa node,memdev=mem -chardev socket,id=char1,path=/tmp/vhost-user-blk_vhost.socket -device vhost-user-blk-pci,id=blk0,chardev=char1 And guest OS could access this vhost-user block device after mounting it. C

[PATCH v9 2/5] generic vhost user server

2020-06-14 Thread Coiby Xu
Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Signed-off-by: Coiby Xu --- util/Makefile.objs | 1 + util/vhost-user-server.c | 400 +++ util/vhost-user-server.h | 61 ++ 3 files

[PATCH v9 3/5] move logical block size check function to a common utility function

2020-06-14 Thread Coiby Xu
Move logical block size check function in hw/core/qdev-properties.c:set_blocksize() to util/block-helpers.c Signed-off-by: Coiby Xu --- hw/core/qdev-properties.c | 18 +++ util/Makefile.objs| 1 + util/block-helpers.c | 46 +++ util

Re: [PATCH v8 0/4] vhost-user block device backend implementation

2020-06-12 Thread Coiby Xu
On Thu, Jun 11, 2020 at 04:27:44PM +0100, Stefan Hajnoczi wrote: On Fri, Jun 05, 2020 at 07:35:34AM +0800, Coiby Xu wrote: v8 - re-try connecting to socket server to fix asan error - fix license naming issue Great, thanks for posting these patches! I have posted feedback. I'd like to merge

Re: [PATCH v2 08/20] qemu-storage-daemon: Add --object option

2020-06-09 Thread Coiby Xu
On Mon, Feb 24, 2020 at 03:29:56PM +0100, Kevin Wolf wrote: Add a command line option to create user-creatable QOM objects. Signed-off-by: Kevin Wolf --- qemu-storage-daemon.c | 47 +++ Makefile.objs | 2 +- qom/Makefile.objs | 1 + 3 files

Re: [PATCH v8 4/4] new qTest case to test the vhost-user-blk-server

2020-06-05 Thread Coiby Xu
On Fri, Jun 05, 2020 at 11:25:26AM +0200, Thomas Huth wrote: On 05/06/2020 08.22, Coiby Xu wrote: On Fri, Jun 05, 2020 at 07:01:33AM +0200, Thomas Huth wrote: diff --git a/tests/qtest/libqos/vhost-user-blk.h b/tests/qtest/libqos/vhost-user-blk.h new file mode 100644 index 00

Re: [PATCH v8 4/4] new qTest case to test the vhost-user-blk-server

2020-06-05 Thread Coiby Xu
On Fri, Jun 05, 2020 at 07:01:33AM +0200, Thomas Huth wrote: diff --git a/tests/qtest/libqos/vhost-user-blk.h b/tests/qtest/libqos/vhost-user-blk.h new file mode 100644 index 00..ef4ef09cca --- /dev/null +++ b/tests/qtest/libqos/vhost-user-blk.h @@ -0,0 +1,44 @@ +/* + * libqos driver

[PATCH v8 4/4] new qTest case to test the vhost-user-blk-server

2020-06-04 Thread Coiby Xu
will send "quit" command to qemu-storage-daemon's QMP monitor. So a function is added to libqtest.c to establish socket connection with socket server. Signed-off-by: Coiby Xu --- tests/Makefile.include | 3 +- tests/qtest/Makefile.include| 2 + tests/qtest/li

[PATCH v8 3/4] vhost-user block device backend server

2020-06-04 Thread Coiby Xu
By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- block

[PATCH v8 2/4] generic vhost user server

2020-06-04 Thread Coiby Xu
Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Signed-off-by: Coiby Xu --- util/Makefile.objs | 1 + util/vhost-user-server.c | 406 +++ util/vhost-user-server.h | 59 ++ 3 files

[PATCH v8 1/4] Allow vu_message_read to be replaced

2020-06-04 Thread Coiby Xu
Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. Signed-off-by: Coiby Xu --- contrib/libvhost-user/libvhost-user-glib.c | 2 +- contrib/libvhost-user/libvhost-user.c | 11

[PATCH v8 0/4] vhost-user block device backend implementation

2020-06-04 Thread Coiby Xu
ost.socket -device vhost-user-blk-pci,id=blk0,chardev=char1 And guest OS could access this vhost-user block device after mounting it. Coiby Xu (4): Allow vu_message_read to be replaced generic vhost user server vhost-user block device backend server new qTest case to test the vhost-user-

Re: [PATCH v6 4/4] new qTest case to test the vhost-user-blk-server

2020-06-04 Thread Coiby Xu
On Thu, Jun 04, 2020 at 03:49:13PM +0200, Thomas Huth wrote: On 04/06/2020 15.42, Thomas Huth wrote: + * Copyright (c) 2018 Emanuele Giuseppe Esposito Don't you want to add a remark here for you, too? + * This library is free software; you can redistribute it and/or + * modify it under the

[PATCH v7 2/4] generic vhost user server

2020-06-04 Thread Coiby Xu
Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Signed-off-by: Coiby Xu --- util/Makefile.objs | 1 + util/vhost-user-server.c | 406 +++ util/vhost-user-server.h | 59 ++ 3 files

[PATCH v7 4/4] new qTest case to test the vhost-user-blk-server

2020-06-04 Thread Coiby Xu
will send "quit" command to qemu-storage-daemon's QMP monitor. So a function is added to libqtest.c to establish socket connection with socket server. Signed-off-by: Coiby Xu --- tests/Makefile.include | 3 +- tests/qtest/Makefile.include| 2 + tests/qtest/li

[PATCH v7 3/4] vhost-user block device backend server

2020-06-04 Thread Coiby Xu
By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- block

[PATCH v7 0/4] vhost-user block device backend implementation

2020-06-04 Thread Coiby Xu
this vhost-user block device after mounting it. Coiby Xu (5): allow vu_message_read to be replaced generic vhost user server vhost-user block device backend server new qTest case to test the vhost-user-blk-server block/Makefile.objs| 1 + block/export/vhos

[PATCH v7 1/4] Allow vu_message_read to be replaced

2020-06-04 Thread Coiby Xu
Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. Signed-off-by: Coiby Xu --- contrib/libvhost-user/libvhost-user-glib.c | 2 +- contrib/libvhost-user/libvhost-user.c | 11

[PATCH v6 3/4] vhost-user block device backend server

2020-05-30 Thread Coiby Xu
By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- block

[PATCH v6 2/4] generic vhost user server

2020-05-30 Thread Coiby Xu
Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Signed-off-by: Coiby Xu --- util/Makefile.objs | 1 + util/vhost-user-server.c | 404 +++ util/vhost-user-server.h | 59 ++ 3 files

[PATCH v6 1/4] Allow vu_message_read to be replaced

2020-05-30 Thread Coiby Xu
Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. Signed-off-by: Coiby Xu --- contrib/libvhost-user/libvhost-user-glib.c | 2 +- contrib/libvhost-user/libvhost-user.c | 11

[PATCH v6 4/4] new qTest case to test the vhost-user-blk-server

2020-05-30 Thread Coiby Xu
will send "quit" command to qemu-storage-daemon's QMP monitor. So a function is added to libqtest.c to establish socket connection with socket server. Signed-off-by: Coiby Xu --- tests/Makefile.include | 3 +- tests/qtest/Makefile.include| 2 + tests/qtest/li

[PATCH v6 0/4] vhost-user block device backend implementation

2020-05-30 Thread Coiby Xu
v6 - add missing license header and include guard - vhost-user server only serve one client one time - a bug fix in custom vu_message_read - using qemu-storage-daemon to start vhost-user-blk-server - a bug fix to pass docker-test-clang@ubuntu Coiby Xu (4): Allow vu_message_read

Re: [PATCH v2 08/20] qemu-storage-daemon: Add --object option

2020-04-15 Thread Coiby Xu
Hi Kevin, I tried to start vhost-user block device backend server with the following command, $ qemu-storage-daemon --blockdev driver=file,node-name=disk,filename=file.img,read-only=off \ --object

Replace GSource with AioContext for chardev

2020-04-09 Thread Coiby Xu
Hi, I'm now implementing vhost-user block device backend https://patchew.org/QEMU/20200309100342.14921-1-coiby...@gmail.com/ and want to use chardev to help manage vhost-user client connections and read socket message. However there are two issues that need to be addressed. Firstly, chardev

[PATCH v5 2/5] generic vhost user server

2020-03-09 Thread Coiby Xu
Sharing QEMU devices via vhost-user protocol Signed-off-by: Coiby Xu --- util/Makefile.objs | 3 + util/vhost-user-server.c | 360 +++ util/vhost-user-server.h | 57 ++ 3 files changed, 420 insertions(+) create mode 100644 util/vhost-user

[PATCH v5 5/5] new qTest case to test the vhost-user-blk-server

2020-03-09 Thread Coiby Xu
This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Signed-off-by: Coiby Xu --- tests/Makefile.include | 3 +- tests/qtest/Makefile.include| 2 + tests/qtest/libqos/vhost-user-blk.c | 126 + tests/qtest/libqos/vhost-user

[PATCH v5 1/5] allow vu_message_read to be replaced

2020-03-09 Thread Coiby Xu
the event. When vu_kick_cb is trying to access vq->kick_fd, a segmentation fault will occur since vq has become a NULL pointer. Signed-off-by: Coiby Xu --- contrib/libvhost-user/libvhost-user-glib.c | 2 +- contrib/libvhost-user/libvhost-user.c | 11 ++- contrib/libvhost-user/libvh

[PATCH v5 3/5] vhost-user block device backend server

2020-03-09 Thread Coiby Xu
By making use of libvhost, multiple block device drives can be exported and each drive can serve multiple clients simultaneously. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- block/Makefile.objs

[PATCH v5 4/5] a standone-alone tool to directly share disk image file via vhost-user protocol

2020-03-09 Thread Coiby Xu
this tool after his patches are merged into the mainline QEMU. Signed-off-by: Coiby Xu --- Makefile | 4 + configure | 3 + qemu-vu.c | 252 ++ 3 files changed, 259 insertions(+) create mode 100644 qemu-vu.c diff --git a/Makefile b/Makefile

[PATCH v5 0/5] vhost-user block device backend implementation

2020-03-09 Thread Coiby Xu
ock device after mouting it. Coiby Xu (5): allow vu_message_read to be replaced generic vhost user server vhost-user block device backend server a standone-alone tool to directly share disk image file via vhost-user protocol new qTest case to test the vhost-user-blk-server

Re: [PATCH v4 2/5] generic vhost user server

2020-02-27 Thread Coiby Xu
function. In v5, I plan to use aio_set_fd_handler to set a read hander which is a wrapper for vu_kick_cb to deal with kick events since eventfd doesn't have the short read issue like socket. Thus vu_kick_cb in libvhost-user can be re-used. My only concern is if this could lead to worse performance in

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Coiby Xu
allow vu_message_read to be replaced by one which will depend on the main QEMU code. I'm not sure which way is better. On Thu, Feb 27, 2020 at 6:02 PM Kevin Wolf wrote: > > Am 27.02.2020 um 10:53 hat Coiby Xu geschrieben: > > Thank you for reminding me of this socket short read issue!

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-27 Thread Coiby Xu
reading from socket util getting enough bytes. I assume short read is a rare case thus introduced performance penalty would be negligible. On Thu, Feb 27, 2020 at 3:41 PM Stefan Hajnoczi wrote: > > On Wed, Feb 26, 2020 at 11:18:41PM +0800, Coiby Xu wrote: > > Hi Stefan, >

Re: [PATCH v4 0/5] vhost-user block device backend implementation

2020-02-26 Thread Coiby Xu
u, Feb 20, 2020 at 1:58 AM Stefan Hajnoczi wrote: > > On Tue, Feb 18, 2020 at 01:07:06PM +0800, Coiby Xu wrote: > > v4: > > * add object properties in class_init > > * relocate vhost-user-blk-test > > * other changes including using SocketAddress, coding style, etc. &

Re: [PATCH v2 1/5] vhost-user block device backend

2020-02-20 Thread Coiby Xu
the more obvious > things while I familiarise myself with your code. I intend to review it > in more detail later (either in a second pass for this series, or when > you post v3). > > Am 14.01.2020 um 15:06 hat Coiby Xu geschrieben: > > By making use of libvhost, multipl

Re: [PATCH v2 1/5] vhost-user block device backend

2020-02-19 Thread Coiby Xu
v4 all suggestions have been applied. Thank you! On Thu, Jan 16, 2020 at 9:56 PM Kevin Wolf wrote: > > Hi, > > I'm only doing a quick first review pointing out the more obvious > things while I familiarise myself with your code. I intend to review it > in more detail later (eithe

[PATCH v4 5/5] new qTest case to test the vhost-user-blk-server

2020-02-17 Thread Coiby Xu
This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Signed-off-by: Coiby Xu --- tests/Makefile.include | 3 +- tests/qtest/Makefile.include| 2 + tests/qtest/libqos/vhost-user-blk.c | 126 + tests/qtest/libqos/vhost-user

[PATCH v4 3/5] vhost-user block device backend server

2020-02-17 Thread Coiby Xu
By making use of libvhost, multiple block device drives can be exported and each drive can serve multiple clients simultaneously. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- Makefile.target

[PATCH v4 2/5] generic vhost user server

2020-02-17 Thread Coiby Xu
Sharing QEMU devices via vhost-user protocol Signed-off-by: Coiby Xu --- util/Makefile.objs | 3 + util/vhost-user-server.c | 427 +++ util/vhost-user-server.h | 56 + 3 files changed, 486 insertions(+) create mode 100644 util/vhost-user

[PATCH v4 4/5] a standone-alone tool to directly share disk image file via vhost-user protocol

2020-02-17 Thread Coiby Xu
to replace this tool. Signed-off-by: Coiby Xu --- Makefile | 4 + configure | 3 + qemu-vu.c | 252 ++ 3 files changed, 259 insertions(+) create mode 100644 qemu-vu.c diff --git a/Makefile b/Makefile index b5a7377cb1..74fb109675 100644

[PATCH v4 1/5] extend libvhost to support IOThread and coroutine

2020-02-17 Thread Coiby Xu
Previously libvhost dispatch events in its own GMainContext. Now vhost-user client's kick event can be dispatched in block device drive's AioContext thus IOThread is supported. And also allow vu_message_read and vu_kick_cb to be replaced so QEMU can run them as coroutines. Signed-off-by: Coiby Xu

[PATCH v4 0/5] vhost-user block device backend implementation

2020-02-17 Thread Coiby Xu
vhost-user block device after mouting it. Coiby Xu (5): extend libvhost to support IOThread and coroutine generic vhost user server vhost-user block device backend server a standone-alone tool to directly share disk image file via vhost-user protocol new qTest case to test the vhos

Re: [PATCH v2 1/5] vhost-user block device backend

2020-02-13 Thread Coiby Xu
n VubDev. Currently, I don't use chardev as an object property of vhost-user-blk-server. So actually multiple clients can be connected simutaneously. All the other suggestions have been adopted in v3. Thank you for your advice! On Thu, Jan 16, 2020 at 9:51 PM Stefan Hajnoczi wrote: > > On Tue

Re: [PATCH v3 4/5] a standone-alone tool to directly share disk image file via vhost-user protocol

2020-02-12 Thread Coiby Xu
=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=./qemu-img QTEST_QEMU_VU_BINARY=./qemu-vu tests/qos-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="qos-test" On Wed, Feb 12, 2020 at 5:52 PM Co

Re: [PATCH v2 3/5] a standone-alone tool to directly share disk image file via vhost-user protocol

2020-02-12 Thread Coiby Xu
es easier for implementing block-export-add QMP command. But in later versions, only object_add/object_del syntax is supported to start/stop vhost-user-blk-server. I'll keep an eye on how the storage daemon develops and adapt my code accordingly. On Sun, Feb 2, 2020 at 5:33 PM Kevin Wolf wro

[PATCH v3 5/5] new qTest case to test the vhost-user-blk-server

2020-02-12 Thread Coiby Xu
This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Signed-off-by: Coiby Xu --- tests/libqos/vhost-user-blk.c | 126 ++ tests/libqos/vhost-user-blk.h | 44 +++ tests/vhost-user-blk-test.c | 694 ++ 3 files

[PATCH v3 4/5] a standone-alone tool to directly share disk image file via vhost-user protocol

2020-02-12 Thread Coiby Xu
to replace this tool. Signed-off-by: Coiby Xu --- Makefile | 4 + configure | 3 + qemu-vu.c | 252 ++ 3 files changed, 259 insertions(+) create mode 100644 qemu-vu.c diff --git a/Makefile b/Makefile index f0e1a2fc1d..0bfd2f1ddd 100644

[PATCH v3 3/5] vhost-user block device backend server

2020-02-12 Thread Coiby Xu
By making use of libvhost, multiple block device drives can be exported and each drive can serve multiple clients simultaneously. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- Makefile.target

[PATCH v3 1/5] extend libvhost to support IOThread and coroutine

2020-02-12 Thread Coiby Xu
Previously libvhost dispatch events in its own GMainContext. Now vhost-user client's kick event can be dispatched in block device drive's AioContext thus IOThread is supported. And also allow vu_message_read and vu_kick_cb to be replaced so QEMU can run them as coroutines. Signed-off-by: Coiby Xu

[PATCH v3 2/5] generic vhost user server

2020-02-12 Thread Coiby Xu
Sharing QEMU devices via vhost-user protocol Signed-off-by: Coiby Xu --- util/Makefile.objs | 3 + util/vhost-user-server.c | 429 +++ util/vhost-user-server.h | 56 + 3 files changed, 489 insertions(+) create mode 100644 util/vhost-user

[PATCH v3 0/5] vhost-user block device backend implementation

2020-02-12 Thread Coiby Xu
memdev=mem -chardev socket,id=char1,path=/tmp/vhost-user-blk_vhost.socket -device vhost-user-blk-pci,id=blk0,chardev=char1 And guest OS could access this vhost-user block device after mouting it. Coiby Xu (5): extend libvhost to support IOThread and coroutine generic vhost user server vhost-

Re: [PATCH v2 3/5] a standone-alone tool to directly share disk image file via vhost-user protocol

2020-01-31 Thread Coiby Xu
"? On Fri, Jan 17, 2020 at 6:12 PM Kevin Wolf wrote: > > Am 17.01.2020 um 09:12 hat Coiby Xu geschrieben: > > Excellent! I will add an option (or object property) for > > vhost-user-blk server oject which will tell the daemon process to exit > > when the client dis

Re: [PATCH v2 3/5] a standone-alone tool to directly share disk image file via vhost-user protocol

2020-01-17 Thread Coiby Xu
age of it? Or should I apply the RFC PATCHes to my working branch directly and submit them together with the patches on vhost-user-blk server feature when posting v3? On Thu, Jan 16, 2020 at 10:04 PM Stefan Hajnoczi wrote: > > On Tue, Jan 14, 2020 at 10:06:18PM +0800, Coiby Xu wrote: &

Re: [PATCH v1 0/5] vhost-user block device backend implementation

2020-01-14 Thread Coiby Xu
It fails MinGW because libvhost-user depends on eventfd which is a Linux-specific feature. Now fixed in v2. On Mon, Jan 13, 2020 at 1:21 PM wrote: > Patchew URL: > https://patchew.org/QEMU/20200113045704.12318-1-coiby...@gmail.com/ > > > > Hi, > > This series failed the docker-mingw@fedora

[PATCH v2 3/5] a standone-alone tool to directly share disk image file via vhost-user protocol

2020-01-14 Thread Coiby Xu
vhost-user-blk can have played as vhost-user backend but it only supports raw file and don't support VIRTIO_BLK_T_DISCARD and VIRTIO_BLK_T_WRITE_ZEROES operations on raw file (ioctl(fd, BLKDISCARD) is only valid for real block device). Signed-off-by: Coiby Xu --- qemu-vu.c | 264

  1   2   >