Re: [PATCH v3 2/4] qapi: Create module 'control'

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > Am 29.01.2020 um 17:35 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > misc.json contains definitions that are related to the system emulator, >> > so it can't be used for other tools like the storage daemon. This patch >> > moves basic functionality that

Re: [PATCH v2 2/4] virtio-scsi: default num_queues to -smp N

2020-01-29 Thread Paolo Bonzini
On 29/01/20 16:44, Stefan Hajnoczi wrote: > On Mon, Jan 27, 2020 at 02:10:31PM +0100, Cornelia Huck wrote: >> On Fri, 24 Jan 2020 10:01:57 + >> Stefan Hajnoczi wrote: >>> @@ -47,10 +48,15 @@ static void vhost_scsi_pci_realize(VirtIOPCIProxy >>> *vpci_dev, Error **errp) >>> { >>>

Re: [PATCH] xen-bus/block: explicitly assign event channels to an AioContext

2020-01-29 Thread Julien Grall
Hi Anthony, On 19/12/2019 17:11, Anthony PERARD wrote: On Mon, Dec 16, 2019 at 02:34:51PM +, Paul Durrant wrote: It is not safe to close an event channel from the QEMU main thread when that channel's poller is running in IOThread context. This patch adds a new

[PATCH 09/10] scripts: Explicit usage of Python 3

2020-01-29 Thread Philippe Mathieu-Daudé
Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -lF '#!/usr/bin/env python' | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir

[PATCH 08/10] tests/qemu-iotests: Explicit usage of Python 3

2020-01-29 Thread Philippe Mathieu-Daudé
Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -lF '#!/usr/bin/env python' | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir

[PATCH 06/10] scripts/tracetool: Remove shebang header

2020-01-29 Thread Philippe Mathieu-Daudé
Patch created mechanically by running: $ chmod 644 $(git grep -lF '#!/usr/bin/env python' | xargs grep -L 'if __name__.*__main__') $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" $(git grep -lF '#!/usr/bin/env python' | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir

[PATCH 07/10] tests/vm: Remove shebang header

2020-01-29 Thread Philippe Mathieu-Daudé
Patch created mechanically by running: $ chmod 644 $(git grep -lF '#!/usr/bin/env python' | xargs grep -L 'if __name__.*__main__') $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" $(git grep -lF '#!/usr/bin/env python' | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir

[PATCH 05/10] tests/acceptance: Remove shebang header

2020-01-29 Thread Philippe Mathieu-Daudé
Patch created mechanically by running: $ chmod 644 $(git grep -lF '#!/usr/bin/env python' | xargs grep -L 'if __name__.*__main__') $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" $(git grep -lF '#!/usr/bin/env python' | xargs grep -L 'if __name__.*__main__') Reported-by: Vladimir

[PATCH 10/10] tests/qemu-iotests/check: Update to match Python 3 interpreter

2020-01-29 Thread Philippe Mathieu-Daudé
All the iotests Python scripts have been converted to search for the Python 3 interpreter. Update the ./check script accordingly. Signed-off-by: Philippe Mathieu-Daudé --- tests/qemu-iotests/check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/check

[PATCH 02/10] tests/qemu-iotests: Explicit usage of Python 3

2020-01-29 Thread Philippe Mathieu-Daudé
Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -l 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy Suggested-by: Daniel P.

[PATCH 01/10] scripts: Explicit usage of Python 3

2020-01-29 Thread Philippe Mathieu-Daudé
Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -l 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy Suggested-by: Daniel P.

[PATCH 00/10] python: Explicit usage of Python 3

2020-01-29 Thread Philippe Mathieu-Daudé
Hello, These are mechanical sed patches used to convert the code base to Python 3, as suggested on this thread: https://www.mail-archive.com/qemu-devel@nongnu.org/msg675024.html Regards, Phil. Philippe Mathieu-Daudé (10): scripts: Explicit usage of Python 3 tests/qemu-iotests: Explicit

[PATCH 04/10] scripts/minikconf: Explicit usage of Python 3

2020-01-29 Thread Philippe Mathieu-Daudé
Use the program search path to find the Python 3 interpreter. Patch created manually after running: $ git grep -l 'if __name__.*__main__' | xargs grep -LF '#!/usr/bin/env python3' Reported-by: Vladimir Sementsov-Ogievskiy Suggested-by: Daniel P. Berrangé Suggested-by: Stefan Hajnoczi

[PATCH 03/10] tests: Explicit usage of Python 3

2020-01-29 Thread Philippe Mathieu-Daudé
Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -l 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy Suggested-by: Daniel P.

Re: [PATCH v2 6/7] block/block-copy: reduce intersecting request lock

2020-01-29 Thread Andrey Shinkevich
On 27/11/2019 21:08, Vladimir Sementsov-Ogievskiy wrote: > Currently, block_copy operation lock the whole requested region. But > there is no reason to lock clusters, which are already copied, it will > disturb other parallel block_copy requests for no reason. > > Let's instead do the

request_alignment vs file size, how to fix crash?

2020-01-29 Thread Vladimir Sementsov-Ogievskiy
Hi! I found a crash, which may be simply triggered for images unaligned to request_alignment: # ./qemu-io --image-opts -c 'write 0 512' driver=blkdebug,align=4096,image.driver=null-co,image.size=512 qemu-io: block/io.c:1505: bdrv_aligned_pwritev: Assertion `end_sector <= bs->total_sectors ||

Re: [PATCH v1 1/4] virtio: introduce VIRTQUEUE_DEFUALT_SIZE instead of hardcoded constants

2020-01-29 Thread Cornelia Huck
On Wed, 29 Jan 2020 17:06:59 +0300 Denis Plotnikov wrote: > Signed-off-by: Denis Plotnikov > --- > hw/block/virtio-blk.c | 6 -- > hw/scsi/virtio-scsi.c | 5 +++-- > include/hw/virtio/virtio.h | 1 + > 3 files changed, 8 insertions(+), 4 deletions(-) > > diff --git

Re: [PATCH 02/13] qcrypto-luks: implement encryption key management

2020-01-29 Thread Maxim Levitsky
On Tue, 2020-01-28 at 17:32 +, Daniel P. Berrangé wrote: > On Tue, Jan 28, 2020 at 05:11:16PM +, Daniel P. Berrangé wrote: > > On Tue, Jan 21, 2020 at 03:13:01PM +0200, Maxim Levitsky wrote: > > > On Tue, 2020-01-21 at 08:54 +0100, Markus Armbruster wrote: > > > > > > > > > > > > > >

Re: [PATCH 01/13] qcrypto: add generic infrastructure for crypto options amendment

2020-01-29 Thread Maxim Levitsky
On Tue, 2020-01-28 at 16:59 +, Daniel P. Berrangé wrote: > On Tue, Jan 14, 2020 at 09:33:38PM +0200, Maxim Levitsky wrote: > > This will be used first to implement luks keyslot management. > > > > block_crypto_amend_opts_init will be used to convert > > qemu-img cmdline to

Re: [PATCH v2 5/7] block/block-copy: rename start to offset in interfaces

2020-01-29 Thread Andrey Shinkevich
On 27/11/2019 21:08, Vladimir Sementsov-Ogievskiy wrote: > offset/bytes pair is more usual naming in block layer, let's use it. more common ... than start/end (or start/bytes) ... > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block-copy.h | 2 +- >

Re: [PATCH v2 4/7] block/block-copy: refactor interfaces to use bytes instead of end

2020-01-29 Thread Andrey Shinkevich
On 27/11/2019 21:08, Vladimir Sementsov-Ogievskiy wrote: > We have a lot of "chunk_end - start" invocations, let's switch to > bytes/cur_bytes scheme instead. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block-copy.h | 4 +-- > block/block-copy.c | 68

Re: [PATCH v1 1/4] virtio: introduce VIRTQUEUE_DEFUALT_SIZE instead of hardcoded constants

2020-01-29 Thread Philippe Mathieu-Daudé
On 1/29/20 3:06 PM, Denis Plotnikov wrote: Signed-off-by: Denis Plotnikov typo VIRTQUEUE_DEFUALT_SIZE -> VIRTQUEUE_DEFAULT_SIZE in subject With subject fixed: Reviewed-by: Philippe Mathieu-Daudé --- hw/block/virtio-blk.c | 6 -- hw/scsi/virtio-scsi.c | 5 +++--

Re: [PATCH v3 2/4] qapi: Create module 'control'

2020-01-29 Thread Kevin Wolf
Am 29.01.2020 um 17:35 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > misc.json contains definitions that are related to the system emulator, > > so it can't be used for other tools like the storage daemon. This patch > > moves basic functionality that is shared between all tools

Re: [PATCH v3 2/4] qapi: Create module 'control'

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > misc.json contains definitions that are related to the system emulator, > so it can't be used for other tools like the storage daemon. This patch > moves basic functionality that is shared between all tools (and mostly > related to the monitor itself) into a new

Re: [PATCH v2 2/4] virtio-scsi: default num_queues to -smp N

2020-01-29 Thread Stefan Hajnoczi
On Mon, Jan 27, 2020 at 02:10:31PM +0100, Cornelia Huck wrote: > On Fri, 24 Jan 2020 10:01:57 + > Stefan Hajnoczi wrote: > > @@ -47,10 +48,15 @@ static void vhost_scsi_pci_realize(VirtIOPCIProxy > > *vpci_dev, Error **errp) > > { > > VHostSCSIPCI *dev = VHOST_SCSI_PCI(vpci_dev); > >

Re: [PATCH] iotests: Remove the superfluous 2nd check for the availability of quorum

2020-01-29 Thread Alberto Garcia
On Wed 29 Jan 2020 03:17:51 PM CET, Thomas Huth wrote: > Commit d9df28e7b07 ("iotests: check whitelisted formats") added the > modern @iotests.skip_if_unsupported() to the functions in this test, > so we don't need the old explicit test here anymore. > > Signed-off-by: Thomas Huth Reviewed-by:

[PATCH] iotests: Remove the superfluous 2nd check for the availability of quorum

2020-01-29 Thread Thomas Huth
Commit d9df28e7b07 ("iotests: check whitelisted formats") added the modern @iotests.skip_if_unsupported() to the functions in this test, so we don't need the old explicit test here anymore. Signed-off-by: Thomas Huth --- tests/qemu-iotests/139 | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH v1 0/4] Increase default virtqueue size to improve performance

2020-01-29 Thread Denis Plotnikov
The goal is to increase the performance of the block layer on 1M reads/writes up to 4% by reducing the amount of requests issued by a guest using virtio-scsi or virtio-blk devices. Original problem description: https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg03721.html Denis Plotnikov

[PATCH v1 1/4] virtio: introduce VIRTQUEUE_DEFUALT_SIZE instead of hardcoded constants

2020-01-29 Thread Denis Plotnikov
Signed-off-by: Denis Plotnikov --- hw/block/virtio-blk.c | 6 -- hw/scsi/virtio-scsi.c | 5 +++-- include/hw/virtio/virtio.h | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 09f46ed85f..72f935033f 100644 ---

[PATCH v1 4/4] tests: rename virtio_seg_max_adjust to virtio_check_params

2020-01-29 Thread Denis Plotnikov
Since, virtio_seg_max_adjust checks not only seg_max, but also virtqueue_size parameter, let's make the test more general and add new parameters to be checked there in the future. Signed-off-by: Denis Plotnikov --- .../{virtio_seg_max_adjust.py => virtio_check_params.py} | 0 1 file

[PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk

2020-01-29 Thread Denis Plotnikov
The goal is to reduce the amount of requests issued by a guest on 1M reads/writes. This rises the performance up to 4% on that kind of disk access pattern. The maximum chunk size to be used for the guest disk accessing is limited with seg_max parameter, which represents the max amount of pices in

[PATCH v1 3/4] tests: add virtuqueue size checking to virtio_seg_max_adjust test

2020-01-29 Thread Denis Plotnikov
This is due to the change in the default virtqueue_size in the latest machine type to improve guest disks performance. Signed-off-by: Denis Plotnikov --- tests/acceptance/virtio_seg_max_adjust.py | 33 ++- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git

Re: [PATCH v3 03/13] monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c

2020-01-29 Thread Maxim Levitsky
On Wed, 2020-01-29 at 11:19 +0100, Markus Armbruster wrote: > Maxim Levitsky writes: > > > On Tue, 2020-01-28 at 16:56 +, Dr. David Alan Gilbert wrote: > > > * Maxim Levitsky (mlevi...@redhat.com) wrote: > > > > These days device-hotplug.c only contains the hmp_drive_add > > > > In the next

Re: [PATCH v3 13/13] monitor/hmp: Prefer to use hmp_handle_error for error reporting in block hmp commands

2020-01-29 Thread Maxim Levitsky
On Wed, 2020-01-29 at 11:27 +0100, Markus Armbruster wrote: > Maxim Levitsky writes: > > > On Mon, 2020-01-27 at 12:36 +0200, Maxim Levitsky wrote: > > > This way they all will be prefixed with 'Error:' which some parsers > > > (e.g libvirt) need > > > > > > Bugzilla:

Re: [PATCH v3 12/13] add 'error' prefix to vreport

2020-01-29 Thread Maxim Levitsky
On Wed, 2020-01-29 at 11:38 +0100, Markus Armbruster wrote: > Maxim Levitsky writes: > > > On Mon, 2020-01-27 at 12:36 +0200, Maxim Levitsky wrote: > > > This changes most of qemu's error messages, > > > but it feels like the right thing to do. > > > > > > This is WIP patch, since I updated

Re: [PATCH v3 12/13] add 'error' prefix to vreport

2020-01-29 Thread Markus Armbruster
Maxim Levitsky writes: > On Mon, 2020-01-27 at 12:36 +0200, Maxim Levitsky wrote: >> This changes most of qemu's error messages, >> but it feels like the right thing to do. >> >> This is WIP patch, since I updated most of iotests but not all of them, >> and will be updated if this patch is

Re: [PATCH v3 13/13] monitor/hmp: Prefer to use hmp_handle_error for error reporting in block hmp commands

2020-01-29 Thread Markus Armbruster
Maxim Levitsky writes: > On Mon, 2020-01-27 at 12:36 +0200, Maxim Levitsky wrote: >> This way they all will be prefixed with 'Error:' which some parsers >> (e.g libvirt) need >> >> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1719169 >> >> Signed-off-by: Maxim Levitsky > > And I

[PATCH v3 2/4] qapi: Create module 'control'

2020-01-29 Thread Kevin Wolf
misc.json contains definitions that are related to the system emulator, so it can't be used for other tools like the storage daemon. This patch moves basic functionality that is shared between all tools (and mostly related to the monitor itself) into a new control.json, which could be used in

[PATCH v3 4/4] monitor: Move qmp_query_qmp_schema to qmp-cmds-control.c

2020-01-29 Thread Kevin Wolf
monitor/misc.c contains code that works only in the system emulator, so it can't be linked to tools like a storage daemon. In order to make schema introspection available for tools, move the function to monitor/qmp-cmds-control.c, which can be linked into the storage daemon. Signed-off-by: Kevin

[PATCH v3 3/4] monitor: Create monitor/qmp-cmds-control.c

2020-01-29 Thread Kevin Wolf
Move all of the QMP commands handlers to implement the 'control' module (qapi/control.json) that can be shared between the system emulator and tools such as a storage daemon to a new file monitor/qmp-cmds-control.c. Signed-off-by: Kevin Wolf Reviewed-by: Markus Armbruster --- monitor/misc.c

[PATCH v3 0/4] monitor: Refactoring in preparation for qemu-storage-daemon

2020-01-29 Thread Kevin Wolf
This series creates a QAPI module 'control' that can be used from tools outside the system emulator and moves some monitor initialisation code from vl.c to monitor code. It is split from the series to introduce qemu-storage-daemon because these refactorings make sense on their own as cleanups.

[PATCH v3 1/4] monitor: Move monitor option parsing to monitor/monitor.c

2020-01-29 Thread Kevin Wolf
Both the system emulators and tools with QMP support (specifically, the planned storage daemon) will need to parse monitor options, so move that code to monitor/monitor.c, which can be linked into binaries that aren't a system emulator. Signed-off-by: Kevin Wolf Reviewed-by: Markus Armbruster

Re: [PATCH v3 03/13] monitor/hmp: rename device-hotplug.c to block/monitor/block-hmp-cmds.c

2020-01-29 Thread Markus Armbruster
Maxim Levitsky writes: > On Tue, 2020-01-28 at 16:56 +, Dr. David Alan Gilbert wrote: >> * Maxim Levitsky (mlevi...@redhat.com) wrote: >> > These days device-hotplug.c only contains the hmp_drive_add >> > In the next patch, rest of hmp_drive* functions will be moved >> > there. >> > >> >

Re: [PATCH v2 2/4] qapi: Create module 'control'

2020-01-29 Thread Kevin Wolf
Am 29.01.2020 um 10:41 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 29.01.2020 um 09:35 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > misc.json contains definitions that are related to the system emulator, > >> > so it can't be used for other tools

Re: [PATCH v2 2/4] qapi: Create module 'control'

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > Am 29.01.2020 um 09:35 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > misc.json contains definitions that are related to the system emulator, >> > so it can't be used for other tools like the storage daemon. This patch >> > moves basic functionality that

Re: [PATCH v2 3/7] block/block-copy: factor out block_copy_find_inflight_req

2020-01-29 Thread Andrey Shinkevich
On 27/11/2019 21:08, Vladimir Sementsov-Ogievskiy wrote: > Split block_copy_find_inflight_req to be used in seprate. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/block-copy.c | 31 +++ > 1 file changed, 19 insertions(+), 12 deletions(-) > > diff

Re: [PATCH v2 2/7] block/block-copy: use block_status

2020-01-29 Thread Andrey Shinkevich
On 27/11/2019 21:08, Vladimir Sementsov-Ogievskiy wrote: > Use bdrv_block_status_above to chose effective chunk size and to handle > zeroes effectively. > > This substitutes checking for just being allocated or not, and drops > old code path for it. Assistance by backup job is dropped too, as >

Re: [PATCH v2 4/4] monitor: Move qmp_query_qmp_schema to qmp-cmds-control.c

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > monitor/misc.c contains code that works only in the system emulator, so > it can't be linked to tools like a storage daemon. In order to make > schema introspection available for tools, move the function to > monitor/qmp-cmds-control.c, which can be linked into the storage

Re: [PATCH v2 2/4] qapi: Create module 'control'

2020-01-29 Thread Kevin Wolf
Am 29.01.2020 um 09:35 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > misc.json contains definitions that are related to the system emulator, > > so it can't be used for other tools like the storage daemon. This patch > > moves basic functionality that is shared between all tools

Re: [PATCH v2 3/4] monitor: Create monitor/qmp-cmds-control.c

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > Move all of the QMP commands handlers to implement the 'control' module > (qapi/control.json) that can be shared between the system emulator and > tools such as a storage daemon to a new file monitor/qmp-cmds-control.c. > > Signed-off-by: Kevin Wolf > --- [...] > diff --git

Re: [PATCH v2 2/4] qapi: Create module 'control'

2020-01-29 Thread Markus Armbruster
Kevin Wolf writes: > misc.json contains definitions that are related to the system emulator, > so it can't be used for other tools like the storage daemon. This patch > moves basic functionality that is shared between all tools (and mostly > related to the monitor itself) into a new