Re: [PATCH v2 13/22] qemu-iotests/199: drop extra constraints

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: We don't need any specific format constraints here. Still keep qcow2 for two reasons: 1. No extra calls of format-unrelated test 2. Add some check around persistent bitmap in future (require qcow2) Signed-off-by: Vladimir

Re: [PATCH v4 3/4] qmp: Move dispatcher to a coroutine

2020-02-19 Thread Markus Armbruster
Kevin Wolf writes: > Am 18.02.2020 um 15:12 hat Markus Armbruster geschrieben: >> >> Regarding calling monitor_qmp_requests_pop_any_with_lock(): it needs >> >> @monitor_lock and @mon_list to be valid. We just initialized >> >> @monitor_lock, and @mon_list is empty. >> >>

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Andrey Shinkevich
On 18/02/2020 23:57, Eric Blake wrote: On 2/18/20 2:02 PM, Andrey Shinkevich wrote: qemu-iotests:$ ./check -qcow2 PASSED (except always failed 261 and 272) Have you reported those failures on the threads that introduced those tests? Not yet unfortunately. I have not investigated the

Re: [PATCH] iotests: Fix nonportable use of od --endian

2020-02-19 Thread Eric Blake
On 2/19/20 8:41 AM, Eric Blake wrote: Tests 261 and 272 fail on RHEL 7 with coreutils 8.22, since od --endian was not added until coreutils 8.23. Fix this by manually constructing the final value one byte at a time. Fixes: fc8ba423 Reported-by: Andrey Shinkevich Signed-off-by: Eric Blake ---

Re: [PATCH v3 1/4] luks: extract qcrypto_block_calculate_payload_offset()

2020-02-19 Thread Max Reitz
On 11.02.20 17:03, Stefan Hajnoczi wrote: > The qcow2 .bdrv_measure() code calculates the crypto payload offset. > This logic really belongs in crypto/block.c where it can be reused by > other image formats. > > The "luks" block driver will need this same logic in order to implement >

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Eric Blake
On 2/19/20 7:25 AM, Andrey Shinkevich wrote: On 18/02/2020 23:57, Eric Blake wrote: On 2/18/20 2:02 PM, Andrey Shinkevich wrote: qemu-iotests:$ ./check -qcow2 PASSED (except always failed 261 and 272) Have you reported those failures on the threads that introduced those tests? Not yet

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Eric Blake
On 2/19/20 7:36 AM, Eric Blake wrote: +od: unrecognized option '--endian=big' +Try 'od --help' for more information. +od: invalid -N argument '--endian=big' +qemu-img: Could not open 'TEST_DIR/t.IMGFMT': IMGFMT header exceeds cluster size Which version of od are you using?  I do recall

Re: [PATCH v4 3/4] qmp: Move dispatcher to a coroutine

2020-02-19 Thread Markus Armbruster
Markus Armbruster writes: [...] > If you agree with my proposed tweaks, and nothing else comes up, I can > try to do them in my tree. I'll tweak your v5, of course.

Re: [PATCH v5 2/4] vl: Initialise main loop earlier

2020-02-19 Thread Wolfgang Bumiller
On Tue, Feb 18, 2020 at 04:40:34PM +0100, Kevin Wolf wrote: > We want to be able to use qemu_aio_context in the monitor > initialisation. > > Signed-off-by: Kevin Wolf > Reviewed-by: Marc-André Lureau > Reviewed-by: Markus Armbruster > --- > vl.c | 10 +- > 1 file changed, 5

Re: [PATCH v2 16/22] qemu-iotests/199: change discard patterns

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: iotest 40 works too long because of many discard opertion. On the same operations At the same time time, postcopy period is very short, in spite of all these efforts. So, let's use less discards (and with more interesting patterns) to

Re: [PATCH v2 14/22] qemu-iotests/199: better catch postcopy time

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2020 16:16, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: The test aims to test _postcopy_ migration, and wants to do some write operations during postcopy time. Test considers migrate status=complete event on source as start of postcopy. This is

Re: [PATCH v2 05/22] migration/block-dirty-bitmap: refactor state global variables

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
18.02.2020 16:05, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Move all state variables into one global struct. Reduce global variable usage, utilizing opaque pointer where possible. Signed-off-by: Vladimir Sementsov-Ogievskiy ---  

