Re: [PATCH v2 1/2] fuzz: add virtio-blk fuzz target

2020-11-13 Thread Dima Stepanov
On Mon, Nov 09, 2020 at 01:24:20PM +0100, Thomas Huth wrote: > On 09/11/2020 12.25, Dima Stepanov wrote: > > The virtio-blk fuzz target sets up and fuzzes the available virtio-blk > > queues. The implementation is based on two files: > > - tests/qtest/fuzz/virtio_scsi_fuzz.

[PATCH v2 1/2] fuzz: add virtio-blk fuzz target

2020-11-09 Thread Dima Stepanov
The virtio-blk fuzz target sets up and fuzzes the available virtio-blk queues. The implementation is based on two files: - tests/qtest/fuzz/virtio_scsi_fuzz.c - tests/qtest/virtio_blk_test.c Signed-off-by: Dima Stepanov Reviewed-by: Alexander Bulekov --- tests/qtest/fuzz/meson.build

[PATCH v2 2/2] docs/fuzz: update make and run command lines

2020-11-09 Thread Dima Stepanov
After meson and some other build changes the qemu fuzz target should be build as: make qemu-fuzz-i386 And also update the run path command line. Signed-off-by: Dima Stepanov Reviewed-by: Alexander Bulekov --- docs/devel/fuzzing.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH v2 0/2] fuzz: add virtio-blk fuzz target

2020-11-09 Thread Dima Stepanov
n. Also make a small update to the documentation to fix build/run command lines after meson and build changes in QEMU. Dima Stepanov (2): fuzz: add virtio-blk fuzz target docs/fuzz: update make and run command lines docs/devel/fuzzing.txt | 6 +- tests/qtest/fuzz/meson.buil

Re: [PATCH v1 1/2] fuzz: add virtio-blk fuzz target

2020-10-14 Thread Dima Stepanov
On Wed, Oct 14, 2020 at 10:29:41AM +0300, Dima Stepanov wrote: > On Tue, Oct 13, 2020 at 11:30:52AM -0400, Alexander Bulekov wrote: > > On 201007 1647, Dima Stepanov wrote: > > > The virtio-blk fuzz target sets up and fuzzes the available virtio-blk > > > queues. The imp

Re: [PATCH v1 1/2] fuzz: add virtio-blk fuzz target

2020-10-14 Thread Dima Stepanov
On Tue, Oct 13, 2020 at 11:30:52AM -0400, Alexander Bulekov wrote: > On 201007 1647, Dima Stepanov wrote: > > The virtio-blk fuzz target sets up and fuzzes the available virtio-blk > > queues. The implementation is based on two files: > > - tests/qtest/fuzz/virtio_scsi_fuzz.

