* [PATCH v2 0/1] virtio: fix IO request length in virtio SCSI/block @ 2019-11-08 13:42 Denis Plotnikov 2019-11-08 13:42 ` [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent Denis Plotnikov 2019-11-08 19:43 ` [PATCH v2 0/1] virtio: fix IO request length in virtio SCSI/block no-reply 0 siblings, 2 replies; 6+ messages in thread From: Denis Plotnikov @ 2019-11-08 13:42 UTC (permalink / raw) To: qemu-devel; +Cc: den, stefanha, qemu-block, mst v2: * the standalone patch to make seg_max virtqueue size dependent * other patches are postponed v1: the initial series Denis Plotnikov (1): virtio: make seg_max virtqueue size dependent hw/block/virtio-blk.c | 2 +- hw/scsi/virtio-scsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.17.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent 2019-11-08 13:42 [PATCH v2 0/1] virtio: fix IO request length in virtio SCSI/block Denis Plotnikov @ 2019-11-08 13:42 ` Denis Plotnikov 2019-11-08 14:26 ` Michael S. Tsirkin 2019-11-11 11:19 ` Stefan Hajnoczi 2019-11-08 19:43 ` [PATCH v2 0/1] virtio: fix IO request length in virtio SCSI/block no-reply 1 sibling, 2 replies; 6+ messages in thread From: Denis Plotnikov @ 2019-11-08 13:42 UTC (permalink / raw) To: qemu-devel; +Cc: den, stefanha, qemu-block, mst seg_max has a restriction to be less or equal to virtqueue size according to Virtio 1.0 specification Although seg_max can't be set directly, it's worth to express this dependancy directly in the code for sanity purpose. Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com> --- hw/block/virtio-blk.c | 2 +- hw/scsi/virtio-scsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 06e57a4d39..21530304cf 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -903,7 +903,7 @@ static void virtio_blk_update_config(VirtIODevice *vdev, uint8_t *config) blk_get_geometry(s->blk, &capacity); memset(&blkcfg, 0, sizeof(blkcfg)); virtio_stq_p(vdev, &blkcfg.capacity, capacity); - virtio_stl_p(vdev, &blkcfg.seg_max, 128 - 2); + virtio_stl_p(vdev, &blkcfg.seg_max, s->conf.queue_size - 2); virtio_stw_p(vdev, &blkcfg.geometry.cylinders, conf->cyls); virtio_stl_p(vdev, &blkcfg.blk_size, blk_size); virtio_stw_p(vdev, &blkcfg.min_io_size, conf->min_io_size / blk_size); diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 839f120256..f7e5533cd5 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -650,7 +650,7 @@ static void virtio_scsi_get_config(VirtIODevice *vdev, VirtIOSCSICommon *s = VIRTIO_SCSI_COMMON(vdev); virtio_stl_p(vdev, &scsiconf->num_queues, s->conf.num_queues); - virtio_stl_p(vdev, &scsiconf->seg_max, 128 - 2); + virtio_stl_p(vdev, &scsiconf->seg_max, s->conf.virtqueue_size - 2); virtio_stl_p(vdev, &scsiconf->max_sectors, s->conf.max_sectors); virtio_stl_p(vdev, &scsiconf->cmd_per_lun, s->conf.cmd_per_lun); virtio_stl_p(vdev, &scsiconf->event_info_size, sizeof(VirtIOSCSIEvent)); -- 2.17.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent 2019-11-08 13:42 ` [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent Denis Plotnikov @ 2019-11-08 14:26 ` Michael S. Tsirkin 2019-11-11 11:19 ` Stefan Hajnoczi 1 sibling, 0 replies; 6+ messages in thread From: Michael S. Tsirkin @ 2019-11-08 14:26 UTC (permalink / raw) To: Denis Plotnikov; +Cc: stefanha, qemu-devel, qemu-block, den On Fri, Nov 08, 2019 at 04:42:49PM +0300, Denis Plotnikov wrote: > seg_max has a restriction to be less or equal to virtqueue size > according to Virtio 1.0 specification > > Although seg_max can't be set directly, it's worth to express this > dependancy directly in the code for sanity purpose. > > Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com> Guest visible so please make this depend on machine type. > --- > hw/block/virtio-blk.c | 2 +- > hw/scsi/virtio-scsi.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 06e57a4d39..21530304cf 100644 > --- a/hw/block/virtio-blk.c > +++ b/hw/block/virtio-blk.c > @@ -903,7 +903,7 @@ static void virtio_blk_update_config(VirtIODevice *vdev, uint8_t *config) > blk_get_geometry(s->blk, &capacity); > memset(&blkcfg, 0, sizeof(blkcfg)); > virtio_stq_p(vdev, &blkcfg.capacity, capacity); > - virtio_stl_p(vdev, &blkcfg.seg_max, 128 - 2); > + virtio_stl_p(vdev, &blkcfg.seg_max, s->conf.queue_size - 2); > virtio_stw_p(vdev, &blkcfg.geometry.cylinders, conf->cyls); > virtio_stl_p(vdev, &blkcfg.blk_size, blk_size); > virtio_stw_p(vdev, &blkcfg.min_io_size, conf->min_io_size / blk_size); > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c > index 839f120256..f7e5533cd5 100644 > --- a/hw/scsi/virtio-scsi.c > +++ b/hw/scsi/virtio-scsi.c > @@ -650,7 +650,7 @@ static void virtio_scsi_get_config(VirtIODevice *vdev, > VirtIOSCSICommon *s = VIRTIO_SCSI_COMMON(vdev); > > virtio_stl_p(vdev, &scsiconf->num_queues, s->conf.num_queues); > - virtio_stl_p(vdev, &scsiconf->seg_max, 128 - 2); > + virtio_stl_p(vdev, &scsiconf->seg_max, s->conf.virtqueue_size - 2); > virtio_stl_p(vdev, &scsiconf->max_sectors, s->conf.max_sectors); > virtio_stl_p(vdev, &scsiconf->cmd_per_lun, s->conf.cmd_per_lun); > virtio_stl_p(vdev, &scsiconf->event_info_size, sizeof(VirtIOSCSIEvent)); > -- > 2.17.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent 2019-11-08 13:42 ` [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent Denis Plotnikov 2019-11-08 14:26 ` Michael S. Tsirkin @ 2019-11-11 11:19 ` Stefan Hajnoczi 2019-11-11 11:20 ` Denis Plotnikov 1 sibling, 1 reply; 6+ messages in thread From: Stefan Hajnoczi @ 2019-11-11 11:19 UTC (permalink / raw) To: Denis Plotnikov; +Cc: den, qemu-devel, qemu-block, mst [-- Attachment #1: Type: text/plain, Size: 300 bytes --] On Fri, Nov 08, 2019 at 04:42:49PM +0300, Denis Plotnikov wrote: > + virtio_stl_p(vdev, &blkcfg.seg_max, s->conf.queue_size - 2); [...] > + virtio_stl_p(vdev, &scsiconf->seg_max, s->conf.virtqueue_size - 2); Please extend the queue_size checks to report an error when queue_size <= 2. Stefan [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent 2019-11-11 11:19 ` Stefan Hajnoczi @ 2019-11-11 11:20 ` Denis Plotnikov 0 siblings, 0 replies; 6+ messages in thread From: Denis Plotnikov @ 2019-11-11 11:20 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Denis Lunev, qemu-devel, qemu-block, mst On 11.11.2019 14:19, Stefan Hajnoczi wrote: > On Fri, Nov 08, 2019 at 04:42:49PM +0300, Denis Plotnikov wrote: >> + virtio_stl_p(vdev, &blkcfg.seg_max, s->conf.queue_size - 2); > [...] >> + virtio_stl_p(vdev, &scsiconf->seg_max, s->conf.virtqueue_size - 2); > Please extend the queue_size checks to report an error when queue_size > <= 2. Ok. Denis > > Stefan ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/1] virtio: fix IO request length in virtio SCSI/block 2019-11-08 13:42 [PATCH v2 0/1] virtio: fix IO request length in virtio SCSI/block Denis Plotnikov 2019-11-08 13:42 ` [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent Denis Plotnikov @ 2019-11-08 19:43 ` no-reply 1 sibling, 0 replies; 6+ messages in thread From: no-reply @ 2019-11-08 19:43 UTC (permalink / raw) To: dplotnikov; +Cc: qemu-block, mst, qemu-devel, stefanha, den Patchew URL: https://patchew.org/QEMU/20191108134249.19004-1-dplotnikov@virtuozzo.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make docker-image-centos7 V=1 NETWORK=1 time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END === TEST check-qtest-x86_64: tests/ahci-test TEST check-unit: tests/test-aio-multithread test-aio-multithread: /tmp/qemu-test/src/util/async.c:279: aio_ctx_finalize: Assertion `((&ctx->scheduled_coroutines)->slh_first == ((void *)0))' failed. ERROR - too few tests run (expected 6, got 2) make: *** [check-unit] Error 1 make: *** Waiting for unfinished jobs.... TEST iotest-qcow2: 013 TEST iotest-qcow2: 017 --- raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=66f67685ef3547788ddbfca43e0e9250', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-oc5hqlfd/src/docker-src.2019-11-08-14.32.14.21571:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=66f67685ef3547788ddbfca43e0e9250 make[1]: *** [docker-run] Error 1 make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-oc5hqlfd/src' make: *** [docker-run-test-quick@centos7] Error 2 real 11m1.820s user 0m8.507s The full log is available at http://patchew.org/logs/20191108134249.19004-1-dplotnikov@virtuozzo.com/testing.docker-quick@centos7/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-11-11 11:21 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-11-08 13:42 [PATCH v2 0/1] virtio: fix IO request length in virtio SCSI/block Denis Plotnikov 2019-11-08 13:42 ` [PATCH v2 1/1] virtio: make seg_max virtqueue size dependent Denis Plotnikov 2019-11-08 14:26 ` Michael S. Tsirkin 2019-11-11 11:19 ` Stefan Hajnoczi 2019-11-11 11:20 ` Denis Plotnikov 2019-11-08 19:43 ` [PATCH v2 0/1] virtio: fix IO request length in virtio SCSI/block no-reply
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).