Re: [PATCH v7 00/21] preallocate filter

2020-11-16 Thread Vladimir Sementsov-Ogievskiy
13.11.2020 22:33, Max Reitz wrote: On 21.10.20 16:58, Vladimir Sementsov-Ogievskiy wrote: Hi all! Here is a filter, which does preallocation on write. v7: 01: add Alberto's r-b 07: don't remove sentence from the comment 08: - drop extra "s->file_end = end;" line - improve check/set perm

[RFC PATCH 3/5] hw/arm: Convert assertions about flash image size to error_report

2020-11-16 Thread David Edmondson
Rather than throwing an assertion, provide a more detailed report if a flash image is inappropriately sized or aligned. Signed-off-by: David Edmondson --- hw/arm/virt.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index

[RFC PATCH 4/5] hw/arm: Flash image mapping follows image size

2020-11-16 Thread David Edmondson
When mapping flash images into the bottom 128MB, create mappings that match the size of the underlying block device rather than 64MB. Signed-off-by: David Edmondson --- hw/arm/trace-events | 2 + hw/arm/virt-acpi-build.c | 29 --- hw/arm/virt.c| 79

[RFC PATCH 5/5] hw/arm: Only minimise flash size on older machines

2020-11-16 Thread David Edmondson
Prior to 5.2 the flash images loaded into the bottom 128MB always filled the region. Ensure that this continues to be the case. Signed-off-by: David Edmondson --- hw/arm/virt-acpi-build.c | 11 +++--- hw/arm/virt.c| 79 ++-- include/hw/arm/virt.h

[RFC PATCH 2/5] hw/block: Flash images can be smaller than the device

2020-11-16 Thread David Edmondson
When loading a flash image into a device, allow the image to be smaller than the extent of the device. Signed-off-by: David Edmondson --- hw/block/block.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/block/block.c b/hw/block/block.c index

Re: [PATCH v8 1/5] hw/block/nvme: remove superfluous NvmeCtrl parameter

2020-11-16 Thread Minwoo Im
On 11/12 20:59, Klaus Jensen wrote: > From: Klaus Jensen > > nvme_check_bounds has no use of the NvmeCtrl parameter; remove it. > > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling

2020-11-16 Thread Minwoo Im
On 11/12 20:59, Klaus Jensen wrote: > From: Klaus Jensen > > Add a new function, nvme_aio_err, to handle errors resulting from AIOs > and use this from the callbacks. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 61 + > 1 file

Re: [RFC PATCH 0/5] ARM: reduce the memory consumed when mapping UEFI flash images

2020-11-16 Thread David Edmondson
On Monday, 2020-11-16 at 12:39:46 +01, Philippe Mathieu-Daudé wrote: > Hi David, > > On 11/16/20 11:42 AM, David Edmondson wrote: >> Currently ARM UEFI images are typically built as 2MB/768kB flash >> images for code and variables respectively. These images are both then >> padded out to 64MB

[RFC PATCH 0/5] ARM: reduce the memory consumed when mapping UEFI flash images

2020-11-16 Thread David Edmondson
Currently ARM UEFI images are typically built as 2MB/768kB flash images for code and variables respectively. These images are both then padded out to 64MB before being loaded by QEMU. Because the images are 64MB each, QEMU allocates 128MB of memory to read them, and then proceeds to read all

Re: [PATCH v8 3/5] hw/block/nvme: add dulbe support

2020-11-16 Thread Minwoo Im
On 11/12 20:59, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for reporting the Deallocated or Unwritten Logical Block > Error (DULBE). > > Rely on the block status flags reported by the block layer and consider > any block with the BDRV_BLOCK_ZERO flag to be deallocated. > >

Re: [PATCH v8 3/5] hw/block/nvme: add dulbe support

2020-11-16 Thread Klaus Jensen
On Nov 16 20:43, Minwoo Im wrote: > On 11/12 20:59, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add support for reporting the Deallocated or Unwritten Logical Block > > Error (DULBE). > > > > Rely on the block status flags reported by the block layer and consider > > any block with the

Re: [PATCH-for-5.2] io_uring: do not use pointer after free

2020-11-16 Thread Philippe Mathieu-Daudé
On 11/13/20 4:41 PM, Paolo Bonzini wrote: > Even though only the pointer value is only printed, it is untidy > and Coverity complains. > > Cc: Stefan Hajnoczi > Signed-off-by: Paolo Bonzini > --- > block/io_uring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe

Re: [PATCH 1/3] quorum: Require WRITE perm with rewrite-corrupted

