Re: [PATCH 0/2] block: Remove unused BlockDeviceMapEntry

2020-11-09 Thread Markus Armbruster
Max Reitz writes: > Hi, > > Markus has revived a rather old patch to remove an unused QAPI > structure: > > https://lists.nongnu.org/archive/html/qemu-block/2020-10/msg01902.html > > He quoted a response of mine to the original patch, where I noted that > removing this structure is OK because it

Re: [PATCH 0/2] Increase amount of data for monitor to read

2020-11-09 Thread Vladimir Sementsov-Ogievskiy
06.11.2020 15:42, Andrey Shinkevich wrote: The subject was discussed here: https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg00206.html This series is a solution for the issue with QMP monitor buffered input. A little parser is introduced to throttle JSON commands read from the buffer so

Re: [PATCH] block: Fix some code style problems, "foo* bar" should be "foo *bar"

2020-11-09 Thread Max Reitz
On 30.10.20 04:35, shiliyang wrote: There have some code style problems be found when read the block driver code. So I fixes some problems of this error, ERROR: "foo* bar" should be "foo *bar". Signed-off-by: Liyang Shi Reported-by: Euler Robot --- block/blkdebug.c | 2 +- block/dmg.c

Re: [PATCH 2/2] monitor: increase amount of data for monitor to read

2020-11-09 Thread Vladimir Sementsov-Ogievskiy
06.11.2020 15:42, Andrey Shinkevich wrote: QMP and HMP monitors read one byte at a time from the socket or stdin, which is very inefficient. With 100+ VMs on the host, this results in multiple extra system calls and CPU overuse. This patch increases the amount of read data up to 4096 bytes that f

Re: [PATCH 0/2] Increase amount of data for monitor to read

2020-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2020 11:50, Vladimir Sementsov-Ogievskiy wrote: 06.11.2020 15:42, Andrey Shinkevich wrote: The subject was discussed here: https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg00206.html This series is a solution for the issue with QMP monitor buffered input. A little parser is introd

Re: Qemu first time contribution

2020-11-09 Thread Stefan Hajnoczi
On Sun, Nov 08, 2020 at 12:21:33PM +, Harshavardhan Unnibhavi wrote: > Thank you for the reply! Yes, I understand that gsoc is over for 2020, > and projects for 2021 will come up next year. I was thinking of > contributing outside of gsoc(for which I won't be eligible anyways for > next year).

Re: [PATCH 4/7] qom: Replace void* parameter with Property* on field getters/setters

2020-11-09 Thread Cornelia Huck
On Wed, 4 Nov 2020 12:25:09 -0500 Eduardo Habkost wrote: > All field property getters and setters must interpret the fourth > argument as Property*. Change the function signature of field > property getters and setters to indicate that. > > Signed-off-by: Eduardo Habkost > --- > Cc: Stefan Be

Re: [PATCH 6/7] qom: Add FIELD_PTR, a type-safe wrapper for object_field_prop_ptr()

2020-11-09 Thread Cornelia Huck
On Wed, 4 Nov 2020 12:25:11 -0500 Eduardo Habkost wrote: > Introduce a FIELD_PTR macro that will ensure the size of the area > we are accessing has the correct size, and will return a pointer > of the correct type. > > Signed-off-by: Eduardo Habkost > --- > Cc: Stefan Berger > Cc: Stefano Sta

Re: [PATCH v2 11/20] qapi: backup: add x-max-chunk and x-max-workers parameters

2020-11-09 Thread Vladimir Sementsov-Ogievskiy
04.11.2020 20:19, Max Reitz wrote: On 22.10.20 22:35, Vladimir Sementsov-Ogievskiy wrote: 22.07.2020 15:22, Max Reitz wrote: On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: Add new parameters to configure future backup features. The patch doesn't introduce aio backup requests (so we act

Re: [PATCH v2 13/20] iotests: 129: prepare for backup over block-copy

2020-11-09 Thread Vladimir Sementsov-Ogievskiy
04.11.2020 20:30, Max Reitz wrote: On 22.10.20 23:10, Vladimir Sementsov-Ogievskiy wrote: 23.07.2020 11:03, Max Reitz wrote: On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: After introducing parallel async copy requests instead of plain cluster-by-cluster copying loop, backup job may fi

Re: [PATCH v2 5/7] block: bdrv_set_perm() drop redundant parameters.

2020-11-09 Thread Max Reitz
On 06.11.20 13:42, Vladimir Sementsov-Ogievskiy wrote: We should never set permissions other than cumulative permissions of parents. During bdrv_reopen_multiple() we _check_ for synthetic permissions but when we do _set_ the graph is already updated. Add an assertion to bdrv_reopen_multiple(), ot

Re: [PATCH v3 11/25] qapi: backup: add max-chunk and max-workers to x-perf struct

2020-11-09 Thread Vladimir Sementsov-Ogievskiy
26.10.2020 20:18, Vladimir Sementsov-Ogievskiy wrote: Add new parameters to configure future backup features. The patch doesn't introduce aio backup requests (so we actually have only one worker) neither requests larger than one cluster. Still, formally we satisfy these maximums anyway, so add th

Re: [PATCH v2 5/7] block: bdrv_set_perm() drop redundant parameters.

2020-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2020 15:20, Max Reitz wrote: On 06.11.20 13:42, Vladimir Sementsov-Ogievskiy wrote: We should never set permissions other than cumulative permissions of parents. During bdrv_reopen_multiple() we _check_ for synthetic permissions but when we do _set_ the graph is already updated. Add an ass

Re: [PATCH v2 6/7] block: bdrv_child_set_perm() drop redundant parameters.

2020-11-09 Thread Max Reitz
On 06.11.20 13:42, Vladimir Sementsov-Ogievskiy wrote: We must set the permission used for _check_. Assert that we have backup and drop extra arguments. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) Reviewed-

