Re: [PULL 03/38] pflash: Only read non-zero parts of backend image

2023-02-07 Thread Kevin Wolf
Am 06.02.2023 um 16:54 hat Cédric Le Goater geschrieben: > On 1/20/23 13:25, Kevin Wolf wrote: > > From: Xiang Zheng > > > > Currently we fill the VIRT_FLASH memory space with two 64MB NOR images > > when using persistent UEFI variables on virt board. Actually we only use > > a very small(non-zer

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-07 Thread Philippe Mathieu-Daudé
On 7/2/23 00:40, Bernhard Beschow wrote: Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland : On 05/02/2023 22:21, BALATON Zoltan wrote: On Sun, 5 Feb 2023, Mark Cave-Ayland wrote: On 26/01/2023 21:17, Bernhard Beschow wrote: Internal instances now defer interrupt wiring to the caller

Re: [PATCH] MAINTAINERS: Cover RCU documentation

2023-02-07 Thread Philippe Mathieu-Daudé
Ping? On 19/1/23 11:26, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0fe50d01e3..73e9cb33f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2812,6 +2812,8 @@ F: qapi/ru

Re: [PULL 03/38] pflash: Only read non-zero parts of backend image

2023-02-07 Thread Cédric Le Goater
On 2/7/23 09:38, Kevin Wolf wrote: Am 06.02.2023 um 16:54 hat Cédric Le Goater geschrieben: On 1/20/23 13:25, Kevin Wolf wrote: From: Xiang Zheng Currently we fill the VIRT_FLASH memory space with two 64MB NOR images when using persistent UEFI variables on virt board. Actually we only use a v

Re: [PATCH v3 3/4] qemu-io: add -r option to register I/O buffer

2023-02-07 Thread Hanna Czenczek
On 01.02.23 16:27, Stefan Hajnoczi wrote: The blk_register_buf() API is an optimization hint that allows some block drivers to avoid I/O buffer housekeeping or bounce buffers. Add an -r option to register the I/O buffer so that qemu-io can be used to test the blk_register_buf() API. The next com

Re: [PATCH v3 2/4] qemu-io: use BdrvRequestFlags instead of int

2023-02-07 Thread Hanna Czenczek
On 01.02.23 16:27, Stefan Hajnoczi wrote: The block layer APIs use BdrvRequestFlags while qemu-io code uses int. Although the code compiles and runs fine, BdrvRequestFlags is clearer because it differentiates between other types of flags like bdrv_open() flags. This is purely refactoring. Revie

Re: [PATCH v3 1/4] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF

2023-02-07 Thread Hanna Czenczek
On 01.02.23 16:27, Stefan Hajnoczi wrote: When a write request is converted into a write zeroes request by the detect-zeroes= feature, it is no longer associated with an I/O buffer. The BDRV_REQ_REGISTERED_BUF flag doesn't make sense without an I/O buffer and must be cleared because bdrv_co_do_pw

Re: [PATCH v3 4/4] iotests/detect-zeroes-registered-buf: add new test

2023-02-07 Thread Hanna Czenczek
On 01.02.23 16:27, Stefan Hajnoczi wrote: This regression test demonstrates that detect-zeroes works with registered buffers. Bug details: https://gitlab.com/qemu-project/qemu/-/issues/1404 Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- .../tests/detect-zeroes-registered-buf

Re: [PULL 03/38] pflash: Only read non-zero parts of backend image

2023-02-07 Thread Kevin Wolf
Am 07.02.2023 um 10:19 hat Cédric Le Goater geschrieben: > On 2/7/23 09:38, Kevin Wolf wrote: > > Am 06.02.2023 um 16:54 hat Cédric Le Goater geschrieben: > > > On 1/20/23 13:25, Kevin Wolf wrote: > > > > From: Xiang Zheng > > > > > > > > Currently we fill the VIRT_FLASH memory space with two 64M

Re: [PATCH 10/12] tests/qemu-iotests: Require virtio-scsi-pci

2023-02-07 Thread Thomas Huth
On 06/02/2023 16.04, Fabiano Rosas wrote: Check that virtio-scsi-pci is present in the QEMU build before running the tests. Signed-off-by: Fabiano Rosas --- tests/qemu-iotests/186 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 072e54

Re: [PATCH 00/13] block: Fix bdrv_open*() calls from coroutine context

2023-02-07 Thread Hanna Czenczek
On 26.01.23 18:24, Kevin Wolf wrote: bdrv_open*() must not be called from coroutine context, amongst others because it modifies the block graph. However, some functions - in particular all .bdrv_co_create* implementations of image formats - do call it from coroutine context. This is already wrong

Re: [PULL 00/30] Migration 20230206 patches

2023-02-07 Thread Peter Maydell
On Tue, 7 Feb 2023 at 00:57, Juan Quintela wrote: > > The following changes since commit 6661b8c7fe3f8b5687d2d90f7b4f3f23d70e3e8b: > > Merge tag 'pull-ppc-20230205' of https://gitlab.com/danielhb/qemu into > staging (2023-02-05 16:49:09 +) > > are available in the Git repository at: > > h

Re: [PATCH v3 3/4] qemu-io: add -r option to register I/O buffer

2023-02-07 Thread Stefan Hajnoczi
On Tue, Feb 07, 2023 at 12:47:06PM +0100, Hanna Czenczek wrote: > On 01.02.23 16:27, Stefan Hajnoczi wrote: > > The blk_register_buf() API is an optimization hint that allows some > > block drivers to avoid I/O buffer housekeeping or bounce buffers. > > > > Add an -r option to register the I/O buf

random copy-before-write iotest failure

2023-02-07 Thread Peter Maydell
This is on ppc64 (big-endian), a random failure (it was while testing the riscv pullreq, but that doesn't touch any of the block stuff): 616/635 qemu:block / qemu-iotests qcow2 ERROR 101.88s exit status 1 ― ✀ ―

Re: random copy-before-write iotest failure

2023-02-07 Thread Fabiano Rosas
Peter Maydell writes: > This is on ppc64 (big-endian), a random failure > (it was while testing the riscv pullreq, but that doesn't touch > any of the block stuff): > > 616/635 qemu:block / qemu-iotests qcow2 >ERROR > 101.88s exit status 1 > ―――

[PATCH v4 4/4] iotests/detect-zeroes-registered-buf: add new test

2023-02-07 Thread Stefan Hajnoczi
This regression test demonstrates that detect-zeroes works with registered buffers. Bug details: https://gitlab.com/qemu-project/qemu/-/issues/1404 Reviewed-by: Eric Blake Reviewed-by: Hanna Czenczek Signed-off-by: Stefan Hajnoczi --- .../tests/detect-zeroes-registered-buf| 58

[PATCH v4 1/4] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF

2023-02-07 Thread Stefan Hajnoczi
When a write request is converted into a write zeroes request by the detect-zeroes= feature, it is no longer associated with an I/O buffer. The BDRV_REQ_REGISTERED_BUF flag doesn't make sense without an I/O buffer and must be cleared because bdrv_co_do_pwrite_zeroes() fails with -EINVAL when it's s

[PATCH v4 3/4] qemu-io: add -r option to register I/O buffer

2023-02-07 Thread Stefan Hajnoczi
The blk_register_buf() API is an optimization hint that allows some block drivers to avoid I/O buffer housekeeping or bounce buffers. Add an -r option to register the I/O buffer so that qemu-io can be used to test the blk_register_buf() API. The next commit will add a test that uses the new option

[PATCH v4 0/4] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF

2023-02-07 Thread Stefan Hajnoczi
v4: - Add 'r' to read_f() getopt() call [Hanna] - Fix qemu_io_alloc() and friends buf and len with qemuio_misalign [Hanna] - Fix qemu_iovec_destroy()/qemu_io_free() ordering in aio_write_done() [Hanna] - Add mutually exclusive -z -r option check in aio_write_f() [Hanna] v3: - Restore alphabetical o

[PATCH v4 2/4] qemu-io: use BdrvRequestFlags instead of int

2023-02-07 Thread Stefan Hajnoczi
The block layer APIs use BdrvRequestFlags while qemu-io code uses int. Although the code compiles and runs fine, BdrvRequestFlags is clearer because it differentiates between other types of flags like bdrv_open() flags. This is purely refactoring. Reviewed-by: Eric Blake Reviewed-by: Hanna Czenc

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-07 Thread Mark Cave-Ayland
On 06/02/2023 23:40, Bernhard Beschow wrote: Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland : On 05/02/2023 22:21, BALATON Zoltan wrote: On Sun, 5 Feb 2023, Mark Cave-Ayland wrote: On 26/01/2023 21:17, Bernhard Beschow wrote: Internal instances now defer interrupt wiring to the c

Re: [PATCH v9 07/14] vfio/migration: Block multiple devices migration

2023-02-07 Thread Alex Williamson
On Mon, 6 Feb 2023 14:31:30 +0200 Avihai Horon wrote: > Currently VFIO migration doesn't implement some kind of intermediate > quiescent state in which P2P DMAs are quiesced before stopping or > running the device. This can cause problems in multi-device migration > where the devices are doing P2

Re: [PATCH v9 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-02-07 Thread Alex Williamson
On Mon, 6 Feb 2023 14:31:33 +0200 Avihai Horon wrote: > @@ -523,6 +745,41 @@ static int vfio_save_iterate(QEMUFile *f, void *opaque) > return 0; > } > > +static int vfio_save_complete_precopy(QEMUFile *f, void *opaque) > +{ > +VFIODevice *vbasedev = opaque; > +enum vfio_device_mig_

Re: [PATCH v9 14/14] docs/devel: Align VFIO migration docs to v2 protocol

2023-02-07 Thread Alex Williamson
On Mon, 6 Feb 2023 14:31:37 +0200 Avihai Horon wrote: > Now that VFIO migration protocol v2 has been implemented and v1 protocol > has been removed, update the documentation according to v2 protocol. > > Signed-off-by: Avihai Horon > Reviewed-by: Cédric Le Goater > --- > docs/devel/vfio-migra

[PATCH 1/7] hw/isa: Un-inline isa_bus_from_device()

2023-02-07 Thread Philippe Mathieu-Daudé
No point in inlining isa_bus_from_device() which is only used at device realization time. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 5 + include/hw/isa/isa.h | 5 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c i

[PATCH 2/7] hw/isa: Use isa_address_space_io() to reduce access on global 'isabus'

2023-02-07 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 5bd99379e9..95fc1ba5f7 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -114,7 +114,7 @@ static inline void isa_init_

[PATCH 0/7] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport()

2023-02-07 Thread Philippe Mathieu-Daudé
Background thread: https://lore.kernel.org/qemu-devel/5095dffc-309b-6c72-d255-8cdaa6fd3...@ilande.co.uk/ The ide_init_ioport() method expect an ISA device, but is massaged to accept NULL device (IOW, non-ISA devices...). A plausible explanation is QOM objects can only inherit one parent, and ide_

[PATCH 4/7] hw/ide: Introduce generic ide_init_ioport()

2023-02-07 Thread Philippe Mathieu-Daudé
Add ide_init_ioport() which is not restricted to the ISA bus. (Next commit will use it for a PCI device). Inspired-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ioport.c | 11 +-- include/hw/ide/internal.h | 2 ++ 2 files changed, 11 insertions(+), 2 d

[PATCH 5/7] hw/ide/piix: Use generic ide_init_ioport()

2023-02-07 Thread Philippe Mathieu-Daudé
TYPE_PIIX3_IDE is a PCI function inheriting from QOM TYPE_PCI_DEVICE. To be able to call the ISA specific ide_init_ioport_isa(), we call this function passing a NULL ISADevice argument. Remove this hack by calling the recently added generic ide_init_ioport(), which doesn't expect any ISADevice. In

[PATCH 3/7] hw/ide: Rename ISA specific ide_init_ioport() as ide_init_ioport_isa()

2023-02-07 Thread Philippe Mathieu-Daudé
Rename ide_init_ioport() as ide_init_ioport_isa() to make explicit it expects an ISA device. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ioport.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/piix.c | 4 ++-- include/hw/ide/internal.h | 2 +- 4 files changed, 5 inse

[PATCH 6/7] hw/isa: Assert isa_register_portio_list() gets non-NULL ISA device

2023-02-07 Thread Philippe Mathieu-Daudé
The previous commit removed the single call to isa_register_portio_list() with dev=NULL. To be sure we won't reintroduce such weird (ab)use, add an assertion. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/isa/

[PATCH 7/7] hw/ide/piix: Remove dead code in pci_piix_init_ports()

2023-02-07 Thread Philippe Mathieu-Daudé
pci_piix_init_ports() always return '0' so can't fail. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/piix.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 1cd4389611..54d545ce3a 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c

Re: [PATCH 0/7] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport()

2023-02-07 Thread Philippe Mathieu-Daudé
On 8/2/23 01:07, Philippe Mathieu-Daudé wrote: Background thread: https://lore.kernel.org/qemu-devel/5095dffc-309b-6c72-d255-8cdaa6fd3...@ilande.co.uk/ The ide_init_ioport() method expect an ISA device, but is massaged to accept NULL device (IOW, non-ISA devices...). A plausible explanation is

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-07 Thread Bernhard Beschow
Am 7. Februar 2023 20:52:02 UTC schrieb Mark Cave-Ayland : >On 06/02/2023 23:40, Bernhard Beschow wrote: > >> Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland >> : >>> On 05/02/2023 22:21, BALATON Zoltan wrote: >>> On Sun, 5 Feb 2023, Mark Cave-Ayland wrote: > On 26/01/2023 2

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-07 Thread BALATON Zoltan
On Wed, 8 Feb 2023, Bernhard Beschow wrote: Am 7. Februar 2023 20:52:02 UTC schrieb Mark Cave-Ayland : On 06/02/2023 23:40, Bernhard Beschow wrote: Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland : On 05/02/2023 22:21, BALATON Zoltan wrote: On Sun, 5 Feb 2023, Mark Cave-Ayland wro

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-07 Thread Philippe Mathieu-Daudé
On 8/2/23 01:43, BALATON Zoltan wrote: On Wed, 8 Feb 2023, Bernhard Beschow wrote: Am 7. Februar 2023 20:52:02 UTC schrieb Mark Cave-Ayland : On 06/02/2023 23:40, Bernhard Beschow wrote: Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland : On 05/02/2023 22:21, BALATON Zoltan wrote: On