Re: [PATCH] block/io_uring: add missing include file

2022-07-21 Thread Stefano Garzarella
On Thu, Jul 21, 2022 at 02:56:45PM +0800, Jinhao Fan wrote: The commit "Use io_uring_register_ring_fd() to skip fd operations" uses warn_report but did not include the header file "qemu/error-report.h". This causes "error: implicit declaration of function ‘warn_report’". Include this header file.

Re: [PATCH v2 08/10] iotests/264: add mirror-cancel test-case

2022-07-21 Thread Thomas Huth
On 05/02/2021 17.37, Vladimir Sementsov-Ogievskiy wrote: Check that cancel doesn't wait for 10s of nbd reconnect timeout. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/264 | 38 ++ tests/qemu-iotests/264.ou

Re: Failure in iotest 183

2022-07-21 Thread Thomas Huth
On 05/07/2022 12.20, Thomas Huth wrote: On 05/07/2022 11.58, Hanna Reitz wrote: On 05.07.22 11:35, Thomas Huth wrote:  Hi! I've just hit a failure in iotest 183: --- /home/thuth/devel/qemu/tests/qemu-iotests/183.out +++ /home/thuth/tmp/qemu-build/tests/qemu-iotests/scratch/183/183.out.bad @@

Re: [PULL 06/18] vfio-user: build library

2022-07-21 Thread Daniel P . Berrangé
Hi Jay / Stefan, We've got a non-determinsitic hang in QEMU CI since this series merged, which we tracked down to a libvfio-user test that is flakey: https://gitlab.com/qemu-project/qemu/-/issues/1114 John Levon has proposed a PR to libvfio-user to turn off the test, but we'll need one of you

[PATCH 2/2] migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

2022-07-21 Thread Peter Maydell
When we use BLK_MIG_BLOCK_SIZE in expressions like block_mig_state.submitted * BLK_MIG_BLOCK_SIZE, this multiplication is done as 32 bits, because both operands are 32 bits. Coverity complains about possible overflows because we then accumulate that into a 64 bit variable. Define BLK_MIG_BLOCK_SI

[PATCH 1/2] migration: Assert that migrate_multifd_compression() returns an in-range value

2022-07-21 Thread Peter Maydell
Coverity complains that when we use the return value from migrate_multifd_compression() as an array index: multifd_recv_state->ops = multifd_ops[migrate_multifd_compression()]; that this might overrun the array (which is declared to have size MULTIFD_COMPRESSION__MAX). This is because the funct

[PATCH 0/2] migration: fix coverity nits

2022-07-21 Thread Peter Maydell
This patchset fixes four Coverity nits in the migration code. The first patch is just adding an assert() to clue coverity in that an array index must be in-bounds. The second adds an ULL suffix to force a multiplication to be done at 64 bits. thanks -- PMM Peter Maydell (2): migration: Assert t

Re: [PATCH 1/2] migration: Assert that migrate_multifd_compression() returns an in-range value