Re: [PATCH v2 4/7] block: add bdrv_refresh_perms() helper

2020-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2020 10:04, Vladimir Sementsov-Ogievskiy wrote: 06.11.2020 18:14, Alberto Garcia wrote: On Fri 06 Nov 2020 01:42:38 PM CET, Vladimir Sementsov-Ogievskiy wrote: Make separate function for common pattern. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   block.c | 60 +

Re: [PATCH v2 7/7] block: drop tighten_restrictions

2020-11-09 Thread Max Reitz
On 06.11.20 13:42, Vladimir Sementsov-Ogievskiy wrote: The only users of this thing are: 1. bdrv_child_try_set_perm, to ignore failures on loosen restrictions 2. assertion in bdrv_replace_child 3. assertion in bdrv_inactivate_recurse Assertions are not enough reason for overcomplication th

Re: [PATCH v3 1/3] hw/block/m25p80: Fix Numonyx NVCFG DIO and QIO bit polarity

2020-11-09 Thread Philippe Mathieu-Daudé
On 11/6/20 2:32 AM, Joe Komlodi wrote: > QIO and DIO modes should be enabled when the bits in NVCFG are set to 0. > This matches the behavior of the other bits in the NVCFG register. Is this material for the 5.2 release? > > Signed-off-by: Joe Komlodi > --- > hw/block/m25p80.c | 4 ++-- > 1 fi

Re: [PATCH v2 0/7] block: permission update fix & refactor

2020-11-09 Thread Max Reitz
On 06.11.20 13:42, Vladimir Sementsov-Ogievskiy wrote: Hi all! These series supersedes "Fix nested permission update" and includes one more fix (patch 01) and more improvements. I think patch 01 is good to have in 5.2, 02 is probably OK for 5.2 and the others are OK for next release. Still all

[PATCH for-5.2] block/export/vhost-user-blk-server.c: Avoid potential integer overflow

2020-11-09 Thread Peter Maydell
In vu_blk_discard_write_zeroes(), we read a 32-bit sector count from the descriptor and convert it to a 64-bit byte count. Coverity warns that the left shift is done with 32-bit arithmetic so it might overflow before the conversion to 64-bit happens. Add a cast to avoid this. Fixes: Coverity CID 1

Re: [PATCH for-5.2] block/export/vhost-user-blk-server.c: Avoid potential integer overflow

2020-11-09 Thread Max Reitz
[Cc-ing Stefan] On 09.11.20 16:05, Peter Maydell wrote: In vu_blk_discard_write_zeroes(), we read a 32-bit sector count from the descriptor and convert it to a 64-bit byte count. Coverity warns that the left shift is done with 32-bit arithmetic so it might overflow before the conversion to 64-bi

Re: [PATCH v2 0/7] block: permission update fix & refactor