Re: [PATCH v2 07/22] migration/block-dirty-bitmap: simplify dirty_bitmap_load_complete

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
18.02.2020 17:26, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: bdrv_enable_dirty_bitmap_locked() call does nothing, as if we are in postcopy, bitmap successor must be enabled, and reclaim operation will enable the bitmap. So, actually we need just call

Re: [PATCH v3 3/4] qemu-img: allow qemu-img measure --object without a filename

2020-02-19 Thread Max Reitz
On 11.02.20 17:03, Stefan Hajnoczi wrote: > In most qemu-img sub-commands the --object option only makes sense when > there is a filename. qemu-img measure is an exception because objects > may be referenced from the image creation options instead of an existing > image file. Allow --object

Re: [PATCH 2/2] block/curl: HTTP header field names are case insensitive

2020-02-19 Thread Philippe Mathieu-Daudé
Hi David, On 2/19/20 2:27 PM, David Edmondson wrote: RFC 7230 section 3.2 indicates that HTTP header field names are case insensitive. Signed-off-by: David Edmondson --- block/curl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/curl.c b/block/curl.c index

Re: [PATCH v2 15/22] qemu-iotests/199: improve performance: set bitmap by discard

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Discard dirties dirty-bitmap as well as write, but works faster. Let's use it instead. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/199 | 31 --- 1 file changed, 20 insertions(+), 11

[PATCH 1/2] block/curl: HTTP header fields allow whitespace around values

2020-02-19 Thread David Edmondson
RFC 7230 section 3.2 indicates that whitespace is permitted between the field name and field value and after the field value. Signed-off-by: David Edmondson --- block/curl.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/block/curl.c

[PATCH 0/2] block/curl: Improve HTTP header parsing

2020-02-19 Thread David Edmondson
An HTTP object store of my acquaintance returns "accept-ranges: bytes" (all lower case) as a header, causing the QEMU curl backend to refuse to talk to it. RFC 7230 says that HTTP headers are case insensitive, so update the curl backend accordingly. At the same time, allow for arbitrary white

[PATCH 2/2] block/curl: HTTP header field names are case insensitive

2020-02-19 Thread David Edmondson
RFC 7230 section 3.2 indicates that HTTP header field names are case insensitive. Signed-off-by: David Edmondson --- block/curl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/curl.c b/block/curl.c index 0cf99a4b31b8..4256659cd85b 100644 --- a/block/curl.c +++

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Andrey Shinkevich
On 19/02/2020 16:36, Eric Blake wrote: On 2/19/20 7:25 AM, Andrey Shinkevich wrote: On 18/02/2020 23:57, Eric Blake wrote: On 2/18/20 2:02 PM, Andrey Shinkevich wrote: qemu-iotests:$ ./check -qcow2 PASSED (except always failed 261 and 272) Have you reported those failures on the

Re: [PATCH v2 17/22] qemu-iotests/199: increase postcopy period

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Test wants force bitmap postcopy. Still, resulting postcopy period is very small. Let's increase it by adding more bitmaps to migrate. Also, test disabled bitmaps migration. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH v5 2/4] vl: Initialise main loop earlier

2020-02-19 Thread Kevin Wolf
Am 19.02.2020 um 15:07 hat Wolfgang Bumiller geschrieben: > On Tue, Feb 18, 2020 at 04:40:34PM +0100, Kevin Wolf wrote: > > We want to be able to use qemu_aio_context in the monitor > > initialisation. > > > > Signed-off-by: Kevin Wolf > > Reviewed-by: Marc-André Lureau > > Reviewed-by: Markus

Re: [PATCH v4 3/4] qmp: Move dispatcher to a coroutine

2020-02-19 Thread Kevin Wolf
Am 19.02.2020 um 15:21 hat Markus Armbruster geschrieben: > I think we need to talk about AioContext in qapi-code-gen.txt. PATCH 1 > now adds > > Member 'coroutine' tells the QMP dispatcher whether the command handler > is safe to be run in a coroutine. It defaults to false. If it is true,