2022-07-21 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > Coverity complains that when we use the return value from > migrate_multifd_compression() as an array index: > multifd_recv_state->ops = multifd_ops[migrate_multifd_compression()]; > > that this might overrun the array (which is declared to hav

Re: [PATCH 2/2] migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

2022-07-21 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > When we use BLK_MIG_BLOCK_SIZE in expressions like > block_mig_state.submitted * BLK_MIG_BLOCK_SIZE, this multiplication > is done as 32 bits, because both operands are 32 bits. Coverity > complains about possible overflows because we then accumu

Re: [PATCH 2/2] migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

2022-07-21 Thread Peter Maydell
On Thu, 21 Jul 2022 at 13:07, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > When we use BLK_MIG_BLOCK_SIZE in expressions like > > block_mig_state.submitted * BLK_MIG_BLOCK_SIZE, this multiplication > > is done as 32 bits, because both operands are 32 bits

Re: [PATCH 2/2] migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

2022-07-21 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 21 Jul 2022 at 13:07, Dr. David Alan Gilbert > wrote: > > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > When we use BLK_MIG_BLOCK_SIZE in expressions like > > > block_mig_state.submitted * BLK_MIG_BLOCK_SIZE, this multiplica

Re: [PATCH v2 08/10] iotests/264: add mirror-cancel test-case

2022-07-21 Thread Vladimir Sementsov-Ogievskiy
On 7/21/22 11:50, Thomas Huth wrote: On 05/02/2021 17.37, Vladimir Sementsov-Ogievskiy wrote: Check that cancel doesn't wait for 10s of nbd reconnect timeout. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake ---   tests/qemu-iotests/264 | 38

[PATCH qemu] hw/block/m25p80: correct dummy bytes for GD flash

2022-07-21 Thread ~igrr
From: Martin Johnson Gigadevice flash chips supported in m25p80.c (GD25Q32, GD25Q64) require a dummy bytes in DIO and QIO modes, similar to Winbond W25Q32 and W25Q64. This patch fixes this behavior. Signed-off-by: Ivan Grokhotkov Signed-off-by: Martin Johnson --- This patch was submitted into

[PATCH v3 0/8] m25p80: Add SFDP support

2022-07-21 Thread Cédric Le Goater
Hello, This is a refresh of a patchset sent long ago [1] adding support for JEDEC STANDARD JESD216 Serial Flash Discovery Parameters (SFDP). SFDP describes the features of a serial flash device using a set of internal parameter tables. Support in Linux has been added some time ago and the spi-nor

[PATCH v3 1/8] m25p80: Add basic support for the SFDP command

2022-07-21 Thread Cédric Le Goater
JEDEC STANDARD JESD216 for Serial Flash Discovery Parameters (SFDP) provides a mean to describe the features of a serial flash device using a set of internal parameter tables. This is the initial framework for the RDSFDP command giving access to a private SFDP area under the flash. This area now n

[PATCH v3 3/8] m25p80: Add the mx25l25635e SFPD table

2022-07-21 Thread Cédric Le Goater
The SFDP table is 0x80 bytes long. The mandatory table for basic features is available at byte 0x30 and an extra Macronix specific table is available at 0x60. 4B opcodes are not supported. Signed-off-by: Cédric Le Goater --- hw/block/m25p80_sfdp.h | 3 +++ hw/block/m25p80.c | 3 ++- hw/b

[PATCH v3 4/8] m25p80: Add the mx25l25635f SFPD table

2022-07-21 Thread Cédric Le Goater
The mx25l25635e and mx25l25635f chips have the same JEDEC id but the mx25l25635f has more capabilities reported in the SFDP table. Support for 4B opcodes is of interest because it is exploited by the Linux kernel. The SFDP table size is 0x200 bytes long. The mandatory table for basic features is a

[PATCH v3 7/8] m25p80: Add the w25q512jv SFPD table

2022-07-21 Thread Cédric Le Goater
The SFDP table size is 0x100 bytes long. The mandatory table for basic features is available at byte 0x80 and two extra Winbond specifics table are available at 0xC0 and 0xF0. Signed-off-by: Cédric Le Goater --- hw/block/m25p80_sfdp.h | 1 + hw/block/m25p80.c | 3 ++- hw/block/m25p80_sfdp

[PATCH v3 2/8] m25p80: Add the n25q256a SFDP table

2022-07-21 Thread Cédric Le Goater
The same values were collected on 4 differents OpenPower systems, palmettos, romulus and tacoma. The SFDP table size is defined as being 0x100 bytes but it could be bigger. Only the mandatory table for basic features is available at byte 0x30. Signed-off-by: Cédric Le Goater --- hw/block/m25p80

[PATCH v3 5/8] m25p80: Add the mx66l1g45g SFDP table

2022-07-21 Thread Cédric Le Goater
The SFDP table size is 0x200 bytes long. The mandatory table for basic features is available at byte 0x30 plus some more Macronix specific tables. Signed-off-by: Cédric Le Goater --- hw/block/m25p80_sfdp.h | 2 +- hw/block/m25p80.c | 3 +- hw/block/m25p80_sfdp.c | 68 +

[PATCH v3 6/8] m25p80: Add the w25q256 SFPD table

2022-07-21 Thread Cédric Le Goater
The SFDP table size is 0x100 bytes long. Only the mandatory table for basic features is available at byte 0x80. Signed-off-by: Cédric Le Goater --- hw/block/m25p80_sfdp.h | 2 ++ hw/block/m25p80.c | 3 ++- hw/block/m25p80_sfdp.c | 40 3 files chang

[PATCH v3 8/8] arm/aspeed: Replace mx25l25635e chip model

2022-07-21 Thread Cédric Le Goater
A mx25l25635f chip model is generally found on these machines. It's newer and uses 4B opcodes which is better to exercise the support in the Linux kernel. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/arm/aspeed.c