2020-11-09 Thread Vladimir Sementsov-Ogievskiy
09.11.2020 17:41, Max Reitz wrote: On 06.11.20 13:42, Vladimir Sementsov-Ogievskiy wrote: Hi all! These series supersedes "Fix nested permission update" and includes one more fix (patch 01) and more improvements. I think patch 01 is good to have in 5.2, 02 is probably OK for 5.2 and the others

Re: [PATCH 0/2] Increase amount of data for monitor to read

2020-11-09 Thread Andrey Shinkevich
On 09.11.2020 13:04, Vladimir Sementsov-Ogievskiy wrote: 09.11.2020 11:50, Vladimir Sementsov-Ogievskiy wrote: 06.11.2020 15:42, Andrey Shinkevich wrote: The subject was discussed here: https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg00206.html This series is a solution for the issu

[PULL 07/15] iotests: add filter_qmp_virtio_scsi function

2020-11-09 Thread Max Reitz
From: Maxim Levitsky filter_qmp_virtio_scsi can be used to filter virtio-scsi-pci/ccw differences. Note that this patch was only tested on x86. Suggested-by: Paolo Bonzini Signed-off-by: Maxim Levitsky Tested-by: Christian Borntraeger Reviewed-by: Paolo Bonzini Message-Id: <20201104185025.43

[PULL 02/15] block: Move bdrv_drain_all_end_quiesce() to block_int.h

2020-11-09 Thread Max Reitz
From: Greg Kurz This function is really an internal helper for bdrv_close(). Update its doc comment to make this clear and make the function private. Signed-off-by: Greg Kurz Message-Id: <160387245480.131299.13430357162209598411.stgit@bahia> Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reit

[PULL 00/15] Block patches for 5.2.0-rc1

2020-11-09 Thread Max Reitz
The following changes since commit 2a190a7256a3e0563b29ffd67e0164097b4a6dac: Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-fixes-20201109' into staging (2020-11-09 11:20:25 +) are available in the Git repository at: https://github.com/XanClic/qemu.git

[PULL 11/15] block: Fix integer promotion error in bdrv_getlength()

2020-11-09 Thread Max Reitz
From: Eric Blake Back in 2015, we attempted to fix error reporting for images that claimed to have more than INT64_MAX/512 sectors, but due to the type promotions caused by BDRV_SECTOR_SIZE being unsigned, this inadvertently forces all negative ret values to be slammed into -EFBIG rather than the

[PULL 05/15] hw/block/nvme: fix uint16_t use of uint32_t sgls member

2020-11-09 Thread Max Reitz
From: Klaus Jensen nvme_map_sgl_data erroneously uses the sgls member of NvmeIdNs as a uint16_t. Reported-by: Coverity (CID 1436129) Fixes: cba0a8a344fe ("hw/block/nvme: add support for scatter gather lists") Signed-off-by: Klaus Jensen Message-Id: <20201104102248.32168-3-...@irrelevant.dk> Rev

[PULL 03/15] qcow2: Document and enforce the QCowL2Meta invariants

2020-11-09 Thread Max Reitz
From: Alberto Garcia The QCowL2Meta structure is used to store information about a part of a write request that touches clusters that need changes in their L2 entries. This happens with newly-allocated clusters or subclusters. This structure has changed a bit since it was first created and its c

[PULL 08/15] iotests: rewrite iotest 240 in python

2020-11-09 Thread Max Reitz
From: Maxim Levitsky The recent changes that brought RCU delayed device deletion, broke few tests and this test breakage went unnoticed. Fix this test by rewriting it in python (which allows to wait for DEVICE_DELETED events before continuing). Signed-off-by: Maxim Levitsky Tested-by: Christia

[PULL 01/15] block: Remove unused include

2020-11-09 Thread Max Reitz
From: AlexChen The "qemu-common.h" include is not used, remove it. Reported-by: Euler Robot Signed-off-by: AlexChen Message-Id: <5f8ffb94.3030...@huawei.com> Signed-off-by: Max Reitz --- block/dmg-lzfse.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/dmg-lzfse.c b/block/dmg-lzfse.

[PULL 06/15] hw/block/nvme: fix free of array-typed value

2020-11-09 Thread Max Reitz
From: Klaus Jensen Since 7f0f1acedf15 ("hw/block/nvme: support multiple namespaces"), the namespaces member of NvmeCtrl is no longer a dynamically allocated array. Remove the free. Fixes: 7f0f1acedf15 ("hw/block/nvme: support multiple namespaces") Reported-by: Coverity (CID 1436131) Signed-off-b

[PULL 12/15] block: Fix some code style problems, "foo* bar" should be "foo *bar"

2020-11-09 Thread Max Reitz
From: shiliyang There have some code style problems be found when read the block driver code. So I fixes some problems of this error, ERROR: "foo* bar" should be "foo *bar". Signed-off-by: Liyang Shi Reported-by: Euler Robot --- block/qcow2.h| 6 +++--- block/blkdebug.c | 2 +- block/dm

[PULL 04/15] hw/block/nvme: fix null ns in register namespace

2020-11-09 Thread Max Reitz
From: Klaus Jensen Fix dereference after NULL check. Reported-by: Coverity (CID 1436128) Fixes: b20804946bce ("hw/block/nvme: update nsid when registered") Signed-off-by: Klaus Jensen Message-Id: <20201104102248.32168-2-...@irrelevant.dk> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Max

[PULL 10/15] block: enable libnfs on msys2/mingw in cirrus.yml

2020-11-09 Thread Max Reitz
From: Yonggang Luo Initially, libnfs has not been enabled, and now it's fixed, so enable it on cirrus. Signed-off-by: Yonggang Luo Message-Id: <20201105123116.674-3-luoyongg...@gmail.com> Signed-off-by: Max Reitz --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml

[PULL 09/15] block: Fixes nfs compiling error on msys2/mingw

2020-11-09 Thread Max Reitz
From: Yonggang Luo These compiling errors are fixed: ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory 27 | #include | ^~~~ compilation terminated. ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' 63 | blkcnt_t st_blocks; | ^

[PULL 13/15] block: add forgotten bdrv_abort_perm_update() to bdrv_co_invalidate_cache()

2020-11-09 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201106124241.16950-2-vsement...@virtuozzo.com> Reviewed-by: Alberto Garcia Signed-off-by: Max Reitz --- block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block.c b/block.c index 2fd932154e.

[PULL 14/15] block: add bdrv_replace_node_common()

2020-11-09 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Add new parameter to bdrv_replace_node(): auto_skip. With auto_skip=false we'll have stricter behavior: update _all_ from parents or fail. New behaviour will be used in the following commit in block.c, so keep original function name as public interface. Note: n

[PULL 15/15] block: make bdrv_drop_intermediate() less wrong

2020-11-09 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy First, permission update loop tries to do iterations transactionally, but the whole update is not transactional: nobody roll-back successful loop iterations when some iteration fails. Second, in the iteration we have nested permission update: c->klass->update_f

[PULL v2 00/15] Block patches for 5.2.0-rc1

2020-11-09 Thread Max Reitz
The following changes since commit 2a190a7256a3e0563b29ffd67e0164097b4a6dac: Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-fixes-20201109' into staging (2020-11-09 11:20:25 +) are available in the Git repository at: https://github.com/XanClic/qemu.git

Re: [PULL 00/15] Block patches for 5.2.0-rc1

2020-11-09 Thread Max Reitz
On 09.11.20 18:38, Max Reitz wrote: The following changes since commit 2a190a7256a3e0563b29ffd67e0164097b4a6dac: Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-fixes-20201109' into staging (2020-11-09 11:20:25 +) are available in the Git repository at:

Re: [PULL v2 00/15] Block patches for 5.2.0-rc1

2020-11-09 Thread Peter Maydell
On Mon, 9 Nov 2020 at 17:50, Max Reitz wrote: > > The following changes since commit 2a190a7256a3e0563b29ffd67e0164097b4a6dac: > > Merge remote-tracking branch > 'remotes/philmd-gitlab/tags/renesas-fixes-20201109' into staging (2020-11-09 > 11:20:25 +)

RE: [PATCH v3 1/3] hw/block/m25p80: Fix Numonyx NVCFG DIO and QIO bit polarity

2020-11-09 Thread Joe Komlodi
Hi Philippe, -Original Message- From: Philippe Mathieu-Daudé Sent: Monday, November 9, 2020 6:21 AM To: Joe Komlodi ; qemu-de...@nongnu.org; Cédric Le Goater ; Edgar Iglesias Cc: Francisco Eduardo Iglesias ; alist...@alistair23.me; philippe.mathieu.da...@gmail.com; qemu-block@nongnu.o