Re: [PATCH v3 4/4] iotests: add 282 luks qemu-img measure test

2020-02-19 Thread Max Reitz
On 11.02.20 17:03, Stefan Hajnoczi wrote: > This test exercises the block/crypto.c "luks" block driver > .bdrv_measure() code. > > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/282 | 93 ++ > tests/qemu-iotests/282.out | 30 >

Re: [PATCH v2 14/22] qemu-iotests/199: better catch postcopy time

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: The test aims to test _postcopy_ migration, and wants to do some write operations during postcopy time. Test considers migrate status=complete event on source as start of postcopy. This is completely wrong, completion is completion of the

Re: [PATCH v2 03/22] migration/block-dirty-bitmap: rename dirty_bitmap_mig_cleanup

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
18.02.2020 14:00, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Rename dirty_bitmap_mig_cleanup to dirty_bitmap_do_save_cleanup, to stress that it is on save part. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   migration/block-dirty-bitmap.c | 8

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Eric Blake
On 2/19/20 7:52 AM, Andrey Shinkevich wrote: +od: unrecognized option '--endian=big' +Try 'od --help' for more information. +od: invalid -N argument '--endian=big' Yay, same problem for both tests.  Fix common.rc once, and both tests should start working for you. Thank you Eric! I want to

Re: [PATCH v4 3/4] qmp: Move dispatcher to a coroutine