Re: [PATCH v5 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-10-07 Thread Dima Stepanov
On Tue, Sep 29, 2020 at 12:48:38PM +0300, Dima Stepanov wrote: > On Tue, Sep 29, 2020 at 03:13:09AM -0400, Michael S. Tsirkin wrote: > > On Sun, Sep 27, 2020 at 09:48:28AM +0300, Dima Stepanov wrote: > > > On Thu, Sep 24, 2020 at 07:26:14AM -0400, Michael S. Tsirkin wrote: >

[PATCH v1 2/2] docs/fuzz: update make and run command lines

2020-10-07 Thread Dima Stepanov
After meson and some other build changes the qemu fuzz target should be build as: make qemu-fuzz-i386 And also update the run path command line. Signed-off-by: Dima Stepanov --- docs/devel/fuzzing.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/devel

[PATCH v1 1/2] fuzz: add virtio-blk fuzz target

2020-10-07 Thread Dima Stepanov
The virtio-blk fuzz target sets up and fuzzes the available virtio-blk queues. The implementation is based on two files: - tests/qtest/fuzz/virtio_scsi_fuzz.c - tests/qtest/virtio_blk_test.c Signed-off-by: Dima Stepanov --- tests/qtest/fuzz/meson.build | 1 + tests/qtest/fuzz

[PATCH v1 0/2] fuzz: add virtio-blk fuzz target

2020-10-07 Thread Dima Stepanov
Based on the current virtio-scsi-fuzz target implement new virtio-blk fuzz target. Use a virtio_blk_test.c file as a reference for the block device initialization. Also make a small update to the documentation to fix build/run command lines after meson and build changes in QEMU. Dima Stepanov (2

Re: [PATCH v5 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-09-29 Thread Dima Stepanov
On Tue, Sep 29, 2020 at 03:13:09AM -0400, Michael S. Tsirkin wrote: > On Sun, Sep 27, 2020 at 09:48:28AM +0300, Dima Stepanov wrote: > > On Thu, Sep 24, 2020 at 07:26:14AM -0400, Michael S. Tsirkin wrote: > > > On Fri, Sep 11, 2020 at 11:39:42AM +0300, Dima Stepanov wrote

Re: [PATCH v5 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-09-27 Thread Dima Stepanov
On Thu, Sep 24, 2020 at 07:26:14AM -0400, Michael S. Tsirkin wrote: > On Fri, Sep 11, 2020 at 11:39:42AM +0300, Dima Stepanov wrote: > > v4 -> v5: > > - vhost: check queue state in the vhost_dev_set_log routine > > tests/qtest/vhost-user-test: prepare the tests fo

Re: [PATCH v5 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-09-21 Thread Dima Stepanov
On Mon, Sep 21, 2020 at 07:04:20PM -0400, Raphael Norwitz wrote: > MST already sent a PR with all the patches :) Thank you! ) > > On Wed, Sep 16, 2020 at 6:13 PM Dima Stepanov wrote: > > > > On Mon, Sep 14, 2020 at 09:23:42PM -0400, Raphael Norwitz wrote: > > > O

Re: [PATCH v5 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-09-16 Thread Dima Stepanov
On Mon, Sep 14, 2020 at 09:23:42PM -0400, Raphael Norwitz wrote: > On Fri, Sep 11, 2020 at 4:43 AM Dima Stepanov wrote: > > > > Add support for the vhost-user-blk-pci device. This node can be used by > > the vhost-user-blk tests. Tests for the vhost-user-blk device are added

[PATCH v5 7/7] tests/qtest/vhost-user-test: enable the reconnect tests

2020-09-11 Thread Dima Stepanov
For now a QTEST_VHOST_USER_FIXME environment variable is used to separate reconnect tests for the vhost-user-net device. Looks like the reconnect functionality is pretty stable, so this separation is deprecated. Remove it and enable these tests for the default run. Signed-off-by: Dima Stepanov

[PATCH v5 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-09-11 Thread Dima Stepanov
Add vhost_user_ops structure for the vhost-user-blk device class. Add the test_reconnect and test_migrate tests for this device. Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz --- tests/qtest/vhost-user-test.c | 139 +- 1 file changed, 137

[PATCH v5 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-09-11 Thread Dima Stepanov
Add support for the vhost-user-blk-pci device. This node can be used by the vhost-user-blk tests. Tests for the vhost-user-blk device are added in the following patches. Signed-off-by: Dima Stepanov --- tests/qtest/libqos/virtio-blk.c | 14 +- 1 file changed, 13 insertions(+), 1

[PATCH v5 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-09-11 Thread Dima Stepanov
devices. This migration issue was slightly discussed earlier: - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c

[PATCH v5 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class

2020-09-11 Thread Dima Stepanov
line or make a proper vhost-user responses. Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz --- tests/qtest/vhost-user-test.c | 105 ++ 1 file changed, 76 insertions(+), 29 deletions(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest

[PATCH v5 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-09-11 Thread Dima Stepanov
gration_log() routine before returning from the function. qtest framework was updated to test vhost-user-blk functionality. The vhost-user-blk/vhost-user-blk-tests/migrate_reconnect test was added to reproduce the original issue found. Dima Stepanov (7): vhost: recheck dev state in the vhost_migr

[PATCH v5 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-09-11 Thread Dima Stepanov
() function call. Add the same check to the vhost_dev_set_log() routine. Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz --- hw/virtio/vhost.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index ffef7ab..a08b7d8 100644 --- a/hw/virtio

[PATCH v5 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test

2020-09-11 Thread Dima Stepanov
Add new migrate_reconnect test for the vhost-user-blk device. Perform a disconnect after sending response for the VHOST_USER_SET_LOG_BASE command. Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz --- tests/qtest/vhost-user-test.c | 25 + 1 file changed, 25

Re: [PATCH v4 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-09-10 Thread Dima Stepanov
On Tue, Sep 08, 2020 at 03:25:20PM +0100, Stefan Hajnoczi wrote: > On Fri, Sep 04, 2020 at 12:31:13PM +0300, Dima Stepanov wrote: > > vhost-user devices can get a disconnect in the middle of the VHOST-USER > > handshake on the migration start. If disconnect event happened right >

Re: [PATCH v4 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-09-09 Thread Dima Stepanov
On Tue, Sep 08, 2020 at 11:03:56PM -0400, Raphael Norwitz wrote: > On Fri, Sep 4, 2020 at 5:35 AM Dima Stepanov wrote: > > > > Add vhost_user_ops structure for the vhost-user-blk device class. Add > > the test_reconnect and test_migrate tests for this device. > > >

Re: [PATCH v4 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-09-09 Thread Dima Stepanov
On Tue, Sep 08, 2020 at 11:01:57PM -0400, Raphael Norwitz wrote: > On Fri, Sep 4, 2020 at 5:34 AM Dima Stepanov wrote: > > > > Add support for the vhost-user-blk-pci device. This node can be used by > > the vhost-user-blk tests. Tests for the vhost-user-blk device are added

[PATCH v4 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test

2020-09-04 Thread Dima Stepanov
Add new migrate_reconnect test for the vhost-user-blk device. Perform a disconnect after sending response for the VHOST_USER_SET_LOG_BASE command. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tests

[PATCH v4 7/7] tests/qtest/vhost-user-test: enable the reconnect tests

2020-09-04 Thread Dima Stepanov
For now a QTEST_VHOST_USER_FIXME environment variable is used to separate reconnect tests for the vhost-user-net device. Looks like the reconnect functionality is pretty stable, so this separation is deprecated. Remove it and enable these tests for the default run. Signed-off-by: Dima Stepanov

[PATCH v4 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-09-04 Thread Dima Stepanov
Add vhost_user_ops structure for the vhost-user-blk device class. Add the test_reconnect and test_migrate tests for this device. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 139 +- 1 file changed, 137 insertions(+), 2 deletions

[PATCH v4 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-09-04 Thread Dima Stepanov
Add support for the vhost-user-blk-pci device. This node can be used by the vhost-user-blk tests. Tests for the vhost-user-blk device are added in the following patches. Signed-off-by: Dima Stepanov --- tests/qtest/libqos/virtio-blk.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH v4 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-09-04 Thread Dima Stepanov
The vhost-user-blk/vhost-user-blk-tests/migrate_reconnect test was added to reproduce the original issue found. Dima Stepanov (7): vhost: recheck dev state in the vhost_migration_log routine vhost: check queue state in the vhost_dev_set_log routine tests/qtest/vhost-user-test: prepare the

[PATCH v4 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class

2020-09-04 Thread Dima Stepanov
line or make a proper vhost-user responses. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 105 ++ 1 file changed, 76 insertions(+), 29 deletions(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index 9ee0f1e

[PATCH v4 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-09-04 Thread Dima Stepanov
devices. This migration issue was slightly discussed earlier: - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c

[PATCH v4 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-09-04 Thread Dima Stepanov
() function call. Add the same check to the vhost_dev_set_log() routine. Signed-off-by: Dima Stepanov --- hw/virtio/vhost.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index ffef7ab..a08b7d8 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio

Re: [PATCH v2 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-09-01 Thread Dima Stepanov
On Mon, Aug 31, 2020 at 11:22:14PM -0400, Raphael Norwitz wrote: > On Mon, Aug 31, 2020 at 4:37 AM Dima Stepanov wrote: > > > > On Thu, Aug 27, 2020 at 09:46:03PM -0400, Raphael Norwitz wrote: > > > On Mon, Aug 24, 2020 at 4:41 AM Dima Stepanov > > > wrote: >

[PATCH v3 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test

2020-08-31 Thread Dima Stepanov
Add new migrate_reconnect test for the vhost-user-blk device. Perform a disconnect after sending response for the VHOST_USER_SET_LOG_BASE command. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tests

[PATCH v3 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-08-31 Thread Dima Stepanov
Add vhost_user_ops structure for the vhost-user-blk device class. Add the test_reconnect and test_migrate tests for this device. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 139 +- 1 file changed, 137 insertions(+), 2 deletions

[PATCH v3 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-08-31 Thread Dima Stepanov
Add support for the vhost-user-blk-pci device. This node can be used by the vhost-user-blk tests. Tests for the vhost-user-blk device are added in the following patches. Signed-off-by: Dima Stepanov --- tests/qtest/libqos/virtio-blk.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH v3 7/7] tests/qtest/vhost-user-test: enable the reconnect tests

2020-08-31 Thread Dima Stepanov
For now a QTEST_VHOST_USER_FIXME environment variable is used to separate reconnect tests for the vhost-user-net device. Looks like the reconnect functionality is pretty stable, so this separation is deprecated. Remove it and enable these tests for the default run. Signed-off-by: Dima Stepanov

[PATCH v3 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class

2020-08-31 Thread Dima Stepanov
line or make a proper vhost-user responses. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 105 ++ 1 file changed, 76 insertions(+), 29 deletions(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index 9ee0f1e

[PATCH v3 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-08-31 Thread Dima Stepanov
-user-blk functionality. The vhost-user-blk/vhost-user-blk-tests/migrate_reconnect test was added to reproduce the original issue found. Dima Stepanov (7): vhost: recheck dev state in the vhost_migration_log routine vhost: check queue state in the vhost_dev_set_log routine tests/qtest/vhos

[PATCH v3 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-08-31 Thread Dima Stepanov
() function call. Add the same check to the vhost_dev_set_log() routine. Signed-off-by: Dima Stepanov --- hw/virtio/vhost.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index ffef7ab..a33ffd4 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio

[PATCH v3 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-08-31 Thread Dima Stepanov
devices. This migration issue was slightly discussed earlier: - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html Signed-off-by: Dima Stepanov --- hw/block/vhost-user-blk.c | 19

Re: [PATCH v2 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-08-31 Thread Dima Stepanov
On Thu, Aug 27, 2020 at 09:46:03PM -0400, Raphael Norwitz wrote: > On Mon, Aug 24, 2020 at 4:41 AM Dima Stepanov wrote: > > > > If the vhost-user-blk daemon provides only one virtqueue, but device was > > added with several queues, then QEMU will send more VHOST-USER comm

Re: [PATCH v2 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-08-31 Thread Dima Stepanov
On Thu, Aug 27, 2020 at 09:44:22PM -0400, Raphael Norwitz wrote: > Generally I’m happy with this. Some comments: > > On Mon, Aug 24, 2020 at 4:40 AM Dima Stepanov wrote: > > > > vhost-user devices can get a disconnect in the middle of the VHOST-USER > > hands

Re: [PATCH 00/12] Add a General Virtual Device Fuzzer

2020-08-26 Thread Dima Stepanov
Hi Alex, Thanks for the nice general fuzzer implementation, looks pretty exciting. Are there any future plans discussion which i can read or maybe join? I have some ideas about it so it could be great to syncronize. Regards, Dima. On Wed, Jul 22, 2020 at 11:39:21PM -0400, Alexander Bulekov

[PATCH v2 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-08-24 Thread Dima Stepanov
Add support for the vhost-user-blk-pci device. This node can be used by the vhost-user-blk tests. Tests for the vhost-user-blk device are added in the following patches. Signed-off-by: Dima Stepanov --- tests/qtest/libqos/virtio-blk.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH v2 7/7] tests/qtest/vhost-user-test: enable the reconnect tests

2020-08-24 Thread Dima Stepanov
For now a QTEST_VHOST_USER_FIXME environment variable is used to separate reconnect tests for the vhost-user-net device. Looks like the reconnect functionality is pretty stable, so this separation is deprecated. Remove it and enable these tests for the default run. Signed-off-by: Dima Stepanov

[PATCH v2 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test

2020-08-24 Thread Dima Stepanov
Add new migrate_reconnect test for the vhost-user-blk device. Perform a disconnect after sending response for the VHOST_USER_SET_LOG_BASE command. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tests

[PATCH v2 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class

2020-08-24 Thread Dima Stepanov
line or make a proper vhost-user responses. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 105 ++ 1 file changed, 76 insertions(+), 29 deletions(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index 9ee0f1e

[PATCH v2 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-08-24 Thread Dima Stepanov
Add vhost_user_ops structure for the vhost-user-blk device class. Add the test_reconnect and test_migrate tests for this device. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 140 +- 1 file changed, 138 insertions(+), 2 deletions

[PATCH v2 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-08-24 Thread Dima Stepanov
() function call. Add the same check to the vhost_dev_set_log() routine. Signed-off-by: Dima Stepanov --- hw/virtio/vhost.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index ffef7ab..a33ffd4 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio

[PATCH v2 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-08-24 Thread Dima Stepanov
t test was added to reproduce the original issue found. Dima Stepanov (7): vhost: recheck dev state in the vhost_migration_log routine vhost: check queue state in the vhost_dev_set_log routine tests/qtest/vhost-user-test: prepare the tests for adding new dev class tests/qtest/libqos/virtio-

[PATCH v2 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-08-24 Thread Dima Stepanov
is just to make the same connect/disconnect code for all the vhost-user devices. This migration issue was slightly discussed earlier: - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html Signed-off-by: Dima

Re: [PATCH v1 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-08-04 Thread Dima Stepanov
On Tue, Aug 04, 2020 at 10:19:17AM -0400, Michael S. Tsirkin wrote: > On Tue, Aug 04, 2020 at 01:36:45PM +0300, Dima Stepanov wrote: > > Reference e-mail threads: > > - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html > > - https://lists.gnu.org/archive

[PATCH v1 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test

2020-08-04 Thread Dima Stepanov
Add new migrate_reconnect test for the vhost-user-blk device. Perform a disconnect after sending response for the VHOST_USER_SET_LOG_BASE command. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tests

[PATCH v1 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-08-04 Thread Dima Stepanov
is just to make the same connect/disconnect code for all the vhost-user devices. This migration issue was slightly discussed earlier: - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html Signed-off-by: Dima

[PATCH v1 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-08-04 Thread Dima Stepanov
Add support for the vhost-user-blk-pci device. This node can be used by the vhost-user-blk tests. Tests for the vhost-user-blk device are added in the following patches. Signed-off-by: Dima Stepanov --- tests/qtest/libqos/virtio-blk.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH v1 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-08-04 Thread Dima Stepanov
Add vhost_user_ops structure for the vhost-user-blk device class. Add the test_reconnect and test_migrate tests for this device. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 140 +- 1 file changed, 138 insertions(+), 2 deletions

[PATCH v1 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class

2020-08-04 Thread Dima Stepanov
line or make a proper vhost-user responses. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 105 ++ 1 file changed, 76 insertions(+), 29 deletions(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index 9ee0f1e

[PATCH v1 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-08-04 Thread Dima Stepanov
() function call. Add the same check to the vhost_dev_set_log() routine. Signed-off-by: Dima Stepanov --- hw/virtio/vhost.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index ffef7ab..a33ffd4 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio

[PATCH v1 7/7] tests/qtest/vhost-user-test: enable the reconnect tests

2020-08-04 Thread Dima Stepanov
For now a QTEST_VHOST_USER_FIXME environment variable is used to separate reconnect tests for the vhost-user-net device. Looks like the reconnect functionality is pretty stable, so this separation is deprecated. Remove it and enable these tests for the default run. Signed-off-by: Dima Stepanov

[PATCH v1 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-08-04 Thread Dima Stepanov
vhost-user-blk functionality. The vhost-user-blk/vhost-user-blk-tests/migrate_reconnect test was added to reproduce the original issue found. Dima Stepanov (7): vhost: recheck dev state in the vhost_migration_log routine vhost: check queue state in the vhost_dev_set_log routine tests/qtest

Re: [RFC PATCH 0/3] fuzz: add generic fuzzer

2020-06-25 Thread Dima Stepanov
On Tue, Jun 23, 2020 at 03:16:01PM +0100, Stefan Hajnoczi wrote: > On Thu, Jun 11, 2020 at 01:56:48AM -0400, Alexander Bulekov wrote: > > These patches add a generic fuzzer for virtual devices. This should > > allow us to fuzz devices that accept inputs over MMIO, PIO and DMA > > without any

Re: [PATCH v4 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-06-02 Thread Dima Stepanov
On Sat, May 30, 2020 at 08:55:30PM -0400, Raphael Norwitz wrote: > On Thu, May 28, 2020 at 5:13 AM Dima Stepanov wrote: > > > > A socket write during vhost-user communication may trigger a disconnect > > event, calling vhost_user_blk_disconnect() and clearing all the >

[PATCH v4 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-05-28 Thread Dima Stepanov
e7c83a885f865128ae3cf1946f8cb538b63cbfba "vhost-user: delay vhost_user_stop" Signed-off-by: Dima Stepanov --- hw/block/vhost-user-blk.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 9d8c0b

[PATCH v4 1/2] char-socket: return -1 in case of disconnect during tcp_chr_write

2020-05-28 Thread Dima Stepanov
is that vhost_user_write doesn't get an error after disconnect and try to call vhost_user_read(). The tcp_chr_write() routine should return -1 in case of disconnect. Indicate the EIO error if this routine is called in the disconnected state. Signed-off-by: Dima Stepanov Reviewed-by: Marc-André Lu

[PATCH v4 0/2] vhost-user reconnect issues during vhost initialization

2020-05-28 Thread Dima Stepanov
arts. Also to trigger different code paths disconnect should be simulated in two ways: - before any successful initialization - make successful initialization once and try to simulate disconnects Also we catch SIGABRT on the migration start if vhost-user daemon disconnected during vhost-user set log comma

Re: [PATCH v3 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-05-25 Thread Dima Stepanov
On Wed, May 20, 2020 at 06:53:13PM +0300, Dima Stepanov wrote: > A socket write during vhost-user communication may trigger a disconnect > event, calling vhost_user_blk_disconnect() and clearing all the > vhost_dev structures holding data that vhost-user functions expect to > remain v

Re: [PATCH v3 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-05-25 Thread Dima Stepanov
On Mon, May 25, 2020 at 12:00:10AM -0400, Raphael Norwitz wrote: > I'm mostly happy with this. A couple comments. > > On Wed, May 20, 2020 at 11:54 AM Dima Stepanov > wrote: > > > > A socket write during vhost-user communication may trigger a disco

Re: [PATCH v3 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-05-25 Thread Dima Stepanov
On Mon, May 25, 2020 at 11:31:16AM +0800, Jason Wang wrote: > > On 2020/5/20 下午11:53, Dima Stepanov wrote: > >A socket write during vhost-user communication may trigger a disconnect > >event, calling vhost_user_blk_disconnect() and clearing all the > >vhost_dev structures

[PATCH v3 1/2] char-socket: return -1 in case of disconnect during tcp_chr_write

2020-05-20 Thread Dima Stepanov
is that vhost_user_write doesn't get an error after disconnect and try to call vhost_user_read(). The tcp_chr_write() routine should return -1 in case of disconnect. Indicate the EIO error if this routine is called in the disconnected state. Signed-off-by: Dima Stepanov Reviewed-by: Marc-André Lu

[PATCH v3 0/2] vhost-user reconnect issues during vhost initialization

2020-05-20 Thread Dima Stepanov
e simulated in two ways: - before any successful initialization - make successful initialization once and try to simulate disconnects Also we catch SIGABRT on the migration start if vhost-user daemon disconnected during vhost-user set log commands communication. Dima Stepanov (2): c

[PATCH v3 2/2] vhost-user-blk: delay vhost_user_blk_disconnect

2020-05-20 Thread Dima Stepanov
e7c83a885f865128ae3cf1946f8cb538b63cbfba "vhost-user: delay vhost_user_stop" Signed-off-by: Dima Stepanov --- hw/block/vhost-user-blk.c | 49 +-- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c ind

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-19 Thread Dima Stepanov
On Wed, May 13, 2020 at 01:56:18PM +0800, Jason Wang wrote: > > On 2020/5/13 下午12:15, Michael S. Tsirkin wrote: > >On Tue, May 12, 2020 at 12:35:30PM +0300, Dima Stepanov wrote: > >>On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: > >>>On 2020

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-19 Thread Dima Stepanov
On Mon, May 18, 2020 at 10:53:59AM +0100, Dr. David Alan Gilbert wrote: > * Dima Stepanov (dimas...@yandex-team.ru) wrote: > > On Mon, May 18, 2020 at 10:50:39AM +0800, Jason Wang wrote: > > > > > > On 2020/5/16 上午12:54, Dima Stepanov wrote: > > > >On Thu,

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-18 Thread Dima Stepanov
On Mon, May 18, 2020 at 10:50:39AM +0800, Jason Wang wrote: > > On 2020/5/16 上午12:54, Dima Stepanov wrote: > >On Thu, May 14, 2020 at 03:34:24PM +0800, Jason Wang wrote: > >>On 2020/5/13 下午5:47, Dima Stepanov wrote: > >>>>> case CHR_EVENT_CLOSED: >

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-18 Thread Dima Stepanov
tate: - disconnect -> not started For other devices we can just return the started field value as it is right now. No other comments mixed in below. > > Thanks > > > > > >Thanks, > >Feng Li > > > >Dima Stepanov 于2020年5月16日周六 上午12:55写道: >

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-18 Thread Dima Stepanov
or false. As a result vhost_migration_log() will check device state at the start of the routine and before return. But if the disconnect state isn't okay for migration, then we should return an error. No other comments mixed in below. > > Thanks, > Feng Li > > Dima Stepanov 于2020年5月16

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-15 Thread Dima Stepanov
On Thu, May 14, 2020 at 03:34:24PM +0800, Jason Wang wrote: > > On 2020/5/13 下午5:47, Dima Stepanov wrote: > >>> case CHR_EVENT_CLOSED: > >>> /* a close event may happen during a read/write, but vhost > >>> * code ass

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-13 Thread Dima Stepanov
On Wed, May 13, 2020 at 01:56:18PM +0800, Jason Wang wrote: > > On 2020/5/13 下午12:15, Michael S. Tsirkin wrote: > >On Tue, May 12, 2020 at 12:35:30PM +0300, Dima Stepanov wrote: > >>On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: > >>>On 2020

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-13 Thread Dima Stepanov
On Wed, May 13, 2020 at 11:20:50AM +0800, Jason Wang wrote: > > On 2020/5/12 下午5:35, Dima Stepanov wrote: > >On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: > >>On 2020/5/11 下午5:25, Dima Stepanov wrote: > >>>On Mon, May 11, 2020 at 11:15:53AM +0800,

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-13 Thread Dima Stepanov
On Wed, May 13, 2020 at 11:00:38AM +0800, Jason Wang wrote: > > On 2020/5/12 下午5:08, Dima Stepanov wrote: > >On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: > >>On 2020/5/11 下午5:11, Dima Stepanov wrote: > >>>On Mon, May 11, 2020 at 11:05:58AM +0800,

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-12 Thread Dima Stepanov
On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: > > On 2020/5/11 下午5:25, Dima Stepanov wrote: > >On Mon, May 11, 2020 at 11:15:53AM +0800, Jason Wang wrote: > >>On 2020/4/30 下午9:36, Dima Stepanov wrote: > >>>If vhost-user daemon is used as a back

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-12 Thread Dima Stepanov
start daemon), X is random - run dst VM - perform migration - fio should complete in dst VM And we cycle this test like forever. At least for now we see no new issues. No other comments mixed in below. > > Thanks, > > Feng Li > > Jason Wang 于2020年5月12日周二 上午1

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-12 Thread Dima Stepanov
On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: > > On 2020/5/11 下午5:11, Dima Stepanov wrote: > >On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: > >>On 2020/4/30 下午9:36, Dima Stepanov wrote: > >>>Since disconnect can happen at any t

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-11 Thread Dima Stepanov
On Sun, May 10, 2020 at 08:03:39PM -0400, Raphael Norwitz wrote: > On Thu, May 7, 2020 at 11:35 AM Dima Stepanov wrote: > > > > What do you think? > > > > Apologies - I tripped over the if (dev->started && r < 0) check. > Never-mind my point

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-11 Thread Dima Stepanov
On Mon, May 11, 2020 at 11:15:53AM +0800, Jason Wang wrote: > > On 2020/4/30 下午9:36, Dima Stepanov wrote: > >If vhost-user daemon is used as a backend for the vhost device, then we > >should consider a possibility of disconnect at any moment. If such >

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-11 Thread Dima Stepanov
On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: > > On 2020/4/30 下午9:36, Dima Stepanov wrote: > >Since disconnect can happen at any time during initialization not all > >vring buffers (for instance used vring) can be intialized successfully. > >If the bu

Re: [PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for virtio device

2020-05-11 Thread Dima Stepanov
On Mon, May 11, 2020 at 11:03:01AM +0800, Jason Wang wrote: > > On 2020/4/30 下午9:36, Dima Stepanov wrote: > >Introduce new wrappers to set/reset guest notifiers for the virtio > >device in the vhost device module: > > vhost_dev_assign_guest_notifiers > > ->s

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-07 Thread Dima Stepanov
t. What i tried to follow is that if device not started (because of disconnect or any other reason), there is no need to continue initialization and we can proceed with the next migration step. > > On Thu, Apr 30, 2020 at 9:57 AM Dima Stepanov wrote: > > > > If vhost-

Re: [PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for virtio device

2020-05-06 Thread Dima Stepanov
only for vhost-user-blk. After it we can figure out how to propogate this change to other devices. > > On Thu, Apr 30, 2020 at 9:48 AM Dima Stepanov wrote: > > > > Introduce new wrappers to set/reset guest notifiers for the virtio > > device in the vhost devic

Re: [PATCH v2 3/5] vhost-user-blk: add mechanism to track the guest notifiers init state

2020-05-06 Thread Dima Stepanov
On Sun, May 03, 2020 at 09:06:38PM -0400, Raphael Norwitz wrote: > Apologies for mixing up patches last time. This looks good from a > vhost-user-blk perspective, but I worry that some of these changes > could impact other vhost device types. > > I agree with adding notifiers_set to struct

[PATCH v2 5/5] vhost: add device started check in migration set log

2020-04-30 Thread Dima Stepanov
should be revised to handle these errors more carefully. In case of vhost-user device backend the fail paths should consider the state of the device. In this case we should skip some function calls during rollback on the error paths, so not to get the NULL dereference errors. Signed-off-by: Dima St

[PATCH v2 3/5] vhost-user-blk: add mechanism to track the guest notifiers init state

2020-04-30 Thread Dima Stepanov
Also connection can be broken after the dev.started field is set to true. A new notifiers_set field is added to the vhost_dev structure to track the state of the guest notifiers during the initialization process. Signed-off-by: Dima Stepanov --- hw/block/vhost-user-blk.c | 8 ---

[PATCH v2 1/5] char-socket: return -1 in case of disconnect during tcp_chr_write

2020-04-30 Thread Dima Stepanov
is that vhost_user_write doesn't get an error after disconnect and try to call vhost_user_read(). The tcp_chr_write() routine should return -1 in case of disconnect. Indicate the EIO error if this routine is called in the disconnected state. Signed-off-by: Dima Stepanov --- chardev/char-sock

[PATCH v2 4/5] vhost: check vring address before calling unmap

2020-04-30 Thread Dima Stepanov
assert() in the vhost_memory_unmap() routine. Signed-off-by: Dima Stepanov --- hw/virtio/vhost.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index ddbdc53..3ee50c4 100644 --- a/hw/virtio/vhost.c +++ b/hw

[PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for virtio device

2020-04-30 Thread Dima Stepanov
factor code, so the set_guest_notifiers methods could be called based on the vhost device state. Update all vhost used devices to use these wrappers instead of direct method call. Signed-off-by: Dima Stepanov --- backends/cryptodev-vhost.c | 26 +++--- backends/vhost-user.c

[PATCH v2 0/5] vhost-user reconnect issues during vhost initialization

2020-04-30 Thread Dima Stepanov
onnected during vhost-user set log commands communication. *** BLURB HERE *** Dima Stepanov (5): char-socket: return -1 in case of disconnect during tcp_chr_write vhost: introduce wrappers to set guest notifiers for virtio device vhost-user-blk: add mechanism to track the guest notifiers i

Re: [RFC PATCH v1 3/7] char-socket: initialize reconnect timer only if close is emitted

2020-04-27 Thread Dima Stepanov
> Marc-André Lureau 于2020年4月24日周五 上午3:16写道: > > > > > > Hi > > > > On Thu, Apr 23, 2020 at 8:41 PM Dima Stepanov > > wrote: > > > > > > During vhost-user reconnect functionality testing the following assert > > > was hit: > > >

Re: [RFC PATCH v1 1/7] contrib/vhost-user-blk: add option to simulate disconnect on init

2020-04-25 Thread Dima Stepanov
s route I would prefer to add the debugging options to the > > vhost-user-blk sample in a separate patch. > > > > On Thu, Apr 23, 2020 at 09:39:32PM +0300, Dima Stepanov wrote: > > > > > > Add "--simulate-disconnect-stage" option for the testing purposes. >

  1   2   >