Re: [PATCH v3 0/3] various: Remove unnecessary casts

2020-05-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Remove unnecessary casts using coccinelle scripts. > > The CPU()/OBJECT() patches don't introduce logical change, > The DEVICE() one removes various OBJECT_CHECK() calls. Queued, thanks! Managing expecations: I'm not a QOM maintainer, I don't want to become

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
14.05.2020 21:29, Eric Blake wrote: reviving this thread... On 4/3/20 6:23 AM, Peter Krempa wrote: On Fri, Apr 03, 2020 at 14:02:47 +0300, Vladimir Sementsov-Ogievskiy wrote: 19.12.2019 13:36, Peter Krempa wrote: On Thu, Dec 19, 2019 at 11:51:01 +0300, Vladimir Sementsov-Ogievskiy wrote: Hi

Re: [PATCH v2] bitmaps: Update maintainer

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
14.05.2020 21:00, Eric Blake wrote: Dirty bitmaps are important to incremental backups, including exposure over NBD where I'm already maintainer. Also, I'm aware that lately I have been doing as much code/review on bitmaps as John Snow who is trying to scale back in order to focus elsewhere;

Re: [PATCH v3 2/3] various: Remove unnecessary OBJECT() cast

2020-05-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > The OBJECT() macro is defined as: > > #define OBJECT(obj) ((Object *)(obj)) > > Remove the unnecessary OBJECT() casts when we already know the > pointer is of Object type. > > Patch created mechanically using spatch with this script: > > @@ > typedef

Re: [PATCH v3 1/1] qemu_img: add cvtnum_full to print error reports

2020-05-14 Thread Eric Blake
On 5/13/20 8:36 AM, Eyal Moscovici wrote: All calls to cvtnum check the return value and print the same error message more or less. And so error reporting moved to cvtnum_full to reduce code duplication and provide a single error message. Additionally, cvtnum now wraps cvtnum_full with the

Re: [PATCH] hw/ide/ahci: Log lost IRQs

2020-05-14 Thread John Snow
On 5/4/20 5:48 AM, Philippe Mathieu-Daudé wrote: > One might find interesting to look at AHCI IRQs. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/ide/ahci.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c > index 13d91e109a..fc82cbd5f1 100644 >

Re: [PATCH] hw/ide: Make IDEDMAOps handlers take a const IDEDMA pointer

2020-05-14 Thread John Snow
On 5/12/20 3:49 PM, Philippe Mathieu-Daudé wrote: > Handlers don't need to modify the IDEDMA structure. > Make it const. > > Signed-off-by: Philippe Mathieu-Daudé I'll trust your judgment. As long as it still compiles and passes qtests, I'm happy if you're happy. Acked-by: John Snow > ---

[PATCH 3/3] iotests: Categorize NOTRUN messages as INFO, not WARNING

2020-05-14 Thread John Snow
It's not really a warning; we don't want to see it if we're not running in at least a verbose mode. We can see it on the test summary just fine. Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/3] iotests: log to stderr instead of stdout

2020-05-14 Thread John Snow
Separate the streams; stdout is for test diff output, stderr is for control messages and things for the human to look at. (Cough, unfortunately, I didn't realize that ./check actually just always redirects both, so even on STDERR, you can't see warnings. Oh well...) Signed-off-by: John Snow ---

[PATCH 0/3] iotests: enable logging prior to notrun() invocation

2020-05-14 Thread John Snow
Hi, you can take just patch 1. patches 2-3 admittedly don't do a whole heck of a lot, because I didn't realize that ./check discards *all* output from either stdout or stderr. The changes are tiny, though, and maybe still worth doing in the long run? Hm. They are archived on the list now, anyway.

[PATCH 1/3] iotests: log messages from notrun()