2020-02-19 Thread Markus Armbruster
Kevin Wolf writes: > Am 19.02.2020 um 10:03 hat Markus Armbruster geschrieben: >> >> >> @@ -246,8 +287,15 @@ void monitor_qmp_bh_dispatcher(void *data) >> >> >>} >> >> >>qmp_request_free(req_obj); >> >> >> >> >> >> -/* Reschedule instead of looping so the main

[PATCH] iotests: Fix nonportable use of od --endian

2020-02-19 Thread Eric Blake
Tests 261 and 272 fail on RHEL 7 with coreutils 8.22, since od --endian was not added until coreutils 8.23. Fix this by manually constructing the final value one byte at a time. Fixes: fc8ba423 Reported-by: Andrey Shinkevich Signed-off-by: Eric Blake --- tests/qemu-iotests/common.rc | 22

Re: [PATCH v2 09/22] migration/block-dirty-bitmap: relax error handling in incoming part

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
18.02.2020 21:54, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Bitmaps data is not critical, and we should not fail the migration (or use postcopy recovering) because of dirty-bitmaps migration failure. Instead we should just lose unfinished bitmaps.

Re: [PATCH v3 2/4] luks: implement .bdrv_measure()

2020-02-19 Thread Max Reitz
On 11.02.20 17:03, Stefan Hajnoczi wrote: > Add qemu-img measure support in the "luks" block driver. > > Signed-off-by: Stefan Hajnoczi > --- > block/crypto.c | 62 ++ > 1 file changed, 62 insertions(+) > > diff --git a/block/crypto.c

Re: [PATCH v2 16/22] qemu-iotests/199: change discard patterns

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2020 17:33, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: iotest 40 works too long because of many discard opertion. On the same operations At the same time time, postcopy period is very short, in spite of all these efforts. So, let's use less

Re: [PATCH v2 16/22] qemu-iotests/199: change discard patterns

2020-02-19 Thread Andrey Shinkevich
On 19/02/2020 17:33, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: iotest 40 works too long because of many discard opertion. On the same operations At the same time time, postcopy period is very short, in spite of all these efforts. So, let's use

Re: [PATCH v1] block/nvme: introduce PMR support from NVMe 1.4 spec

2020-02-19 Thread Andrzej Jakowski
On 2/18/20 6:07 PM, no-re...@patchew.org wrote: > === TEST SCRIPT BEGIN === > #! /bin/bash > export ARCH=x86_64 > make docker-image-fedora V=1 NETWORK=1 > time make docker-test-mingw@fedora J=14 NETWORK=1 > === TEST SCRIPT END === > > CC hw/display/sii9022.o > CC

Re: [PATCH] util/async: make bh_aio_poll() O(1)

2020-02-19 Thread Paolo Bonzini
Il mer 19 feb 2020, 18:58 Stefan Hajnoczi ha scritto: > On Wed, Feb 19, 2020 at 12:09:48PM +0100, Paolo Bonzini wrote: > > Really a great idea, though I have some remarks on the implementation > below. > > > > On 19/02/20 11:00, Stefan Hajnoczi wrote: > > > + * Each aio_bh_poll() call carves off

Re: [PATCH v2 22/22] qemu-iotests/199: add source-killed case to bitmaps postcopy

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Previous patches fixes behavior of bitmaps migration, so that errors are handled by just removing unfinished bitmaps, and not fail or try to recover postcopy migration. Add corresponding test. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH v2 21/22] qemu-iotests/199: add early shutdown case to bitmaps postcopy

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Previous patches fixed two crashes which may occur on shutdown prior to bitmaps postcopy finished. Check that it works now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/199 | 18 ++

Re: [PATCH v3] virtio: increase virtqueue size for virtio-scsi and virtio-blk

2020-02-19 Thread Stefan Hajnoczi
On Fri, Feb 14, 2020 at 10:46:48AM +0300, Denis Plotnikov wrote: > 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

Re: [PATCH] util/async: make bh_aio_poll() O(1)

2020-02-19 Thread Stefan Hajnoczi
On Wed, Feb 19, 2020 at 12:09:48PM +0100, Paolo Bonzini wrote: > Really a great idea, though I have some remarks on the implementation below. > > On 19/02/20 11:00, Stefan Hajnoczi wrote: > > + * Each aio_bh_poll() call carves off a slice of the BH list. This way > > newly > > + * scheduled BHs

[PATCH v2] util/async: make bh_aio_poll() O(1)

2020-02-19 Thread Stefan Hajnoczi
The ctx->first_bh list contains all created BHs, including those that are not scheduled. The list is iterated by the event loop and therefore has O(n) time complexity with respected to the number of created BHs. Rewrite BHs so that only scheduled or deleted BHs are enqueued. Only BHs that

Re: [PATCH v2 19/22] qemu-iotests/199: prepare for new test-cases addition

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Move future common part to start_postcopy() method. Move checking number of bitmaps to check_bitmap(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/199 | 36 +++- 1 file changed,

Re: [PATCH v2 07/22] migration/block-dirty-bitmap: simplify dirty_bitmap_load_complete

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
19.02.2020 18:30, Vladimir Sementsov-Ogievskiy wrote: 18.02.2020 17:26, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: bdrv_enable_dirty_bitmap_locked() call does nothing, as if we are in postcopy, bitmap successor must be enabled, and reclaim operation will

Re: [PATCH v2 20/22] qemu-iotests/199: check persistent bitmaps

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Check that persistent bitmaps are not stored on source and that bitmaps are persistent on destination. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/199 | 16 +++- 1 file changed, 15 insertions(+),

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Andrey Shinkevich
On 19/02/2020 17:58, Eric Blake wrote: On 2/19/20 7:52 AM, Andrey Shinkevich wrote: +od: unrecognized option '--endian=big' +Try 'od --help' for more information. +od: invalid -N argument '--endian=big' Yay, same problem for both tests.  Fix common.rc once, and both tests should start

Re: [PATCH v2 21/22] qemu-iotests/199: add early shutdown case to bitmaps postcopy

2020-02-19 Thread Andrey Shinkevich
On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: Previous patches fixed two crashes which may occur on shutdown prior to bitmaps postcopy finished. Check that it works now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/199 | 18 ++

Re: [PATCH v7 0/4] colo: Add support for continuous replication

2020-02-19 Thread Zhang, Chen
Hi Jason, I noticed this series can't be merged or queued, do you met some problem about it? Thanks Zhang Chen Max Reitz ; qemu-block Subject: Re: [PATCH v7 0/4] colo: Add support for continuous replication On Fri, 25 Oct 2019 19:06:31 +0200 Lukas Straub wrote: Hello Everyone, These

Re: [PATCH v7 0/4] colo: Add support for continuous replication

2020-02-19 Thread Jason Wang
On 2020/2/20 上午9:38, Zhang, Chen wrote: Hi Jason, I noticed this series can't be merged or queued, do you met some problem about it? Thanks Zhang Chen Not, I've queued this. Thanks

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

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
17.02.2020 16:38, Max Reitz wrote: On 27.11.19 19: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

Re: [PATCH v2 7/7] block/block-copy: hide structure definitions

2020-02-19 Thread Vladimir Sementsov-Ogievskiy
17.02.2020 17:04, Max Reitz wrote: On 27.11.19 19:08, Vladimir Sementsov-Ogievskiy wrote: Hide structure definitions and add explicit API instead, to keep an eye on the scope of the shared fields. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 57

Re: [PATCH v2 0/5] block: Generic file creation fallback

2020-02-19 Thread Max Reitz
On 22.01.20 17:45, Max Reitz wrote: > Hi, > > As version 1, this series adds a fallback path for creating files (on > the protocol layer) if the protocol driver does not support file > creation, but the file already exists. > > > Branch: https://github.com/XanClic/qemu.git skip-proto-create-v2

Re: [PATCH 0/2] qemu-img: Fix convert -n -B for backing-less targets

2020-02-19 Thread Max Reitz
On 21.01.20 16:59, Max Reitz wrote: > Hi, > > When reviewing David’s series to add --target-is-zero convert, I looked > for a case to show that the current implementation will crash if > -n --target-is-zero is used together with -B. It then turned out that > -B will always crash when combined

Re: [PATCH 4/5] aio-posix: make AioHandler deletion O(1)

2020-02-19 Thread Sergio Lopez
On Fri, Feb 14, 2020 at 05:17:11PM +, Stefan Hajnoczi wrote: > It is not necessary to scan all AioHandlers for deletion. Keep a list > of deleted handlers instead of scanning the full list of all handlers. > > The AioHandler->deleted field can be dropped. Let's check if the > handler has

Re: [PATCH 0/2] block: Fix VM size field width in snapshot dump

2020-02-19 Thread Max Reitz
On 17.01.20 11:58, Max Reitz wrote: > Hi, > > https://bugs.launchpad.net/qemu/+bug/1859989 reports that fields in > "qemu-img snapshot -l"s output are not always separated by spaces in > 4.1.1. Fix that. > > > Branch: https://github.com/XanClic/qemu.git lp-1859989-v1 > Branch:

Re: [PATCH v2 0/5] block: Generic file creation fallback

2020-02-19 Thread Maxim Levitsky
On Wed, 2020-02-19 at 11:38 +0100, Max Reitz wrote: > On 22.01.20 17:45, Max Reitz wrote: > > Hi, > > > > As version 1, this series adds a fallback path for creating files (on > > the protocol layer) if the protocol driver does not support file > > creation, but the file already exists. > > > >

Re: [PATCH 5/5] aio-posix: make AioHandler dispatch O(1) with epoll

2020-02-19 Thread Sergio Lopez
On Fri, Feb 14, 2020 at 05:17:12PM +, Stefan Hajnoczi wrote: > File descriptor monitoring is O(1) with epoll(7), but > aio_dispatch_handlers() still scans all AioHandlers instead of > dispatching just those that are ready. This makes aio_poll() O(n) with > respect to the total number of

Re: Cross-project NBD extension proposal: NBD_INFO_INIT_STATE

2020-02-19 Thread Max Reitz
On 18.02.20 21:55, Eric Blake wrote: > On 2/17/20 9:13 AM, Max Reitz wrote: >> Hi, >> >> It’s my understanding that without some is_zero infrastructure for QEMU, >> it’s impossible to implement this flag in qemu’s NBD server. > > You're right that we may need some more infrastructure before being

Re: [PATCH] util/async: make bh_aio_poll() O(1)

2020-02-19 Thread Paolo Bonzini
Really a great idea, though I have some remarks on the implementation below. On 19/02/20 11:00, Stefan Hajnoczi wrote: > + * Each aio_bh_poll() call carves off a slice of the BH list. This way newly > + * scheduled BHs are not processed until the next aio_bh_poll() call. This > + * concept

Re: [PATCH 5/5] aio-posix: make AioHandler dispatch O(1) with epoll

2020-02-19 Thread Paolo Bonzini
On 14/02/20 18:17, Stefan Hajnoczi wrote: > +while ((node = QLIST_FIRST(ready_list))) { > +QLIST_SAFE_REMOVE(node, node_ready); Why does this need safe remove? Paolo > +progress = aio_dispatch_handler(ctx, node) || progress; > +}

[PATCH] util/async: make bh_aio_poll() O(1)

2020-02-19 Thread Stefan Hajnoczi
The ctx->first_bh list contains all created BHs, including those that are not scheduled. The list is iterated by the event loop and therefore has O(n) time complexity with respected to the number of created BHs. Rewrite BHs so that only scheduled or deleted BHs are enqueued. Only BHs that

[PULL 02/17] Report stringified errno in VFIO related errors

2020-02-19 Thread Laurent Vivier
From: Michal Privoznik In a few places we report errno formatted as a negative integer. This is not as user friendly as it can be. Use strerror() and/or error_setg_errno() instead. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko Reviewed-by: Cornelia Huck Reviewed-by: Eric Auger

[PULL 06/17] hw/m68k/next-cube: Remove superfluous semicolon

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fixes: 956a78118bf Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20200218094402.26625-7-phi...@redhat.com> Signed-off-by: Laurent Vivier --- hw/m68k/next-cube.c | 2 +-

[PULL 07/17] hw/scsi/esp: Remove superfluous semicolon

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fixes: 74d71ea16bc Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20200218094402.26625-8-phi...@redhat.com> Signed-off-by: Laurent Vivier --- hw/scsi/esp.c | 2 +- 1 file

[PULL 00/17] Trivial branch patches

2020-02-19 Thread Laurent Vivier
The following changes since commit 6c599282f8ab382fe59f03a6cae755b89561a7b3: Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2020-02-15-v2' into staging (2020-02-17 13:32:25 +) are available in the Git repository at: git://github.com/vivier/qemu.git

[PULL 04/17] audio/alsaaudio: Remove superfluous semicolons

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fixes: 286a5d201e4 Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20200218094402.26625-3-phi...@redhat.com> Signed-off-by: Laurent Vivier --- audio/alsaaudio.c | 4 ++--

[PULL 11/17] tests/qtest/libqos/qgraph: Remove superfluous semicolons

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fixes: fc281c80202 Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20200218094402.26625-13-phi...@redhat.com> Signed-off-by: Laurent Vivier --- tests/qtest/libqos/qgraph.c

[PULL 10/17] target/i386/whpx: Remove superfluous semicolon

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fixes: 812d49f2a3e Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20200218094402.26625-12-phi...@redhat.com> Signed-off-by: Laurent Vivier --- target/i386/whpx-all.c | 2

Re: [PATCH v4 3/4] qmp: Move dispatcher to a coroutine

2020-02-19 Thread Kevin Wolf
Am 19.02.2020 um 10:03 hat Markus Armbruster geschrieben: > >> >> @@ -246,8 +287,15 @@ void monitor_qmp_bh_dispatcher(void *data) > >> >>} > >> >>qmp_request_free(req_obj); > >> >> > >> >> -/* Reschedule instead of looping so the main loop stays > >> >> responsive

[PULL 16/17] hw/nios2:fix leak of fdevice tree blob

2020-02-19 Thread Laurent Vivier
From: Chen Qun The device tree blob returned by load_device_tree is malloced. We should free it after cpu_physical_memory_write(). Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Laurent Vivier Message-Id: <20200218091154.21696-2-kuhn.chen...@huawei.com> Signed-off-by: Laurent

[PULL 08/17] hw/vfio/display: Remove superfluous semicolon

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fixes: 8b818e059bf Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20200218094402.26625-9-phi...@redhat.com> Signed-off-by: Laurent Vivier --- hw/vfio/display.c | 2 +- 1

[PULL 09/17] ui/input-barrier: Remove superfluous semicolon

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fixes: 6105683da35 Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20200218094402.26625-11-phi...@redhat.com> Signed-off-by: Laurent Vivier --- ui/input-barrier.c | 2 +-

Re: [PATCH 2/5] aio-posix: don't pass ns timeout to epoll_wait()

2020-02-19 Thread Sergio Lopez
On Fri, Feb 14, 2020 at 05:17:09PM +, Stefan Hajnoczi wrote: > Don't pass the nanosecond timeout into epoll_wait(), which expects > milliseconds. > > The epoll_wait() timeout value does not matter if qemu_poll_ns() > determined that the poll fd is ready, but passing a value in the wrong >

[PULL 05/17] hw/arm/xlnx-versal: Remove superfluous semicolon

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fixes: 6f16da53ffe Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20200218094402.26625-6-phi...@redhat.com> Signed-off-by: Laurent Vivier --- hw/arm/xlnx-versal-virt.c |

[PULL 03/17] scripts/checkpatch.pl: Detect superfluous semicolon in C code

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Display error when a commit contains superfluous semicolon: $ git show 6663a0a3376 | scripts/checkpatch.pl -q - ERROR: superfluous trailing semicolon #276: FILE: block/io_uring.c:186: +ret = -ENOSPC;; total: 1 errors, 1 warnings, 485 lines

[PULL 12/17] contrib/rdmacm-mux: Remove superfluous semicolon

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fixes: a5d2f6f8773 Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id: <20200218094402.26625-14-phi...@redhat.com> Signed-off-by: Laurent Vivier --- contrib/rdmacm-mux/main.c |

[PULL 01/17] mailmap: Add entry for Yu-Chen Lin

2020-02-19 Thread Laurent Vivier
From: Yu-Chen Lin I have two mail address, add entries for showing author and email correctly. Signed-off-by: Yu-Chen Lin Reviewed-by: Philippe Mathieu-Daudé Acked-by: Yu-Chen Lin Message-Id: <20200206125504.7150-1-npes87...@gmail.com> Signed-off-by: Laurent Vivier --- .mailmap | 3 ++- 1

[PULL 13/17] hw/display/qxl: Remove unneeded variable assignment

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fix warning reported by Clang static code analyzer: hw/display/qxl.c:1634:14: warning: Value stored to 'orig_io_port' during its initialization is never read uint32_t orig_io_port = io_port; ^~~~ ~~~ Reported-by: Clang Static

[PULL 15/17] hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP)

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fix warnings reported by Clang static code analyzer: CC hw/net/rocker/rocker.o hw/net/rocker/rocker.c:213:9: warning: Value stored to 'tx_tso_mss' is never read tx_tso_mss = rocker_tlv_get_le16(tlvs[ROCKER_TLV_TX_TSO_MSS]); ^

[PULL 14/17] hw/block/pflash_cfi02: Remove unneeded variable assignment

2020-02-19 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Fix warning reported by Clang static code analyzer: CC hw/block/pflash_cfi02.o hw/block/pflash_cfi02.c:311:5: warning: Value stored to 'ret' is never read ret = -1; ^ ~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe

Re: [PATCH] iotests/279: Fix for non-qcow2 formats

2020-02-19 Thread Max Reitz
On 19.12.19 15:42, Max Reitz wrote: > First, driver=qcow2 will not work so well with non-qcow2 formats (and > this test claims to support qcow, qed, and vmdk). > > Second, vmdk will always report the backing file format to be vmdk. > Filter that out so the output looks like for all other formats.

Re: [PATCH 3/5] qemu/queue.h: add QLIST_SAFE_REMOVE()

2020-02-19 Thread Sergio Lopez
On Fri, Feb 14, 2020 at 05:17:10PM +, Stefan Hajnoczi wrote: > QLIST_REMOVE() assumes the element is in a list. It also leaves the > element's linked list pointers dangling. > > Introduce a safe version of QLIST_REMOVE() and convert open-coded > instances of this pattern. > > Signed-off-by:

[PULL 17/17] hw/xtensa/xtfpga:fix leak of fdevice tree blob

2020-02-19 Thread Laurent Vivier
From: Chen Qun The device tree blob returned by load_device_tree is malloced. We should free it after cpu_physical_memory_write(). Reported-by: Euler Robot Signed-off-by: Chen Qun Acked-by: Max Filippov Reviewed-by: Laurent Vivier Message-Id: <20200218091154.21696-4-kuhn.chen...@huawei.com>