[PATCH v2 08/28] qapi block: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/block*.json. Said commit explains the transfo

Re: [PATCH v12 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-18 Thread Sam Li
Dmitry Fomichev 于2022年10月17日周一 08:57写道: > > On Sun, 2022-10-16 at 22:51 +0800, Sam Li wrote: > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > accepts only zoned host block devices. By adding zone management > > operations in this new BlockDriver, users can use the new

Re: [PATCH v12 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-18 Thread Sam Li
Damien Le Moal 于2022年10月17日周一 12:57写道: > > On 10/16/22 23:51, Sam Li wrote: > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > accepts only zoned host block devices. By adding zone management > > operations in this new BlockDriver, users can use the new block > > layer A

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread Bin Meng
On Tue, Oct 18, 2022 at 3:46 PM Bernhard Beschow wrote: > > Am 16. Oktober 2022 14:15:09 UTC schrieb BALATON Zoltan : > >On Sun, 16 Oct 2022, Bernhard Beschow wrote: > >> Allows e500 boards to have their root file system reside on flash using > >> only builtin devices located in the eLBC memory re

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread Bernhard Beschow
Am 16. Oktober 2022 14:15:09 UTC schrieb BALATON Zoltan : >On Sun, 16 Oct 2022, Bernhard Beschow wrote: >> Allows e500 boards to have their root file system reside on flash using >> only builtin devices located in the eLBC memory region. >> >> Note that the flash memory area is only created when a

Re: [PATCH v12 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-18 Thread Sam Li
Stefan Hajnoczi 于2022年10月17日周一 22:44写道: > > On Sun, Oct 16, 2022 at 10:51:06PM +0800, Sam Li wrote: > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > accepts only zoned host block devices. By adding zone management > > operations in this new BlockDriver, users can use t

Re: [PATCH] hw/block/nvme: re-enable NVMe PCI hotplug

2022-10-18 Thread Daniel Wagner
On Mon, Oct 10, 2022 at 07:15:08PM +0200, Klaus Jensen wrote: > This is all upstream. Namespaces with 'shared=on' *should* all be > automatically attached to any hotplugged controller devices. > > With what setup is this not working for you? Ah okay, I missed the 'shared=on' bit. Let me try again

Re: [PATCH v12 6/7] qemu-iotests: test new zone operations

2022-10-18 Thread Sam Li
Dmitry Fomichev 于2022年10月17日周一 08:57写道: > > On Sun, 2022-10-16 at 22:51 +0800, Sam Li wrote: > > We have added new block layer APIs of zoned block devices. > > Test it with: > > Create a null_blk device, run each zone operation on it and see > > whether reporting right zone information. > > change

Re: [PATCH v2] nbd/client: Use smarter assert

2022-10-18 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > Assigning strlen() to a uint32_t and then asserting that it isn't too > large doesn't catch the case of an input string 4G in length. > Thankfully, the incoming strings can never be that large: if the > export name or query is reflecting a string the client

Re: [PATCH v4 2/3] block: introduce zone append write for zoned devices

2022-10-18 Thread Sam Li
Damien Le Moal 于2022年10月17日周一 13:22写道: > > On 10/16/22 23:56, Sam Li wrote: > > A zone append command is a write operation that specifies the first > > logical block of a zone as the write position. When writing to a zoned > > block device using zone append, the byte offset of writes is pointing >

Re: [RFC v3 2/2] virtio-blk: add zoned storage emulation for zoned devices

2022-10-18 Thread Sam Li
Dmitry Fomichev 于2022年10月17日周一 09:01写道: > > On Sun, 2022-10-16 at 23:05 +0800, Sam Li wrote: > > This patch extends virtio-blk emulation to handle zoned device commands > > by calling the new block layer APIs to perform zoned device I/O on > > behalf of the guest. It supports Report Zone, four zon

Re: [PATCH v3 2/9] hw/{arm,ppc}: Resolve unreachable code

2022-10-18 Thread Peter Maydell
On Mon, 17 Oct 2022 at 21:57, Philippe Mathieu-Daudé wrote: > > On 16/10/22 14:27, Bernhard Beschow wrote: > > pflash_cfi01_register() always returns with a non-NULL pointer (otherwise > > it would crash internally). Therefore, the bodies of the if-statements > > are unreachable. > > This is true,

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread Peter Maydell
On Sun, 16 Oct 2022 at 13:28, Bernhard Beschow wrote: > > Allows e500 boards to have their root file system reside on flash using > only builtin devices located in the eLBC memory region. > > Note that the flash memory area is only created when a -pflash argument is > given, and that the size is d

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread BALATON Zoltan
On Tue, 18 Oct 2022, Bin Meng wrote: On Tue, Oct 18, 2022 at 3:46 PM Bernhard Beschow wrote: Am 16. Oktober 2022 14:15:09 UTC schrieb BALATON Zoltan : On Sun, 16 Oct 2022, Bernhard Beschow wrote: Allows e500 boards to have their root file system reside on flash using only builtin devices loc

Re: [RFC 7/7] migration: call qemu_savevm_state_pending_exact() with the guest stopped

2022-10-18 Thread Jason Gunthorpe
On Fri, Oct 14, 2022 at 01:29:51PM +0100, Joao Martins wrote: > On 14/10/2022 12:28, Juan Quintela wrote: > > Joao Martins wrote: > >> On 13/10/2022 17:08, Juan Quintela wrote: > >>> Oops. My understanding was that once the guest is stopped you can say > >>> how big is it. > > > > Hi > > > >>

[PATCH v3 2/2] error handling: Use RETRY_ON_EINTR() macro where applicable

2022-10-18 Thread Nikita Ivanov
There is a defined RETRY_ON_EINTR() macro in qemu/osdep.h which handles the same while loop. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/415 Signed-off-by: Nikita Ivanov --- block/file-posix.c| 37 - chardev/char-pty.c| 4 +--- hw/

Re: [PATCH v5 00/18] tests/qtest: Enable running qtest on Windows

2022-10-18 Thread Alex Bennée
Bin Meng writes: > Hi Alex, > > On Fri, Oct 7, 2022 at 1:31 PM Bin Meng wrote: >> >> On Fri, Oct 7, 2022 at 4:35 AM Alex Bennée wrote: >> > >> > >> > Bin Meng writes: >> > >> > > In preparation to adding virtio-9p support on Windows, this series >> > > enables running qtest on Windows, so th

Re: [PATCH v2] nbd/client: Use smarter assert

2022-10-18 Thread Philippe Mathieu-Daudé
On 17/10/22 21:12, Eric Blake wrote: Assigning strlen() to a uint32_t and then asserting that it isn't too large doesn't catch the case of an input string 4G in length. Thankfully, the incoming strings can never be that large: if the export name or query is reflecting a string the client got from

Re: [PATCH 0/3] Add qemu-img checksum command using blkhash

2022-10-18 Thread Nir Soffer
On Sun, Sep 18, 2022 at 12:35 PM Nir Soffer wrote: > ping > > Kevin, Hanna, I hope you have time to take a look. > > https://lists.nongnu.org/archive/html/qemu-block/2022-09/msg00021.html Ping again, hopefully someone has time to look at this :-) > > > > On Thu, Sep 1, 2022 at 5:32 PM Nir Sof

[PATCH v4 0/7] ppc/e500: Add support for two types of flash, cleanup

2022-10-18 Thread Bernhard Beschow
Cover letter: ~ This series adds support for -pflash and direct SD card access to the PPC e500 boards. The idea is to increase compatibility with "real" firmware images where only the bare minimum of drivers is compiled in. The series is structured as follows: Patches 1-4 perform som

[PATCH v4 4/7] hw/sd/sdhci: Rename ESDHC_* defines to USDHC_*

2022-10-18 Thread Bernhard Beschow
The device model's functions start with "usdhc_", so rename the defines accordingly for consistency. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng --- hw/sd/sdhci.c | 66 +-- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/

[PATCH v4 7/7] hw/ppc/e500: Add Freescale eSDHC to e500plat

2022-10-18 Thread Bernhard Beschow
Adds missing functionality to e500plat machine which increases the chance of given "real" firmware images to access SD cards. Signed-off-by: Bernhard Beschow --- docs/system/ppc/ppce500.rst | 12 hw/ppc/Kconfig | 1 + hw/ppc/e500.c | 35 ++

[PATCH v4 3/7] hw/sd/sdhci-internal: Unexport ESDHC defines

2022-10-18 Thread Bernhard Beschow
These defines aren't used outside of sdhci.c, so can be defined there. Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- hw/sd/sdhci-internal.h | 20 hw/sd/sdhci.c | 19 +++ 2 files changed, 19 insertions

[PATCH v4 2/7] hw/block/pflash_cfi0{1, 2}: Error out if device length isn't a power of two

2022-10-18 Thread Bernhard Beschow
According to the JEDEC standard the device length is communicated to an OS as an exponent (power of two). Signed-off-by: Bernhard Beschow Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 8 ++-- hw/block/pflash_cfi02.c | 5 + 2 files changed, 11 i

[PATCH v4 5/7] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread Bernhard Beschow
Allows e500 boards to have their root file system reside on flash using only builtin devices located in the eLBC memory region. Note that the flash memory area is only created when a -pflash argument is given, and that the size is determined by the given file. The idea is to put users into control

[PATCH v4 6/7] hw/sd/sdhci: Implement Freescale eSDHC device model

2022-10-18 Thread Bernhard Beschow
Will allow e500 boards to access SD cards using just their own devices. Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 120 +- include/hw/sd/sdhci.h | 3 ++ 2 files changed, 122 insertions(+), 1 deletion(-) diff --git a/hw/sd/sdhci.c b/hw/s

[PATCH v4 1/7] docs/system/ppc/ppce500: Use qemu-system-ppc64 across the board(s)

2022-10-18 Thread Bernhard Beschow
The documentation suggests that there is a qemu-system-ppc32 binary while the 32 bit version is actually just named qemu-system-ppc. Settle on qemu-system-ppc64 which also works for 32 bit machines and causes less clutter in the documentation. Found-by: BALATON Zoltan Suggested-by: Bin Meng Sign