2020-05-14 Thread John Snow
Shift the logging initialization up to occur prior to validation checks, so that notrun() messages still get printed to console. (Also, remove the "debugging messages active" message, because we don't need to see that hundreds of times per iotest suite run.) Signed-off-by: John Snow ---

Re: [PATCH v10 14/14] iotests: use python logging for iotests.log()

2020-05-14 Thread John Snow
On 5/14/20 6:06 AM, Kevin Wolf wrote: > Am 14.05.2020 um 08:24 hat John Snow geschrieben: >> On 3/31/20 9:44 AM, Kevin Wolf wrote: >>> Am 31.03.2020 um 02:00 hat John Snow geschrieben: We can turn logging on/off globally instead of per-function. Remove use_log from run_job, and

Re: [PATCH v4 1/3] qmp.py: change event_wait to use a dict

2020-05-14 Thread John Snow
On 5/14/20 11:59 AM, Kevin Wolf wrote: > Am 14.05.2020 um 17:07 hat John Snow geschrieben: >> >> >> On 5/14/20 10:47 AM, Kevin Wolf wrote: >>> Am 14.05.2020 um 04:25 hat John Snow geschrieben: It's easier to work with than a list of tuples, because we can check the keys for

Re: [PATCH v4 3/3] iotests: modify test 040 to use JobRunner

2020-05-14 Thread John Snow
On 5/14/20 11:53 AM, Kevin Wolf wrote: > Am 14.05.2020 um 04:25 hat John Snow geschrieben: >> Instead of having somewhat reproduced it for itself. >> >> Signed-off-by: John Snow > > I think you should pass auto_dismiss=True to the JobRunner, or (probably > preferable) change

Re: [PATCH v4 2/3] iotests: add JobRunner class

2020-05-14 Thread John Snow
On 5/14/20 11:40 AM, Kevin Wolf wrote: > Am 14.05.2020 um 04:25 hat John Snow geschrieben: >> The idea is that instead of increasing the arguments to job_run all the >> time, create a more general-purpose job runner that can be subclassed to >> do interesting things with. >> >> pylint note: the

Re: [PATCH v2] bitmaps: Update maintainer

2020-05-14 Thread John Snow
On 5/14/20 2:00 PM, Eric Blake wrote: > Dirty bitmaps are important to incremental backups, including exposure > over NBD where I'm already maintainer. Also, I'm aware that lately I > have been doing as much code/review on bitmaps as John Snow who is > trying to scale back in order to focus

Re: [PATCH v2 4/5] migration/block-dirty-bitmap: fix bitmaps migration during mirror job

2020-05-14 Thread Eric Blake
On 12/19/19 2:51 AM, Vladimir Sementsov-Ogievskiy wrote: Important thing for bitmap migration is to select destination block node to obtain the migrated bitmap. Prepatch, on source we use bdrv_get_device_or_node_name() to identify the node, and on target we do bdrv_lookup_bs.

Re: [PATCH v2 1/5] block: Mark commit and mirror as filter drivers

2020-05-14 Thread Eric Blake
On 1/31/20 1:23 PM, Eric Blake wrote: On 12/19/19 2:51 AM, Vladimir Sementsov-Ogievskiy wrote: From: Max Reitz The commit and mirror block nodes are filters, so they should be marked as such. Signed-off-by: Max Reitz Signed-off-by: Vladimir Sementsov-Ogievskiy     [squash comment fix from

Re: [PATCH v2 3/5] block/dirty-bitmap: add bdrv_has_named_bitmaps helper

2020-05-14 Thread Eric Blake
On 12/19/19 2:51 AM, Vladimir Sementsov-Ogievskiy wrote: To be used for bitmap migration in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 1 + block/dirty-bitmap.c | 13 + 2 files changed, 14 insertions(+)

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-05-14 Thread Eric Blake
reviving this thread... On 4/3/20 6:23 AM, Peter Krempa wrote: On Fri, Apr 03, 2020 at 14:02:47 +0300, Vladimir Sementsov-Ogievskiy wrote: 19.12.2019 13:36, Peter Krempa wrote: On Thu, Dec 19, 2019 at 11:51:01 +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! It's a continuation for

[PATCH v2] bitmaps: Update maintainer

2020-05-14 Thread Eric Blake
Dirty bitmaps are important to incremental backups, including exposure over NBD where I'm already maintainer. Also, I'm aware that lately I have been doing as much code/review on bitmaps as John Snow who is trying to scale back in order to focus elsewhere; and many of the recent patches have come

Re: [PATCH] bitmaps: Add myself as maintainer

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
14.05.2020 16:52, Eric Blake wrote: On 5/14/20 12:08 AM, John Snow wrote: On 5/14/20 12:49 AM, Vladimir Sementsov-Ogievskiy wrote: 13.05.2020 23:24, John Snow wrote: On 5/13/20 10:14 AM, Eric Blake wrote: Dirty bitmaps are important to incremental backups, including exposure over NBD

Re: [PATCH 0/2] block/block-copy: Fix uninitialized variable in block_copy_task_entry

2020-05-14 Thread Kevin Wolf
Am 07.05.2020 um 14:11 hat Philippe Mathieu-Daudé geschrieben: > block_copy_task_entry() might be written differently to avoid > the initialization. This silents the warning and let me build. Thanks, applied to the block branch. Kevin

Re: [PATCH v6 04/14] block/amend: separate amend and create options for qemu-img

2020-05-14 Thread Eric Blake
On 5/14/20 7:28 AM, Max Reitz wrote: On 10.05.20 15:40, Maxim Levitsky wrote: Some options are only useful for creation (or hard to be amended, like cluster size for qcow2), while some other options are only useful for amend, like upcoming keyslot management options for luks +#define

Re: [PATCH v6 13/14] block/qcow2: implement blockdev-amend

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > Currently the implementation only supports amending the encryption > options, unlike the qemu-img version > > Signed-off-by: Maxim Levitsky > Reviewed-by: Daniel P. Berrangé > --- > block/qcow2.c| 39 +++ >

Re: [PATCH v6 12/14] block/crypto: implement blockdev-amend

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky > Reviewed-by: Daniel P. Berrangé > --- > block/crypto.c | 72 > qapi/block-core.json | 14 - > 2 files changed, 66 insertions(+), 20 deletions(-) Reviewed-by:

Re: [PATCH v4 1/3] qmp.py: change event_wait to use a dict

2020-05-14 Thread Kevin Wolf
Am 14.05.2020 um 17:07 hat John Snow geschrieben: > > > On 5/14/20 10:47 AM, Kevin Wolf wrote: > > Am 14.05.2020 um 04:25 hat John Snow geschrieben: > >> It's easier to work with than a list of tuples, because we can check the > >> keys for membership. > >> > >> Signed-off-by: John Snow > >>

Re: [PATCH v4 3/3] iotests: modify test 040 to use JobRunner

2020-05-14 Thread Kevin Wolf
Am 14.05.2020 um 04:25 hat John Snow geschrieben: > Instead of having somewhat reproduced it for itself. > > Signed-off-by: John Snow I think you should pass auto_dismiss=True to the JobRunner, or (probably preferable) change prepare_and_start_job() to start the job with auto_dismiss=False.

Re: [PATCH v6 11/14] block/core: add generic infrastructure for x-blockdev-amend qmp command

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > blockdev-amend will be used similiar to blockdev-create > to allow on the fly changes of the structure of the format based block > devices. > > Current plan is to first support encryption keyslot management for luks > based formats (raw and embedded in

Re: [PATCH v4 2/3] iotests: add JobRunner class

2020-05-14 Thread Kevin Wolf
Am 14.05.2020 um 04:25 hat John Snow geschrieben: > The idea is that instead of increasing the arguments to job_run all the > time, create a more general-purpose job runner that can be subclassed to > do interesting things with. > > pylint note: the 'callbacks' option guards against unused

Re: [PATCH v4 1/3] qmp.py: change event_wait to use a dict

2020-05-14 Thread John Snow
On 5/14/20 10:47 AM, Kevin Wolf wrote: > Am 14.05.2020 um 04:25 hat John Snow geschrieben: >> It's easier to work with than a list of tuples, because we can check the >> keys for membership. >> >> Signed-off-by: John Snow >> --- >> python/qemu/machine.py| 10 +- >>

Re: [PATCH 0/2] block/block-copy: Fix uninitialized variable in block_copy_task_entry

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/7/20 2:11 PM, Philippe Mathieu-Daudé wrote: block_copy_task_entry() might be written differently to avoid the initialization. This silents the warning and let me build. Philippe Mathieu-Daudé (2): block/block-copy: Fix uninitialized variable in block_copy_task_entry block/block-copy:

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

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
14.05.2020 17:20, Eric Blake wrote: On 5/14/20 1:45 AM, Vladimir Sementsov-Ogievskiy wrote: 13.05.2020 04:16, 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

Re: [PATCH v6 07/14] block/crypto: implement the encryption key management

2020-05-14 Thread Max Reitz
On 14.05.20 16:14, Daniel P. Berrangé wrote: > On Thu, May 14, 2020 at 04:09:59PM +0200, Max Reitz wrote: >> On 10.05.20 15:40, Maxim Levitsky wrote: >>> This implements the encryption key management using the generic code in >>> qcrypto layer and exposes it to the user via qemu-img >>> >>> This

Re: [PATCH v6 09/14] iotests: filter few more luks specific create options

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > This allows more tests to be able to have same output on both qcow2 luks > encrypted images > and raw luks images > > Signed-off-by: Maxim Levitsky > Reviewed-by: Daniel P. Berrangé > --- > tests/qemu-iotests/087.out | 6 ++--- >

Re: [PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread Eric Blake
On 5/14/20 9:29 AM, Eric Blake wrote: WARNING: Block comments use a leading /* on a separate line #20: FILE: qemu-nbd.c:919: +    /* Remember parents stderr only if the fork option is set. The comment could use some grammar help (s/parents/parent's/), and in truth, I don't think it

Re: [PATCH v4 1/3] qmp.py: change event_wait to use a dict

2020-05-14 Thread Kevin Wolf
Am 14.05.2020 um 04:25 hat John Snow geschrieben: > It's easier to work with than a list of tuples, because we can check the > keys for membership. > > Signed-off-by: John Snow > --- > python/qemu/machine.py| 10 +- > tests/qemu-iotests/040| 12 ++-- >

Re: [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext

2020-05-14 Thread Kevin Wolf
Am 14.05.2020 um 15:21 hat Thomas Lamprecht geschrieben: > On 5/12/20 4:43 PM, Kevin Wolf wrote: > > Stefan (Reiter), after looking a bit closer at this, I think there is no > > bug in QEMU, but the bug is in your coroutine code that calls block > > layer functions without moving into the right

Re: [PATCH v2 2/3] hw/mips/mips_int: Use qdev gpio rather than qemu_allocate_irqs()

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 3:24 PM, Peter Maydell wrote: On Tue, 12 May 2020 at 08:48, Philippe Mathieu-Daudé wrote: Switch to using the qdev gpio API which is preferred over qemu_allocate_irqs(). One step to eventually deprecate and remove qemu_allocate_irqs() one day. diff --git a/hw/mips/mips_int.c

Re: [PATCH v6 08/14] block/qcow2: extend qemu-img amend interface with crypto options

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > Now that we have all the infrastructure in place, > wire it in the qcow2 driver and expose this to the user. > > Signed-off-by: Maxim Levitsky > Reviewed-by: Daniel P. Berrangé > --- > block/qcow2.c | 72

Re: [RFC PATCH 3/3] block: Assert we're running in the right thread

2020-05-14 Thread Kevin Wolf
Am 14.05.2020 um 15:52 hat Stefan Reiter geschrieben: > On 5/12/20 4:43 PM, Kevin Wolf wrote: > > tracked_request_begin() is called for most I/O operations, so it's a > > good place to assert that we're indeed running in the home thread of the > > node's AioContext. > > > > Is this patch

Re: [PATCH RFC 03/32] python//machine.py: remove bare except

2020-05-14 Thread John Snow
On 5/14/20 9:55 AM, Eric Blake wrote: > On 5/14/20 12:53 AM, John Snow wrote: >> Catch only the timeout error; if there are other problems, allow the >> stack trace to be visible. >> > > A lot of patches in this series start with "python//" - is that > intentional, or should it be a single

Re: [PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread Eric Blake
On 5/14/20 7:51 AM, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200514063112.1457125-1-raphael.p...@hetzner.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id:

Re: [PATCH] bitmaps: Add myself as maintainer

2020-05-14 Thread John Snow
On 5/14/20 9:52 AM, Eric Blake wrote: > On 5/14/20 12:08 AM, John Snow wrote: >> >> >> On 5/14/20 12:49 AM, Vladimir Sementsov-Ogievskiy wrote: >>> 13.05.2020 23:24, John Snow wrote: On 5/13/20 10:14 AM, Eric Blake wrote: > Dirty bitmaps are important to incremental backups,

Re: [PATCH v6 07/14] block/crypto: implement the encryption key management

2020-05-14 Thread Daniel P . Berrangé
On Thu, May 14, 2020 at 04:09:59PM +0200, Max Reitz wrote: > On 10.05.20 15:40, Maxim Levitsky wrote: > > This implements the encryption key management using the generic code in > > qcrypto layer and exposes it to the user via qemu-img > > > > This code adds another 'write_func' because the

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

2020-05-14 Thread Eric Blake
On 5/14/20 1:45 AM, Vladimir Sementsov-Ogievskiy wrote: 13.05.2020 04:16, 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

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

2020-05-14 Thread Eric Blake
On 5/14/20 1:21 AM, Vladimir Sementsov-Ogievskiy wrote: 13.05.2020 04:16, 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

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

2020-05-14 Thread Eric Blake
On 5/14/20 6:45 AM, Vladimir Sementsov-Ogievskiy wrote: 13.05.2020 04:16, Eric Blake wrote: -    HBitmap **backup, Error **errp) +BdrvDirtyBitmap *block_dirty_bitmap_merge(const char *node, const char *target, + BlockDirtyBitmapMergeSourceList

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

2020-05-14 Thread Eric Blake
On 5/14/20 12:19 AM, Vladimir Sementsov-Ogievskiy wrote: In the future, when we improve the ability to look up bitmaps through a filter, we will probably also want to teach the block layer to automatically let filters pass this request on through. Hm. I think that bitmap at filter bs is a

Re: [PATCH v6 07/14] block/crypto: implement the encryption key management

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > This implements the encryption key management using the generic code in > qcrypto layer and exposes it to the user via qemu-img > > This code adds another 'write_func' because the initialization > write_func works directly on the underlying file, and

Re: [PATCH RFC 03/32] python//machine.py: remove bare except

2020-05-14 Thread Eric Blake
On 5/14/20 12:53 AM, John Snow wrote: Catch only the timeout error; if there are other problems, allow the stack trace to be visible. A lot of patches in this series start with "python//" - is that intentional, or should it be a single slash? Signed-off-by: John Snow ---

Re: [PATCH] bitmaps: Add myself as maintainer

2020-05-14 Thread Eric Blake
On 5/14/20 12:08 AM, John Snow wrote: On 5/14/20 12:49 AM, Vladimir Sementsov-Ogievskiy wrote: 13.05.2020 23:24, John Snow wrote: On 5/13/20 10:14 AM, Eric Blake wrote: Dirty bitmaps are important to incremental backups, including exposure over NBD where I'm already maintainer.  Also, I'm

Re: [RFC PATCH 3/3] block: Assert we're running in the right thread

2020-05-14 Thread Stefan Reiter
On 5/12/20 4:43 PM, Kevin Wolf wrote: tracked_request_begin() is called for most I/O operations, so it's a good place to assert that we're indeed running in the home thread of the node's AioContext. Is this patch supposed to be always correct or only together with nr. 2? I changed our code

Re: [PATCH v3 0/4] Additional parameters for qemu_img map

2020-05-14 Thread Eric Blake
On 5/13/20 5:13 PM, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200513133629.18508-1-eyal.moscov...@oracle.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can

Re: [PATCH v4 00/34] block: Introduce real BdrvChildRole

2020-05-14 Thread Kevin Wolf
Am 13.05.2020 um 13:05 hat Max Reitz geschrieben: > Based-on: <20200429141126.85159-1-mre...@redhat.com> > (“block: Do not call BlockDriver.bdrv_make_empty() directly”) > > Branch: https://github.com/XanClic/qemu.git child-role-v4 > Branch: https://git.xanclic.moe/XanClic/qemu.git child-role-v4

Re: [PATCH v6 05/14] block/amend: refactor qcow2 amend options

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > Some qcow2 create options can't be used for amend. > Remove them from the qcow2 create options and add generic logic to detect > such options in qemu-img > > Signed-off-by: Maxim Levitsky > Reviewed-by: Daniel P. Berrangé > --- > block/qcow2.c

Re: [PATCH v2 2/3] hw/mips/mips_int: Use qdev gpio rather than qemu_allocate_irqs()

2020-05-14 Thread Peter Maydell
On Tue, 12 May 2020 at 08:48, Philippe Mathieu-Daudé wrote: > > Switch to using the qdev gpio API which is preferred over > qemu_allocate_irqs(). One step to eventually deprecate and > remove qemu_allocate_irqs() one day. > diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c > index

Re: [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext

2020-05-14 Thread Thomas Lamprecht
On 5/12/20 4:43 PM, Kevin Wolf wrote: > Stefan (Reiter), after looking a bit closer at this, I think there is no > bug in QEMU, but the bug is in your coroutine code that calls block > layer functions without moving into the right AioContext first. I've > written this series anyway as it

Re: [PATCH v2 3/3] hw/openrisc/pic_cpu: Use qdev gpio rather than qemu_allocate_irqs()

2020-05-14 Thread Peter Maydell
On Tue, 12 May 2020 at 08:48, Philippe Mathieu-Daudé wrote: > > Coverity points out (CID 1421934) that we are leaking the > memory returned by qemu_allocate_irqs(). We can avoid this > leak by switching to using qdev_init_gpio_in(); the base > class finalize will free the irqs that this allocates

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

2020-05-14 Thread Oleksandr Natalenko
On Mon, May 11, 2020 at 07:36:30PM +0100, Stefan Hajnoczi wrote: > 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

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

2020-05-14 Thread Oleksandr Natalenko
On Mon, May 11, 2020 at 07:36:29PM +0100, Stefan Hajnoczi wrote: > 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

Re: [PATCH v2 0/4] block: Do not call BlockDriver.bdrv_make_empty() directly

2020-05-14 Thread Kevin Wolf
Am 29.04.2020 um 16:11 hat Max Reitz geschrieben: > v1: https://lists.nongnu.org/archive/html/qemu-block/2020-04/msg01245.html > > Branch: https://github.com/XanClic/qemu.git fix-bdrv_make_empty-v2 > Branch: https://git.xanclic.moe/XanClic/qemu.git fix-bdrv_make_empty-v2 > > Based-on:

Re: [PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200514063112.1457125-1-raphael.p...@hetzner.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200514063112.1457125-1-raphael.p...@hetzner.com Subject: [PATCH v2 0/1] qemu-nbd: Close

Re: [PATCH v6 04/14] block/amend: separate amend and create options for qemu-img

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > Some options are only useful for creation > (or hard to be amended, like cluster size for qcow2), while some other > options are only useful for amend, like upcoming keyslot management > options for luks > > Since currently only qcow2 supports amend,

Re: [PATCH v6 03/14] block/amend: add 'force' option

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > 'force' option will be used for some unsafe amend operations. > > This includes things like erasing last keyslot in luks based formats > (which destroys the data, unless the master key is backed up > by external means), but that _might_ be desired

Re: [PATCH v6 02/14] qcrypto/luks: implement encryption key management

2020-05-14 Thread Max Reitz
On 10.05.20 15:40, Maxim Levitsky wrote: > Next few patches will expose that functionality to the user. > > Signed-off-by: Maxim Levitsky > Reviewed-by: Daniel P. Berrangé > --- > crypto/block-luks.c | 395 +++- > qapi/crypto.json| 61 ++- > 2

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

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, Eric Blake wrote: -HBitmap **backup, Error **errp) +BdrvDirtyBitmap *block_dirty_bitmap_merge(const char *node, const char *target, + BlockDirtyBitmapMergeSourceList *bitmaps, + HBitmap

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Kevin Wolf
Am 14.05.2020 um 09:13 hat Max Reitz geschrieben: > On 13.05.20 18:11, Eric Blake wrote: > > On 5/13/20 9:56 AM, Max Reitz wrote: > >> This command allows mapping block node names to aliases for the purpose > >> of block dirty bitmap migration. > >> > >> This way, management tools can use

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Kevin Wolf
Am 14.05.2020 um 11:09 hat Max Reitz geschrieben: > On 13.05.20 22:09, Vladimir Sementsov-Ogievskiy wrote: > [...] > > 1. So, you decided to make only node-mapping, not bitmap-mapping, so we > > can't rename bitmaps in-flight and can't migrate bitmaps from one node > > to several and visa-versa. I

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

2020-05-14 Thread Dr. David Alan Gilbert
* Lukas Straub (lukasstra...@web.de) wrote: > Terminology: > instance = one (nbd) blockdev/one chardev/the single migrationstate > connection = one TCP connection > > Hello Everyone, > Having read all the comments, here is proposal v2: > Every instance registers itself with a unique name in the

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
14.05.2020 12:09, Max Reitz wrote: On 13.05.20 22:09, Vladimir Sementsov-Ogievskiy wrote: [...] 1. So, you decided to make only node-mapping, not bitmap-mapping, so we can't rename bitmaps in-flight and can't migrate bitmaps from one node to several and visa-versa. I think it's OK, nothing good

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

2020-05-14 Thread Kevin Wolf
Am 13.05.2020 um 21:12 hat Lukas Straub geschrieben: > Terminology: > instance = one (nbd) blockdev/one chardev/the single migrationstate > connection = one TCP connection > > Hello Everyone, > Having read all the comments, here is proposal v2: Looks quite good to me. > Every instance registers

Re: [PATCH v10 14/14] iotests: use python logging for iotests.log()

2020-05-14 Thread Kevin Wolf
Am 14.05.2020 um 08:24 hat John Snow geschrieben: > On 3/31/20 9:44 AM, Kevin Wolf wrote: > > Am 31.03.2020 um 02:00 hat John Snow geschrieben: > >> We can turn logging on/off globally instead of per-function. > >> > >> Remove use_log from run_job, and use python logging to turn on > >> diffable

Re: [PULL 0/5] Block patches

2020-05-14 Thread Peter Maydell
On Wed, 13 May 2020 at 15:15, Max Reitz wrote: > > The following changes since commit d5c75ec500d96f1d93447f990cd5a4ef5ba27fae: > > Merge remote-tracking branch > 'remotes/stefanberger/tags/pull-tpm-2020-05-08-1' into staging (2020-05-12 > 17:00:10 +0100) > > are available in the Git

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Dr. David Alan Gilbert
* Max Reitz (mre...@redhat.com) wrote: > On 14.05.20 10:42, Dr. David Alan Gilbert wrote: > > * Max Reitz (mre...@redhat.com) wrote: > > > > > > > >> +void qmp_migrate_set_bitmap_node_mapping(MigrationBlockNodeMappingList > >> *mapping, > >> + Error

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Max Reitz
On 13.05.20 22:09, Vladimir Sementsov-Ogievskiy wrote: [...] > 1. So, you decided to make only node-mapping, not bitmap-mapping, so we > can't rename bitmaps in-flight and can't migrate bitmaps from one node > to several and visa-versa. I think it's OK, nothing good in such > possibilities, and

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Max Reitz
On 14.05.20 10:42, Dr. David Alan Gilbert wrote: > * Max Reitz (mre...@redhat.com) wrote: > > > >> +void qmp_migrate_set_bitmap_node_mapping(MigrationBlockNodeMappingList >> *mapping, >> + Error **errp) >> +{ >> +QDict *in_mapping = qdict_new(); >> +

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Dr. David Alan Gilbert
* Max Reitz (mre...@redhat.com) wrote: > +void qmp_migrate_set_bitmap_node_mapping(MigrationBlockNodeMappingList > *mapping, > + Error **errp) > +{ > +QDict *in_mapping = qdict_new(); > +QDict *out_mapping = qdict_new(); > + > +for (;

Re: [PATCH v6 19/20] hw/block/nvme: do cmb/pmr init as part of pci init

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 6:46 AM, Klaus Jensen wrote: From: Klaus Jensen Having the patch subject duplicated ease review (not all email client display email subject close to email content): "Do cmb/pmr init as part of pci init." Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen

Re: [PATCH v6 18/20] hw/block/nvme: factor out pmr setup

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 6:46 AM, Klaus Jensen wrote: From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 95 ++--- 1 file changed, 51 insertions(+), 44 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c

Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Max Reitz
On 13.05.20 22:09, Vladimir Sementsov-Ogievskiy wrote: > 13.05.2020 17:56, Max Reitz wrote: >> This command allows mapping block node names to aliases for the purpose >> of block dirty bitmap migration. >> >> This way, management tools can use different node names on the source >> and destination

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

2020-05-14 Thread Jason Wang
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 assumes the vhost_dev remains setup, so delay the * stop & clear to idle. * FIXME: better handle failure in vhost code,

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

2020-05-14 Thread Jason Wang
On 2020/5/13 下午5:36, Dima Stepanov wrote: 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: [RFC v2] migration: Add migrate-set-bitmap-node-mapping

2020-05-14 Thread Max Reitz
On 13.05.20 18:11, Eric Blake wrote: > On 5/13/20 9:56 AM, Max Reitz wrote: >> This command allows mapping block node names to aliases for the purpose >> of block dirty bitmap migration. >> >> This way, management tools can use different node names on the source >> and destination and pass the

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

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, 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 exist).

Re: [PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread Raphael Pour
[...] introduced with e6df58a5, stderr won't get closed if the fork option is __not__ set. On 5/14/20 8:31 AM, Raphael Pour wrote: > introduced with e6df58a5, stderr won't get closed if the fork option is > set. -- Hetzner Online GmbH Am Datacenter-Park 1 08223 Falkenstein/Vogtland

[PATCH v2 1/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread Raphael Pour
Close inherited stderr of the parent if fork_process is false. Otherwise no one will close it. (introduced by e6df58a5) --- qemu-nbd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 4aa005004e..a324d21c5e 100644 --- a/qemu-nbd.c +++

[PATCH v2 0/1] qemu-nbd: Close inherited stderr

2020-05-14 Thread Raphael Pour
Hello, introduced with e6df58a5, stderr won't get closed if the fork option is set. This causes other processes reading stderr to block infinietly or crash while relying on EOF. v2: - Instead of closing the inherited stderr in the child, avoid the dup in the parent if the fork option is

Re: [PATCH v10 14/14] iotests: use python logging for iotests.log()

2020-05-14 Thread John Snow
On 3/31/20 9:44 AM, Kevin Wolf wrote: > Am 31.03.2020 um 02:00 hat John Snow geschrieben: >> We can turn logging on/off globally instead of per-function. >> >> Remove use_log from run_job, and use python logging to turn on >> diffable output when we run through a script entry point. >> >>

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

2020-05-14 Thread Vladimir Sementsov-Ogievskiy
13.05.2020 04:16, 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, where

Re: [PATCH v3 03/10] iotests/283: make executable

2020-05-14 Thread Philippe Mathieu-Daudé
On 4/21/20 9:35 AM, Vladimir Sementsov-Ogievskiy wrote: All other test files are executable, except for this one. Fix that. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/283 | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755

Re: [PATCH RFC 19/32] python//qmp.py: add QMPProtocolError

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: In the case that we receive a reply but are unable to understand it, use this exception name to indicate that case. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/python/qemu/lib/qmp.py

[PATCH RFC 13/32] python/qemu/lib: Adjust traceback typing

2020-05-14 Thread John Snow
mypy considers it incorrect to use `bool` to statically return false, because it will assume that it could conceivably return True, and gives different analysis in that case. Use a None return to achieve the same effect, but make mypy happy. Note: Pylint considers function signatures as code that

[PATCH RFC 30/32] python/qemu/lib: make 'args' style arguments immutable

2020-05-14 Thread John Snow
These arguments don't need to be mutable and aren't really used as such. Clarify their types as immutable and adjust code to match where necessary. In general, It's probably best not to accept a user-defined mutable object and store it as internal object state unless there's a strong

Re: [PATCH RFC 29/32] python//qtest.py: Check before accessing _qtest

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:54 AM, John Snow wrote: It can be None; so add assertions or exceptions where appropriate to guard the access accordingly. Signed-off-by: John Snow --- python/qemu/lib/qtest.py | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[PATCH RFC 19/32] python//qmp.py: add QMPProtocolError

2020-05-14 Thread John Snow
In the case that we receive a reply but are unable to understand it, use this exception name to indicate that case. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index

Re: [PATCH RFC 23/32] python//machine.py: reorder __init__

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: Put the init arg handling all at the top, and mostly in order (deviating when one is dependent on another), and put what is effectively runtime state declaration at the bottom. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 29

Re: [PATCH RFC 21/32] python//machine.py: remove logging configuration

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: Python 3.5 and above do not print a warning when logging is not configured. As a library, it's best practice to leave logging configuration to the client executable. Signed-off-by: John Snow --- python/qemu/lib/machine.py | 3 --- 1 file changed, 3

Re: [PATCH RFC 14/32] python//qmp.py: use True/False for non/blocking modes

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: The type system doesn't want integers. Signed-off-by: John Snow --- python/qemu/lib/qmp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/qemu/lib/qmp.py b/python/qemu/lib/qmp.py index b91c9d5c1c..a634c4e26c 100644 ---

Re: [PATCH RFC 16/32] python//qmp.py: re-absorb MonitorResponseError

2020-05-14 Thread Philippe Mathieu-Daudé
On 5/14/20 7:53 AM, John Snow wrote: When I initially split this out, I considered this more of a machine error than a QMP protocol error, but I think that's misguided. Move this back to qmp.py and name it QMPResponseError. Convert qmp.command() to use this exception type. Signed-off-by: John

  1   2   >