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

2020-05-11 Thread Li Feng
Hi, Dima. If vhost_migration_log return < 0, then vhost_log_global_start will trigger a crash. Does your patch have process this abort? If a disconnect happens in the migration stage, the correct operation is to stop the migration, right? 841 static void vhost_log_global_start(MemoryListener

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

2020-05-11 Thread Jason Wang
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 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 Jason Wang
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 time during initialization not all vring buffers (for instance used vring) can be intialized successfully. If the

Re: [PATCH v3 3/9] block: Make it easier to learn which BDS support bitmaps

2020-05-11 Thread Eric Blake
On 5/11/20 1:16 PM, Eric Blake wrote: On 5/11/20 4:21 AM, Max Reitz wrote: +++ b/include/block/block_int.h @@ -560,6 +560,7 @@ struct BlockDriver {    uint64_t parent_perm, uint64_t parent_shared,    uint64_t *nperm, uint64_t

[PATCH] hw: Use QEMU_IS_ALIGNED() on parallel flash block size

2020-05-11 Thread Philippe Mathieu-Daudé
Use the QEMU_IS_ALIGNED() macro to verify the flash block size is properly aligned. It is quicker to process when reviewing. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/sbsa-ref.c | 2 +- hw/arm/virt.c | 2 +- hw/block/pflash_cfi01.c | 2 +- hw/block/pflash_cfi02.c | 2 +-

Re: [PATCH 2/5] io/channel.c,io/channel-socket.c: Add yank feature

2020-05-11 Thread Lukas Straub
On Mon, 11 May 2020 12:51:46 +0100 Daniel P. Berrangé wrote: > On Mon, May 11, 2020 at 01:14:41PM +0200, Lukas Straub wrote: > > Add qio_channel_set_yank function to channel and to channel-socket, > > which will register a yank function. The yank function calls > > shutdown() on the socket. > >

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-11 Thread Lukas Straub
On Mon, 11 May 2020 13:17:14 +0100 Daniel P. Berrangé wrote: > On Mon, May 11, 2020 at 01:07:18PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > > > > Hello Everyone, > > > > In

Re: [PATCH v5 14/15] acpi: q35: drop _SB.PCI0.ISA.LPCD opregion.

2020-05-11 Thread Igor Mammedov
On Thu, 7 May 2020 15:16:39 +0200 Gerd Hoffmann wrote: > Seems to be unused. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/i386/acpi-build.c | 11 --- > 1 file changed, 11 deletions(-) > > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c > index

Re: [PATCH v5 13/15] acpi: drop build_piix4_pm()

2020-05-11 Thread Igor Mammedov
On Thu, 7 May 2020 15:16:38 +0200 Gerd Hoffmann wrote: > The _SB.PCI0.PX13.P13C opregion (holds isa device enable bits) > is not used any more, remove it from DSDT. > > Signed-off-by: Gerd Hoffmann > --- > hw/i386/acpi-build.c | 16 > 1 file changed, 16 deletions(-) > >

Re: [PATCH v5 12/15] acpi: drop serial/parallel enable bits from dsdt

2020-05-11 Thread Igor Mammedov
On Thu, 7 May 2020 15:16:37 +0200 Gerd Hoffmann wrote: > The _STA methods for COM+LPT used to reference them, > but that isn't the case any more. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/i386/acpi-build.c | 23 --- > 1 file changed, 23

Re: [PATCH v5 03/15] acpi: rtc: use a single crs range

2020-05-11 Thread Igor Mammedov
On Thu, 7 May 2020 15:16:28 +0200 Gerd Hoffmann wrote: > Use a single io range for _CRS instead of two, > following what real hardware does. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/rtc/mc146818rtc.c | 8 +--- > 1 file changed, 5 insertions(+), 3

[PATCH 1/2] aio-posix: don't duplicate fd handler deletion in fdmon_io_uring_destroy()

2020-05-11 Thread Stefan Hajnoczi
The io_uring file descriptor monitoring implementation has an internal list of fd handlers that are pending submission to io_uring. fdmon_io_uring_destroy() deletes all fd handlers on the list. Don't delete fd handlers directly in fdmon_io_uring_destroy() for two reasons: 1. This duplicates the

[PATCH 2/2] aio-posix: disable fdmon-io_uring when GSource is used

2020-05-11 Thread Stefan Hajnoczi
The glib event loop does not call fdmon_io_uring_wait() so fd handlers waiting to be submitted build up in the list. There is no benefit is using io_uring when the glib GSource is being used, so disable it instead of implementing a more complex fix. This fixes a memory leak where AioHandlers

[PATCH 0/2] aio-posix: fix fdmon-io_uring memory leak

2020-05-11 Thread Stefan Hajnoczi
This bug was introduced in QEMU 5.0 and causes guests to slow down because AioHandlers are not freed when the fdmon-io_uring file descriptor monitoring implementation is used by the main loop thread's glib event loop. This issue does not apply to IOThread usage of fdmon-io_uring. In practice few

Re: [PATCH v3 05/17] block/io: support int64_t bytes in bdrv_co_do_pwrite_zeroes()

2020-05-11 Thread Eric Blake
On 5/11/20 12:17 PM, Alberto Garcia wrote: On Thu 30 Apr 2020 01:10:21 PM CEST, Vladimir Sementsov-Ogievskiy wrote: compute 'int tail' via % 'int alignment' - safe tail = (offset + bytes) % alignment; both are int64_t, no chance of overflow here? Good question - I know several

Re: [PATCH v3 7/9] qcow2: Expose bitmaps' size during measure

2020-05-11 Thread Eric Blake
On 5/11/20 6:50 AM, Max Reitz wrote: On 08.05.20 20:03, Eric Blake wrote: It's useful to know how much space can be occupied by qcow2 persistent bitmaps, even though such metadata is unrelated to the guest-visible data. Report this value as an additional field, present when measuring an

Re: [PATCH v3 6/9] qemu-img: Add bitmap sub-command

2020-05-11 Thread Eric Blake
On 5/11/20 6:10 AM, Max Reitz wrote: On 08.05.20 20:03, Eric Blake wrote: Include actions for --add, --remove, --clear, --enable, --disable, and --merge (note that --clear is a bit of fluff, because the same can be accomplished by removing a bitmap and then adding a new one in its place, but it

Re: [PATCH v3 3/9] block: Make it easier to learn which BDS support bitmaps

2020-05-11 Thread Eric Blake
On 5/11/20 4:21 AM, Max Reitz wrote: On 08.05.20 20:03, Eric Blake wrote: Upcoming patches will enhance bitmap support in qemu-img, but in doing so, it turns out to be nice to suppress output when bitmaps make no sense (such as on a qcow2 v2 image). Add a hook to make this easier to query. In

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-11 Thread Lukas Straub
On Mon, 11 May 2020 12:49:47 +0100 Daniel P. Berrangé wrote: > On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > > Hello Everyone, > > In many cases, if qemu has a network connection (qmp, migration, chardev, > > etc.) > > to some other server and that server dies or hangs, qemu

Re: [PATCH 3/5] block/nbd.c: Add yank feature

2020-05-11 Thread Dr. David Alan Gilbert
* Lukas Straub (lukasstra...@web.de) wrote: > On Mon, 11 May 2020 17:19:09 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Lukas Straub (lukasstra...@web.de) wrote: > > > Add yank option, pass it to the socket-channel and register a yank > > > function which sets s->state = NBD_CLIENT_QUIT. This

Re: [PATCH v3 05/17] block/io: support int64_t bytes in bdrv_co_do_pwrite_zeroes()

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:21 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > compute 'int tail' via % 'int alignment' - safe tail = (offset + bytes) % alignment; both are int64_t, no chance of overflow here? Berto

Re: [PATCH 3/5] block/nbd.c: Add yank feature

2020-05-11 Thread Lukas Straub
On Mon, 11 May 2020 17:19:09 +0100 "Dr. David Alan Gilbert" wrote: > * Lukas Straub (lukasstra...@web.de) wrote: > > Add yank option, pass it to the socket-channel and register a yank > > function which sets s->state = NBD_CLIENT_QUIT. This is the same > > behaviour as if an error occured. > >

[RFC] bdrv_flush: only use fast path when in owned AioContext

2020-05-11 Thread Stefan Reiter
Just because we're in a coroutine doesn't imply ownership of the context of the flushed drive. In such a case use the slow path which explicitly enters bdrv_flush_co_entry in the correct AioContext. Signed-off-by: Stefan Reiter --- We've experienced some lockups in this codepath when taking

[PATCH 0/2] iotests: Run pylint and mypy in a testcase

2020-05-11 Thread Kevin Wolf
Kevin Wolf (2): iotests: Fix incomplete type declarations iotests: Run pylint and mypy in a testcase tests/qemu-iotests/iotests.py | 8 +++ tests/qemu-iotests/297| 44 +++ tests/qemu-iotests/297.out| 3 +++ tests/qemu-iotests/group | 1

[PATCH 2/2] iotests: Run pylint and mypy in a testcase

2020-05-11 Thread Kevin Wolf
We made sure that iotests.py passes pylint. It would be a shame if we allowed new patches in that break this again, so let's just add a meta-test case that runs pylint on it. While we don't pass mypy --strict yet, we can already run it with a few options that would be part of --strict to make

[PATCH 1/2] iotests: Fix incomplete type declarations

2020-05-11 Thread Kevin Wolf
We need to fix only a few places so that iotests.py can pass mypy --disallow-incomplete-defs, which seems to be a desirable option to have enabled in the long run. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

Re: [PATCH v3 04/17] block/io: use int64_t bytes in driver wrappers

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:20 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > We are generally moving to int64_t for both offset and bytes parameters > on all io paths. > > Main motivation is realization of 64-bit write_zeroes operation for > fast zeroing large disk chunks, up to the whole disk. > >

Re: [PATCH 3/5] block/nbd.c: Add yank feature

2020-05-11 Thread Dr. David Alan Gilbert
* Lukas Straub (lukasstra...@web.de) wrote: > Add yank option, pass it to the socket-channel and register a yank > function which sets s->state = NBD_CLIENT_QUIT. This is the same > behaviour as if an error occured. > > Signed-off-by: Lukas Straub > +static void nbd_yank(void *opaque) > +{ > +

Re: [PATCH v3 03/17] block/io: use int64_t bytes parameter in bdrv_check_byte_request()

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:19 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > We are generally moving to int64_t for both offset and bytes parameters > on all io paths. > > Main motivation is realization of 64-bit write_zeroes operation for > fast zeroing large disk chunks, up to the whole disk. > >

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-11 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, May 11, 2020 at 01:07:18PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > > > > Hello Everyone, > > > > In many cases, if

Re: [PATCH v2 4/4] iotests: Mirror with different source/target size

2020-05-11 Thread Max Reitz
On 11.05.20 15:58, Kevin Wolf wrote: > This tests that the mirror job catches situations where the target node > has a different size than the source node. It must also forbid resize > operations when the job is already running. > > Signed-off-by: Kevin Wolf > Message-Id:

Re: [PATCH v2 1/4] iotests/109: Don't mirror with mismatched size

2020-05-11 Thread Max Reitz
On 11.05.20 17:29, Kevin Wolf wrote: > Am 11.05.2020 um 17:08 hat Max Reitz geschrieben: >> On 11.05.20 15:58, Kevin Wolf wrote: >>> This patch makes the raw image the same size as the file in a different >>> format that is mirrored as raw to it to avoid errors when mirror starts >>> to enforce

Re: [PATCH v2 2/4] iotests/229: Use blkdebug to inject an error

2020-05-11 Thread Kevin Wolf
Am 11.05.2020 um 17:18 hat Max Reitz geschrieben: > On 11.05.20 15:58, Kevin Wolf wrote: > > 229 relies on the mirror running into an I/O error when the target is > > smaller than the source. After changing mirror to catch this condition > > while starting the job, this test case won't get a job

Re: [PATCH v3 02/17] block: use int64_t as bytes type in tracked requests

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:18 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > We are generally moving to int64_t for both offset and bytes parameters > on all io paths. > > Main motivation is realization of 64-bit write_zeroes operation for > fast zeroing large disk chunks, up to the whole disk. > >

Re: [PATCH v2 3/4] mirror: Make sure that source and target size match

2020-05-11 Thread Max Reitz
On 11.05.20 15:58, Kevin Wolf wrote: > If the target is shorter than the source, mirror would copy data until > it reaches the end of the target and then fail with an I/O error when > trying to write past the end. > > If the target is longer than the source, the mirror job would complete >

Re: [PATCH v2 1/4] iotests/109: Don't mirror with mismatched size

2020-05-11 Thread Kevin Wolf
Am 11.05.2020 um 17:08 hat Max Reitz geschrieben: > On 11.05.20 15:58, Kevin Wolf wrote: > > This patch makes the raw image the same size as the file in a different > > format that is mirrored as raw to it to avoid errors when mirror starts > > to enforce that source and target are the same size.

Re: [PATCH v3 01/17] block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes

2020-05-11 Thread Alberto Garcia
On Thu 30 Apr 2020 01:10:17 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > The function is called from 64bit io handlers, and bytes is just passed > to throttle_account() which is 64bit too (unsigned though). So, let's > convert intermediate argument to 64bit too. > > This patch is a first in the

Re: [PATCH v2 2/4] iotests/229: Use blkdebug to inject an error

2020-05-11 Thread Max Reitz
On 11.05.20 15:58, Kevin Wolf wrote: > 229 relies on the mirror running into an I/O error when the target is > smaller than the source. After changing mirror to catch this condition > while starting the job, this test case won't get a job that is paused > for an I/O error any more. Use blkdebug

Re: [PATCH v2 1/4] iotests/109: Don't mirror with mismatched size

2020-05-11 Thread Max Reitz
On 11.05.20 15:58, Kevin Wolf wrote: > This patch makes the raw image the same size as the file in a different > format that is mirrored as raw to it to avoid errors when mirror starts > to enforce that source and target are the same size. > > We check only that the first 512 bytes are zeroed

[PATCH 1/2] When del child, next_child_index need to subtract 1. Otherwise, the index will get bigger and bigger.

2020-05-11 Thread quweijie
From: quweijie Signed-off-by: quweijie --- block/quorum.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/quorum.c b/block/quorum.c index 6d7a56b..a8272fe 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -1096,6 +1096,7 @@ static void quorum_del_child(BlockDriverState *bs,

[PATCH v2 0/4] mirror: Make sure that source and target size match

2020-05-11 Thread Kevin Wolf
Same thing as the recent fix for backup, except that mirror already forbids resizing during the job. So what remains is checking that the sizes match at the start of the job. v2: - Added patch 1 to fix a test that used different source/target size Kevin Wolf (4): iotests/109: Don't mirror with

[PATCH v2 4/4] iotests: Mirror with different source/target size

2020-05-11 Thread Kevin Wolf
This tests that the mirror job catches situations where the target node has a different size than the source node. It must also forbid resize operations when the job is already running. Signed-off-by: Kevin Wolf Message-Id: <20200507145228.323412-4-kw...@redhat.com> Reviewed-by: Eric Blake

[PATCH v2 2/4] iotests/229: Use blkdebug to inject an error

2020-05-11 Thread Kevin Wolf
229 relies on the mirror running into an I/O error when the target is smaller than the source. After changing mirror to catch this condition while starting the job, this test case won't get a job that is paused for an I/O error any more. Use blkdebug instead to inject an error. Signed-off-by:

[PATCH v2 3/4] mirror: Make sure that source and target size match

2020-05-11 Thread Kevin Wolf
If the target is shorter than the source, mirror would copy data until it reaches the end of the target and then fail with an I/O error when trying to write past the end. If the target is longer than the source, the mirror job would complete successfully, but the target wouldn't actually be an

[PATCH v2 1/4] iotests/109: Don't mirror with mismatched size

2020-05-11 Thread Kevin Wolf
This patch makes the raw image the same size as the file in a different format that is mirrored as raw to it to avoid errors when mirror starts to enforce that source and target are the same size. We check only that the first 512 bytes are zeroed (instead of 64k) because some image formats create

Re: [PATCH v5 00/18] nvme: refactoring and cleanups

2020-05-11 Thread Kevin Wolf
Am 11.05.2020 um 09:09 hat Klaus Jensen geschrieben: > On May 11 09:00, Philippe Mathieu-Daudé wrote: > > Hi Klaus, > > > > On 5/11/20 8:25 AM, Klaus Jensen wrote: > > > On May 5 07:48, Klaus Jensen wrote: > > > > From: Klaus Jensen > > > > > > > > Changes since v5 > > > > >

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-11 Thread Daniel P . Berrangé
On Mon, May 11, 2020 at 01:07:18PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > > > Hello Everyone, > > > In many cases, if qemu has a network connection (qmp, migration, chardev, > > >

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-11 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > > Hello Everyone, > > In many cases, if qemu has a network connection (qmp, migration, chardev, > > etc.) > > to some other server and that server dies or hangs, qemu hangs too. >

Re: [PATCH v3 9/9] iotests: Add test 291 to for qemu-img bitmap coverage

2020-05-11 Thread Max Reitz
On 08.05.20 20:03, Eric Blake wrote: > Add a new test covering the 'qemu-img bitmap' subcommand, as well as > 'qemu-img convert --bitmaps', both added in recent patches. > > Signed-off-by: Eric Blake > --- > tests/qemu-iotests/291 | 112 + >

Re: [PATCH v3 8/9] qemu-img: Add convert --bitmaps option

2020-05-11 Thread Max Reitz
On 08.05.20 20:03, Eric Blake wrote: > Make it easier to copy all the persistent bitmaps of (the top layer > of) a source image along with its guest-visible contents, by adding a > boolean flag for use with qemu-img convert. This is basically > shorthand, as the same effect could be accomplished

Re: [PATCH 2/5] io/channel.c,io/channel-socket.c: Add yank feature

2020-05-11 Thread Daniel P . Berrangé
On Mon, May 11, 2020 at 01:14:41PM +0200, Lukas Straub wrote: > Add qio_channel_set_yank function to channel and to channel-socket, > which will register a yank function. The yank function calls > shutdown() on the socket. > > Signed-off-by: Lukas Straub > --- > Makefile.objs | 1

Re: [PATCH v3 7/9] qcow2: Expose bitmaps' size during measure

2020-05-11 Thread Max Reitz
On 08.05.20 20:03, Eric Blake wrote: > It's useful to know how much space can be occupied by qcow2 persistent > bitmaps, even though such metadata is unrelated to the guest-visible > data. Report this value as an additional field, present when > measuring an existing image and the output format

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-11 Thread Daniel P . Berrangé
On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > Hello Everyone, > In many cases, if qemu has a network connection (qmp, migration, chardev, > etc.) > to some other server and that server dies or hangs, qemu hangs too. If qemu as a whole hangs due to a stalled network connection,

[PATCH 4/5] chardev/char-socket.c: Add yank feature

2020-05-11 Thread Lukas Straub
Add yank option which is passed to the socket-channel. Signed-off-by: Lukas Straub --- chardev/char-socket.c | 8 chardev/char.c| 3 +++ qapi/char.json| 5 - 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c

[PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-11 Thread Lukas Straub
Hello Everyone, In many cases, if qemu has a network connection (qmp, migration, chardev, etc.) to some other server and that server dies or hangs, qemu hangs too. These patches introduce the new 'yank' out-of-band qmp command to recover from these kinds of hangs. The different subsystems register

[PATCH 5/5] migration: Add yank feature

2020-05-11 Thread Lukas Straub
Add yank option which is passed to the socket-channel. Signed-off-by: Lukas Straub --- migration/channel.c | 2 ++ migration/migration.c | 11 +++ qapi/migration.json | 17 ++--- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/migration/channel.c

[PATCH 2/5] io/channel.c,io/channel-socket.c: Add yank feature

2020-05-11 Thread Lukas Straub
Add qio_channel_set_yank function to channel and to channel-socket, which will register a yank function. The yank function calls shutdown() on the socket. Signed-off-by: Lukas Straub --- Makefile.objs | 1 + include/io/channel-socket.h | 1 + include/io/channel.h| 12

[PATCH 3/5] block/nbd.c: Add yank feature

2020-05-11 Thread Lukas Straub
Add yank option, pass it to the socket-channel and register a yank function which sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub --- Makefile.objs| 1 + block/nbd.c | 68

[PATCH 1/5] Introduce yank feature

2020-05-11 Thread Lukas Straub
The yank feature allows to recover from hanging qemu by "yanking" at various parts. Other qemu systems can register yank functions which will be called by the 'yank' out-of-band qmp command. Signed-off-by: Lukas Straub --- qapi/misc.json | 15 ++ softmmu/vl.c | 2 ++ yank.c |

Re: [PATCH v3 6/9] qemu-img: Add bitmap sub-command

2020-05-11 Thread Max Reitz
On 08.05.20 20:03, Eric Blake wrote: > Include actions for --add, --remove, --clear, --enable, --disable, and > --merge (note that --clear is a bit of fluff, because the same can be > accomplished by removing a bitmap and then adding a new one in its > place, but it matches what QMP commands

Re: [PATCH v3 5/9] blockdev: Split off basic bitmap operations for qemu-img

2020-05-11 Thread Max Reitz
On 08.05.20 20:03, Eric Blake wrote: > Upcoming patches want to add some basic bitmap manipulation abilities > to qemu-img. But blockdev.o is too heavyweight to link into qemu-img > (among other things, it would drag in block jobs and transaction > support - qemu-img does offline manipulation,

Re: [PATCH 1/2] When del child, next_child_index need to subtract 1. Otherwise, the index will get bigger and bigger.

2020-05-11 Thread Alberto Garcia
On Mon 11 May 2020 12:00:30 PM CEST, quwei...@huayun.com wrote: > diff --git a/block/quorum.c b/block/quorum.c > index 6d7a56b..a8272fe 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -1096,6 +1096,7 @@ static void quorum_del_child(BlockDriverState *bs, > BdrvChild *child, >

Re: [PATCH 0/2] hw/block/nvme: fixes for interrupt behavior

2020-05-11 Thread Klaus Jensen
On May 11 09:09, Philippe Mathieu-Daudé wrote: > + Michael & Marcel for MSIX, > and ping to Keith :) > I'll await some feedback here before moving these fixes into my "nvme: refactoring and cleanups" series. Not sure if this should go directly to master or block-next.

Re: [PATCH v2 4/4] exec: Rename qemu_ram_writeback() as qemu_ram_msync()

2020-05-11 Thread Stefan Hajnoczi
On Mon, May 11, 2020 at 10:17:19AM +0200, Philippe Mathieu-Daudé wrote: > Rename qemu_ram_writeback() as qemu_ram_msync() to better > match what it does. Based on Juan's comment in the other email thread I think this commit description could be expanded. Let's explain the rationale for this

Re: [PATCH v3 4/9] blockdev: Promote several bitmap functions to non-static

2020-05-11 Thread Max Reitz
On 08.05.20 20:03, Eric Blake wrote: > The next patch will split blockdev.c, which will require accessing > some previously-static functions from more than one .c file. But part > of promoting a function to public is picking a naming scheme that does > not reek of exposing too many internals (two

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 with race conditions and failing migrations. > >

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 > >disconnect happened in the

Re: [PATCH v3 3/9] block: Make it easier to learn which BDS support bitmaps

2020-05-11 Thread Max Reitz
On 08.05.20 20:03, Eric Blake wrote: > Upcoming patches will enhance bitmap support in qemu-img, but in doing > so, it turns out to be nice to suppress output when bitmaps make no > sense (such as on a qcow2 v2 image). Add a hook to make this easier > to query. > > In the future, when we improve

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 buffer was not initialized then

Re: [PATCH v3 2/9] qemu-img: Fix stale comments on doc location

2020-05-11 Thread Max Reitz
On 08.05.20 20:03, Eric Blake wrote: > Missed in commit e13c59fa. > > Signed-off-by: Eric Blake > --- > qemu-img.c | 2 +- > qemu-img-cmds.hx | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

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 > > ->set_guest_notifiers(..., ...,

[PATCH v2 4/4] exec: Rename qemu_ram_writeback() as qemu_ram_msync()

2020-05-11 Thread Philippe Mathieu-Daudé
Rename qemu_ram_writeback() as qemu_ram_msync() to better match what it does. Suggested-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- include/exec/ram_addr.h | 4 ++-- exec.c | 2 +- memory.c| 3 +-- 3 files changed, 4 insertions(+), 5

[PATCH v2 0/4] memory: Add memory_region_sync() & make NVMe emulated device generic

2020-05-11 Thread Philippe Mathieu-Daudé
Remove the pointless dirty_log_mask check before msync'ing, let the NVMe emulated device be target-agnostic. Supersedes: <20200508062456.23344-1-phi...@redhat.com> Philippe Mathieu-Daudé (4): memory: Simplify memory_region_do_writeback() memory: Rename memory_region_do_writeback() ->

[PATCH v2 2/4] memory: Rename memory_region_do_writeback() -> memory_region_sync()

2020-05-11 Thread Philippe Mathieu-Daudé
We usually use '_do_' for internal functions. Rename memory_region_do_writeback() as memory_region_sync() to better reflect what it does. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 13 +++-- memory.c | 2 +-

[PATCH v2 3/4] hw/block: Let the NVMe emulated device be target-agnostic

2020-05-11 Thread Philippe Mathieu-Daudé
Now than the non-target specific memory_region_sync() function is available, use it to make this device target-agnostic. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/block/nvme.c| 6 ++ hw/block/Makefile.objs | 2 +- 2 files changed, 3 insertions(+),

[PATCH v2 1/4] memory: Simplify memory_region_do_writeback()

2020-05-11 Thread Philippe Mathieu-Daudé
mr->dirty_log_mask tells if dirty tracking has been enabled, not if the page is dirty. It would always be true during live migration and when running on TCG, but otherwise it would always be false. As the value of mr->dirty_log_mask does not matter, remove the check. Cc: Beata Michalska

Re: [PATCH v5 00/18] nvme: refactoring and cleanups

2020-05-11 Thread Klaus Jensen
On May 11 09:00, Philippe Mathieu-Daudé wrote: > Hi Klaus, > > On 5/11/20 8:25 AM, Klaus Jensen wrote: > > On May 5 07:48, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Changes since v5 > > > > > > No functional changes, just updated Reviewed-by tags. Also, I

Re: [PATCH 0/2] hw/block/nvme: fixes for interrupt behavior

2020-05-11 Thread Philippe Mathieu-Daudé
+ Michael & Marcel for MSIX, and ping to Keith :) On 5/5/20 10:36 PM, Klaus Jensen wrote: From: Klaus Jensen Klaus Jensen (2): hw/block/nvme: fix pin-based interrupt behavior hw/block/nvme: allow use of any valid msix vector hw/block/nvme.c | 14 +- hw/block/nvme.h | 2

[PATCH] block/replication.c: Avoid cancelling the job twice

2020-05-11 Thread Lukas Straub
If qemu in colo secondary mode is stopped, it crashes because s->backup_job is canceled twice: First with job_cancel_sync_all() in qemu_cleanup() and then in replication_stop(). Fix this by assigning NULL to s->backup_job when the job completes so replication_stop() and

Re: [PATCH v5 00/18] nvme: refactoring and cleanups

2020-05-11 Thread Philippe Mathieu-Daudé
Hi Klaus, On 5/11/20 8:25 AM, Klaus Jensen wrote: On May 5 07:48, Klaus Jensen wrote: From: Klaus Jensen Changes since v5 No functional changes, just updated Reviewed-by tags. Also, I screwed up the CC list when sending v4. Philippe and Keith, please add a Reviewed-by to

Re: [PATCH v5 00/18] nvme: refactoring and cleanups

2020-05-11 Thread Klaus Jensen
On May 5 07:48, Klaus Jensen wrote: > From: Klaus Jensen > > Changes since v5 > > No functional changes, just updated Reviewed-by tags. Also, I screwed up > the CC list when sending v4. > > Philippe and Keith, please add a Reviewed-by to > > * "nvme: factor out pmr setup"