2020-11-16 Thread Alberto Garcia
On Fri 13 Nov 2020 10:17:16 PM CET, Max Reitz wrote: > Using rewrite-corrupted means quorum may issue writes to its children > just from receiving read requests from its parents. Thus, it must take > the WRITE permission when rewrite-corrupted is used. > > Signed-off-by: Max Reitz Reviewed-by:

Re: [PATCH v2 7/7] qapi: More complex uses of QAPI_LIST_APPEND

2020-11-16 Thread Eric Blake
On 11/13/20 1:39 PM, Dr. David Alan Gilbert wrote: > * Eric Blake (ebl...@redhat.com) wrote: >> These cases require a bit more thought to review; in each case, the >> code was appending to a list, but not with a FOOList **tail variable. >> >> Signed-off-by: Eric Blake >> --- > > > >> +++

Re: [RFC PATCH 1/5] hw/block: blk_check_size_and_read_all should report backend name

2020-11-16 Thread David Edmondson
On Monday, 2020-11-16 at 12:23:24 +01, Philippe Mathieu-Daudé wrote: > On 11/16/20 11:42 AM, David Edmondson wrote: >> If there are problems examining or reading data from the block >> backend, the error messages should include an appropriate identifier >> to assist in diagnoses. >> >>

Re: [RFC PATCH 0/5] ARM: reduce the memory consumed when mapping UEFI flash images

2020-11-16 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi David, > > On 11/16/20 11:42 AM, David Edmondson wrote: >> Currently ARM UEFI images are typically built as 2MB/768kB flash >> images for code and variables respectively. These images are both then >> padded out to 64MB before being loaded by QEMU. >> >>

Re: [RFC PATCH 0/5] ARM: reduce the memory consumed when mapping UEFI flash images

2020-11-16 Thread Philippe Mathieu-Daudé
Hi David, On 11/16/20 11:42 AM, David Edmondson wrote: > Currently ARM UEFI images are typically built as 2MB/768kB flash > images for code and variables respectively. These images are both then > padded out to 64MB before being loaded by QEMU. > > Because the images are 64MB each, QEMU

Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling

2020-11-16 Thread Klaus Jensen
On Nov 16 20:36, Minwoo Im wrote: > On 11/12 20:59, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add a new function, nvme_aio_err, to handle errors resulting from AIOs > > and use this from the callbacks. > > > > Signed-off-by: Klaus Jensen > > --- > > hw/block/nvme.c | 61

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

2020-11-16 Thread Andrey Shinkevich
On 09.11.2020 12:55, Vladimir Sementsov-Ogievskiy wrote: 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

Re: [RFC PATCH 1/5] hw/block: blk_check_size_and_read_all should report backend name

2020-11-16 Thread Philippe Mathieu-Daudé
On 11/16/20 11:42 AM, David Edmondson wrote: > If there are problems examining or reading data from the block > backend, the error messages should include an appropriate identifier > to assist in diagnoses. > > Signed-off-by: David Edmondson > --- > hw/block/block.c | 14 +++--- > 1

Re: [PATCH v8 4/5] nvme: add namespace I/O optimization fields to shared header

2020-11-16 Thread Minwoo Im
On 11/12 20:59, Klaus Jensen wrote: > From: Klaus Jensen > > This adds the NPWG, NPWA, NPDG, NPDA and NOWS family of fields to the > shared nvme.h header for use by later patches. > > Signed-off-by: Klaus Jensen > Cc: Stefan Hajnoczi > Cc: Fam Zheng > Reviewed-by: Stefan Hajnoczi

[RFC PATCH 1/5] hw/block: blk_check_size_and_read_all should report backend name

2020-11-16 Thread David Edmondson
If there are problems examining or reading data from the block backend, the error messages should include an appropriate identifier to assist in diagnoses. Signed-off-by: David Edmondson --- hw/block/block.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

Re: [PATCH for-5.2] iotests: Replace deprecated ConfigParser.readfp()

2020-11-16 Thread Philippe Mathieu-Daudé
On 11/13/20 11:06 AM, Kevin Wolf wrote: > iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning > changes the output: > > nbd-fault-injector.py:230: DeprecationWarning: This method will be > removed in future versions. Use 'parser.read_file()' instead. > > In fact,

Re: [PATCH] io_uring: do not use pointer after free

2020-11-16 Thread Kevin Wolf
Am 13.11.2020 um 16:41 hat Paolo Bonzini geschrieben: > Even though only the pointer value is only printed, it is untidy > and Coverity complains. > > Cc: Stefan Hajnoczi > Signed-off-by: Paolo Bonzini Thanks, applied to the block branch. Kevin

Re: [PATCH v4 1/4] hw/block/m25p80: Make Numonyx config field names more accurate

2020-11-16 Thread Francisco Iglesias
On Thu, Nov 12, 2020 at 07:10:52PM -0800, Joe Komlodi wrote: > The previous naming of the configuration registers made it sound like that if > the bits were set the settings would be enabled, while the opposite is true. > > Signed-off-by: Joe Komlodi Reviewed-by: Francisco Iglesias > --- >

Re: [PATCH v4 2/4] hw/block/m25p80: Fix when VCFG XIP bit is set for Numonyx

2020-11-16 Thread Francisco Iglesias
On Thu, Nov 12, 2020 at 07:10:53PM -0800, Joe Komlodi wrote: > VCFG XIP is set (disabled) when the NVCFG XIP bits are all set (disabled). > > Signed-off-by: Joe Komlodi Reviewed-by: Francisco Iglesias > --- > hw/block/m25p80.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH 1/2] file-posix: allow -EBUSY errors during write zeros on raw block devices

2020-11-16 Thread Kevin Wolf
Am 11.11.2020 um 16:39 hat Maxim Levitsky geschrieben: > On Linux, fallocate(fd, FALLOC_FL_PUNCH_HOLE) when it is used on a block > device, > without O_DIRECT can return -EBUSY if it races with another write to the same > page. > > Since this is rare and discard is not a critical operation,

Re: [PATCH v4 3/4] hw/block/m25p80: Check SPI mode before running some Numonyx commands

2020-11-16 Thread Francisco Iglesias
Hi Joe, On Thu, Nov 12, 2020 at 07:10:54PM -0800, Joe Komlodi wrote: > Some Numonyx flash commands cannot be executed in DIO and QIO mode, such as > trying to do DPP or DOR when in QIO mode. > > Signed-off-by: Joe Komlodi > --- > hw/block/m25p80.c | 134 >

Re: [PATCH v4 4/4] hw/block/m25p80: Fix Numonyx fast read dummy cycle count

2020-11-16 Thread Francisco Iglesias
Hi Joe, On Thu, Nov 12, 2020 at 07:10:55PM -0800, Joe Komlodi wrote: > Numonyx chips determine the number of cycles to wait based on bits 7:4 > in the volatile configuration register. > > However, if these bits are 0x0 or 0xF, the number of dummy cycles to > wait is > 10 on a QIOR or QIOR4

Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling

2020-11-16 Thread Keith Busch
On Thu, Nov 12, 2020 at 08:59:42PM +0100, Klaus Jensen wrote: > +static void nvme_aio_err(NvmeRequest *req, int ret) > +{ > +uint16_t status = NVME_SUCCESS; > +Error *local_err = NULL; > + > +switch (req->cmd.opcode) { > +case NVME_CMD_READ: > +status =

Re: [PATCH v8 3/5] hw/block/nvme: add dulbe support

2020-11-16 Thread Keith Busch
On Thu, Nov 12, 2020 at 08:59:43PM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for reporting the Deallocated or Unwritten Logical Block > Error (DULBE). > > Rely on the block status flags reported by the block layer and consider > any block with the BDRV_BLOCK_ZERO flag to

Re: iotest 030 still occasionally intermittently failing

2020-11-16 Thread Peter Maydell
On Mon, 16 Nov 2020 at 17:34, Alberto Garcia wrote: > Do you know if there is a core dump or stack trace available ? Nope, sorry. What you get is what the 'vm-build-netbsd' etc targets produce, so if you want more diagnostics on failures you have to arrange for the test harness to produce

iotest 030 still occasionally intermittently failing

2020-11-16 Thread Peter Maydell
Just saw this on a test run on the OpenBSD VM build-and-test, so this test is still intermittently failing... TESTiotest-qcow2: 030 [fail] QEMU -- "/home/qemu/qemu-test.h37iBt/build/tests/qemu-iotests/../../qemu-system-aarch64" -nodefaults -display none -accel qtest -machine virt

Re: iotest 030 still occasionally intermittently failing

2020-11-16 Thread Alberto Garcia
On Mon 16 Nov 2020 05:16:35 PM CET, Peter Maydell wrote: > Just saw this on a test run on the OpenBSD VM build-and-test, > so this test is still intermittently failing... > > > TESTiotest-qcow2: 030 [fail] > QEMU -- >

Re: [PATCH v8 5/5] hw/block/nvme: add the dataset management command

2020-11-16 Thread Keith Busch
On Thu, Nov 12, 2020 at 08:59:45PM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for the Dataset Management command and the Deallocate > attribute. Deallocation results in discards being sent to the underlying > block device. Whether of not the blocks are actually deallocated

[PULL 1/2] nbd: Silence Coverity false positive

2020-11-16 Thread Eric Blake
Coverity noticed (CID 1436125) that we check the return value of nbd_extent_array_add in most places, but not at the end of bitmap_to_extents(). The return value exists to break loops before a future iteration, so there is nothing to check if we are already done iterating. Adding a cast to void,

[PATCH v5 3/4] hw/block/m25p80: Check SPI mode before running some Numonyx commands

2020-11-16 Thread Joe Komlodi
Some Numonyx flash commands cannot be executed in DIO and QIO mode, such as trying to do DPP or DOR when in QIO mode. Signed-off-by: Joe Komlodi --- hw/block/m25p80.c | 114 +- 1 file changed, 95 insertions(+), 19 deletions(-) diff --git

[PATCH v5 0/4] hw/block/m25p80: Numonyx: Fix dummy cycles and check for SPI mode on cmds

2020-11-16 Thread Joe Komlodi
Changelog: v4 -> v5 - 3/4: Simplify logic when changing state and checking mode. - 3/4: numonyx_get_mode -> numonyx_mode - 4/4: Reword commit message to include QIO mode. v3 -> v4 - 1/4: Patch changed to change names of register fields to be more accurate. - 1/4: Revert polarity change from

[PULL 2/2] iotests: Replace deprecated ConfigParser.readfp()

2020-11-16 Thread Eric Blake
From: Kevin Wolf iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning changes the output: nbd-fault-injector.py:230: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. In fact, readfp() has already been deprecated

[PATCH v5 4/4] hw/block/m25p80: Fix Numonyx fast read dummy cycle count

2020-11-16 Thread Joe Komlodi
Numonyx chips determine the number of cycles to wait based on bits 7:4 in the volatile configuration register. However, if these bits are 0x0 or 0xF, the number of dummy cycles to wait is 10 for QIOR and QIOR4 commands or when in QIO mode, and otherwise 8 for the currently supported fast read

[PATCH v5 1/4] hw/block/m25p80: Make Numonyx config field names more accurate

2020-11-16 Thread Joe Komlodi
The previous naming of the configuration registers made it sound like that if the bits were set the settings would be enabled, while the opposite is true. Signed-off-by: Joe Komlodi Reviewed-by: Francisco Iglesias --- hw/block/m25p80.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH v5 2/4] hw/block/m25p80: Fix when VCFG XIP bit is set for Numonyx

2020-11-16 Thread Joe Komlodi
VCFG XIP is set (disabled) when the NVCFG XIP bits are all set (disabled). Signed-off-by: Joe Komlodi Reviewed-by: Francisco Iglesias --- hw/block/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 452d252..eb6539f 100644

Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling

2020-11-16 Thread Klaus Jensen
On Nov 16 19:18, Klaus Jensen wrote: > On Nov 16 09:57, Keith Busch wrote: > > On Thu, Nov 12, 2020 at 08:59:42PM +0100, Klaus Jensen wrote: > > > +static void nvme_aio_err(NvmeRequest *req, int ret) > > > +{ > > > +uint16_t status = NVME_SUCCESS; > > > +Error *local_err = NULL; > > > + >

Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling

2020-11-16 Thread Klaus Jensen
On Nov 16 09:57, Keith Busch wrote: > On Thu, Nov 12, 2020 at 08:59:42PM +0100, Klaus Jensen wrote: > > +static void nvme_aio_err(NvmeRequest *req, int ret) > > +{ > > +uint16_t status = NVME_SUCCESS; > > +Error *local_err = NULL; > > + > > +switch (req->cmd.opcode) { > > +case

RE: [PATCH v4 3/4] hw/block/m25p80: Check SPI mode before running some Numonyx commands

2020-11-16 Thread Joe Komlodi
Hi Francisco, -Original Message- From: Francisco Iglesias Sent: Monday, November 16, 2020 7:59 AM To: Joe Komlodi Cc: qemu-de...@nongnu.org; philippe.mathieu.da...@gmail.com; Francisco Eduardo Iglesias ; alist...@alistair23.me; qemu-block@nongnu.org; mre...@redhat.com Subject: Re: