Re: [PATCH v13 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-08-06 Thread Vladimir Sementsov-Ogievskiy
06.08.2020 22:35, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, add the to_dict() method to classes that returns a dictionary to_json() ... that returns a json-dumpable object with desired fields and their values. Extend it in subclass when

Re: [PATCH 1/3] qemu: implementation of transient option for qcow2 file

2020-08-06 Thread Masayoshi Mizuma
On Thu, Aug 06, 2020 at 12:09:20PM +0200, Peter Krempa wrote: > On Sun, Jul 19, 2020 at 22:56:50 -0400, Masayoshi Mizuma wrote: > > On Sat, Jul 18, 2020 at 08:06:00AM +0200, Peter Krempa wrote: > > > On Thu, Jul 16, 2020 at 20:55:29 -0400, Masayoshi Mizuma wrote: > > > > Thank you for your review.

[PATCH 1/2] block/rbd: remove runtime_opts

2020-08-06 Thread John Snow
This saw its last use in 4bfb274165ba. Signed-off-by: John Snow --- block/rbd.c | 42 -- 1 file changed, 42 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 688074c64b7..171c67e3a01 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -341,48 +341,6 @@

[PATCH 2/2] block/qcow: remove runtime opts

2020-08-06 Thread John Snow
Introduced by d85f4222b468, These were seemingly never used at all. Signed-off-by: John Snow --- block/qcow.c | 9 - 1 file changed, 9 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index e514a86fe5e..f8919a44d19 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -105,15 +105,6 @@ s

[PATCH 0/2] block: remove stale runtime_opts

2020-08-06 Thread John Snow
John Snow (2): block/rbd: remove runtime_opts block/qcow: remove runtime opts block/qcow.c | 9 - block/rbd.c | 42 -- 2 files changed, 51 deletions(-) -- 2.26.2

[PATCH v13 04/11] qcow2_format.py: dump bitmap flags in human readable way.

2020-08-06 Thread Andrey Shinkevich
Introduce the class BitmapFlags that parses a bitmap flags mask. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/qcow2_format.py | 16 1 file changed, 16 insertions(+) diff --git a/te

[PATCH v13 05/11] qcow2_format.py: Dump bitmap directory information

2020-08-06 Thread Andrey Shinkevich
Read and dump entries from the bitmap directory of QCOW2 image. Header extension: magic 0x23852875 (Bitmaps) ... Bitmap name bitmap-1 bitmap_table_offset 0xf bitmap_table_size 1 flags 0x2 (['auto']) type 1

[PATCH v13 08/11] qcow2.py: Introduce '-j' key to dump in JSON format

2020-08-06 Thread Andrey Shinkevich
Add the command key to the qcow2.py arguments list to dump QCOW2 metadata in JSON format. Here is the suggested way to do that. The implementation of the dump in JSON format is in the patch that follows. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-i

[PATCH v13 06/11] qcow2_format.py: pass cluster size to substructures

2020-08-06 Thread Andrey Shinkevich
The cluster size of an image is the QcowHeader class member and may be obtained by dependent extension structures such as Qcow2BitmapExt for further bitmap table details print. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/qcow2_format.py | 17

[PATCH v13 00/11] iotests: Dump QCOW2 dirty bitmaps metadata

2020-08-06 Thread Andrey Shinkevich
Add dirty bitmap information to QCOW2 metadata dump in the qcow2_format.py. v13: 01: Bitmaps are added without launching VM (suggested by Eric). The code amendments suggested by Vladimir. 07: Bitmap table entry size zeroed up for all types but serialized. 09: The extra dict variables r

[PATCH v13 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-08-06 Thread Andrey Shinkevich
As __dict__ is being extended with class members we do not want to print, add the to_dict() method to classes that returns a dictionary with desired fields and their values. Extend it in subclass when necessary to print the final dictionary in the JSON output which follows. Suggested-by: Vladimir

[PATCH v13 10/11] qcow2_format.py: support dumping metadata in JSON format

2020-08-06 Thread Andrey Shinkevich
Implementation of dumping QCOW2 image metadata. The sample output: { "Header_extensions": [ { "name": "Feature table", "magic": 1745090647, "length": 192, "data_str": "" }, { "name": "Bitmaps", "magi

[PATCH v13 02/11] qcow2_format.py: make printable data an extension class member

2020-08-06 Thread Andrey Shinkevich
Let us differ binary data type from string one for the extension data variable and keep the string as the QcowHeaderExtension class member. Signed-off-by: Andrey Shinkevich Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/qcow2_format.py | 14 ---

[PATCH v13 03/11] qcow2_format.py: change Qcow2BitmapExt initialization method

2020-08-06 Thread Andrey Shinkevich
There are two ways to initialize a class derived from Qcow2Struct: 1. Pass a block of binary data to the constructor. 2. Pass the file descriptor to allow reading the file from constructor. Let's change the Qcow2BitmapExt initialization method from 1 to 2 to support a scattered reading in the initi

[PATCH v13 11/11] iotests: dump QCOW2 header in JSON in #303

2020-08-06 Thread Andrey Shinkevich
Extend the test case #303 by dumping QCOW2 image metadata in JSON format. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/303 | 3 ++ tests/qemu-iotests/303.out | 76 ++ 2 files changed, 79 insert

[PATCH v13 07/11] qcow2_format.py: Dump bitmap table serialized entries

2020-08-06 Thread Andrey Shinkevich
Add bitmap table information to the QCOW2 metadata dump. Bitmap name bitmap-1 ... Bitmap table typesize offset 0 serialized 6553610092544 1 all-zeroes 00 2 all-zeroes 00 Signe

[PATCH v13 01/11] iotests: add test for QCOW2 header dump

2020-08-06 Thread Andrey Shinkevich
The simple script creates a QCOW2 image and fills it with some data. Two bitmaps are created as well. Then the script reads the image header with extensions from the disk by running the script qcow2.py and dumps the information to the output. Other entities, such as snapshots, may be added to the t

Re: [PATCH for-5.1?] block/block-copy: always align copied region to cluster size

2020-08-06 Thread Eric Blake
On 8/6/20 8:57 AM, Stefan Reiter wrote: Since commit 42ac214406e0 (block/block-copy: refactor task creation) block_copy_task_create calculates the area to be copied via bdrv_dirty_bitmap_next_dirty_area, but that can return an unaligned byte count if the backing image's last cluster end is not al

Re: [PATCH] block/block-copy: always align copied region to cluster size

2020-08-06 Thread Vladimir Sementsov-Ogievskiy
06.08.2020 16:57, Stefan Reiter wrote: Since commit 42ac214406e0 (block/block-copy: refactor task creation) block_copy_task_create calculates the area to be copied via bdrv_dirty_bitmap_next_dirty_area, but that can return an unaligned byte count if the backing image's last cluster end is not ali

Re: [PATCH for-5.2 v2 9/9] tests/qtest/cdrom: Add more s390x-related boot tests

2020-08-06 Thread Janosch Frank
On 8/6/20 12:53 PM, Thomas Huth wrote: > Let's add two new tests: > > 1) Booting with "bootindex" is the architected default behavior on the > s390x target, so we should have at least one test that is using the > "bootindex" property. > > 2) The s390-ccw bios used to fail when other unbootable de

Re: [PATCH for-5.2 v2 4/9] pc-bios/s390-ccw: Move the inner logic of find_subch() to a separate function

2020-08-06 Thread Janosch Frank
On 8/6/20 12:53 PM, Thomas Huth wrote: > Move the code to a separate function to be able to re-use it from a > different spot later. > > Reviewed-by: Claudio Imbrenda > Signed-off-by: Thomas Huth The new function name helps a lot :) Reviewed-by: Janosch Frank > --- > pc-bios/s390-ccw/main.c

Re: [PATCH for-5.2 v2 3/9] pc-bios/s390-ccw: Introduce ENODEV define and remove guards of others

2020-08-06 Thread Janosch Frank
On 8/6/20 12:53 PM, Thomas Huth wrote: > Remove the "#ifndef E..." guards from the defines here - the header > guard S390_CCW_H at the top of the file should avoid double definition, > and if the error code is defined in a different file already, we're in > trouble anyway, then it's better to see t

[PATCH] block/block-copy: always align copied region to cluster size

2020-08-06 Thread Stefan Reiter
Since commit 42ac214406e0 (block/block-copy: refactor task creation) block_copy_task_create calculates the area to be copied via bdrv_dirty_bitmap_next_dirty_area, but that can return an unaligned byte count if the backing image's last cluster end is not aligned to the bitmap's granularity. Always

Re: [PATCH v3 0/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-06 Thread Paolo Bonzini
On 06/08/20 15:17, Stefan Hajnoczi wrote: > v3: > * Use smp_wmb() in aio_notify_accept() [Paolo] > * Flatten if statement in aio_poll() [Paolo] > > v2: > * Added smp_mb() in aio_notify_accept() [Paolo] > * Added comments about memory barrier pairing [Paolo] > * Eliminated extra aio_compute_ti

Re: [PATCH v3 2/3] async: always set ctx->notified in aio_notify()

2020-08-06 Thread Paolo Bonzini
On 06/08/20 15:18, Stefan Hajnoczi wrote: > +atomic_set(&ctx->notified, false); > + > +/* > + * Write ctx->notified before reading e.g. bh->flags. Pairs with smp_mb > in > + * aio_notify. > + */ > +smp_wmb(); Sorry I was not clear: the memory barrier has to be smp_mb(), b

[PATCH v3 3/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-06 Thread Stefan Hajnoczi
Polling only monitors the ctx->notified field and does not need the ctx->notifier EventNotifier to be signalled. Keep ctx->aio_notify_me disabled while polling to avoid unnecessary EventNotifier syscalls. This optimization improves virtio-blk 4KB random read performance by 18%. The following resul

[PATCH v3 1/3] async: rename event_notifier_dummy_cb/poll()

2020-08-06 Thread Stefan Hajnoczi
The event_notifier_*() prefix can be confused with the EventNotifier APIs that are also called event_notifier_*(). Rename the functions to aio_context_notifier_*() to make it clear that they relate to the AioContext::notifier field. Signed-off-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Da

[PATCH v3 0/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-06 Thread Stefan Hajnoczi
v3: * Use smp_wmb() in aio_notify_accept() [Paolo] * Flatten if statement in aio_poll() [Paolo] v2: * Added smp_mb() in aio_notify_accept() [Paolo] * Added comments about memory barrier pairing [Paolo] * Eliminated extra aio_compute_timeout() before calling ppoll() This patch series eliminat

[PATCH v3 2/3] async: always set ctx->notified in aio_notify()

2020-08-06 Thread Stefan Hajnoczi
aio_notify() does not set ctx->notified when called with ctx->aio_notify_me disabled. Therefore aio_notify_me needs to be enabled during polling. This is suboptimal since expensive event_notifier_set(&ctx->notifier) and event_notifier_test_and_clear(&ctx->notifier) calls are required when ctx->aio

Re: [PATCH for-5.2 v2 9/9] tests/qtest/cdrom: Add more s390x-related boot tests

2020-08-06 Thread Cornelia Huck
On Thu, 6 Aug 2020 13:58:47 +0200 Thomas Huth wrote: > On 06/08/2020 13.23, Cornelia Huck wrote: > > On Thu, 6 Aug 2020 12:53:49 +0200 > > Thomas Huth wrote: > > > >> Let's add two new tests: > >> > >> 1) Booting with "bootindex" is the architected default behavior on the > >> s390x target,

Re: [PATCH-for-5.2 7/7] hw/block/fdc: Add ASCII art schema of QOM relations

2020-08-06 Thread Kevin Wolf
Am 06.08.2020 um 12:33 hat Philippe Mathieu-Daudé geschrieben: > On 8/6/20 10:57 AM, Kevin Wolf wrote: > > Am 06.08.2020 um 10:08 hat Philippe Mathieu-Daudé geschrieben: > >> Without knowing the QEMU history, it is hard to relate QEMU objects > >> with the hardware datasheet. > >> > >> For e

Re: [PATCH for-5.2 v2 9/9] tests/qtest/cdrom: Add more s390x-related boot tests

2020-08-06 Thread Thomas Huth
On 06/08/2020 13.23, Cornelia Huck wrote: > On Thu, 6 Aug 2020 12:53:49 +0200 > Thomas Huth wrote: > >> Let's add two new tests: >> >> 1) Booting with "bootindex" is the architected default behavior on the >> s390x target, so we should have at least one test that is using the >> "bootindex" prop

[PATCH for-5.2 v2 6/9] pc-bios/s390-ccw: Scan through all devices if no boot device specified

2020-08-06 Thread Thomas Huth
If no boot device has been specified (via "bootindex=..."), the s390-ccw bios scans through all devices to find a bootable device. But so far, it stops at the very first block device (including virtio-scsi controllers without attached devices) that it finds, no matter whether it is bootable or not.

Re: [PATCH v2 3/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-06 Thread Stefan Hajnoczi
On Wed, Aug 05, 2020 at 06:37:45PM +0200, Paolo Bonzini wrote: > On 05/08/20 12:00, Stefan Hajnoczi wrote: > > + > > +/* > > + * aio_notify can avoid the expensive event_notifier_set if > > + * everything (file descriptors, bottom halves, timers) will > > + * be re-e

Re: [PATCH for-5.2 v2 3/9] pc-bios/s390-ccw: Introduce ENODEV define and remove guards of others

2020-08-06 Thread Cornelia Huck
On Thu, 6 Aug 2020 12:53:43 +0200 Thomas Huth wrote: > Remove the "#ifndef E..." guards from the defines here - the header > guard S390_CCW_H at the top of the file should avoid double definition, > and if the error code is defined in a different file already, we're in > trouble anyway, then it'

[PATCH for-5.2 v2 9/9] tests/qtest/cdrom: Add more s390x-related boot tests

2020-08-06 Thread Thomas Huth
Let's add two new tests: 1) Booting with "bootindex" is the architected default behavior on the s390x target, so we should have at least one test that is using the "bootindex" property. 2) The s390-ccw bios used to fail when other unbootable devices have been specified before the bootable device

Re: [PATCH for-5.2 v2 5/9] pc-bios/s390-ccw: Do not bail out early if not finding a SCSI disk

2020-08-06 Thread Cornelia Huck
On Thu, 6 Aug 2020 12:53:45 +0200 Thomas Huth wrote: > In case the user did not specify a boot device, we want to continue > looking for other devices if there are no valid SCSI disks on a virtio- > scsi controller. As a first step, do not panic in this case and let > the control flow carry the

Re: [PATCH for-5.2 v2 8/9] pc-bios/s390-ccw/main: Remove superfluous call to enable_subchannel()

2020-08-06 Thread Cornelia Huck
On Thu, 6 Aug 2020 12:53:48 +0200 Thomas Huth wrote: > enable_subchannel() is already done during is_dev_possibly_bootable() > (which is called from find_boot_device() -> find_subch()), so there > is no need to do this again in the main() function. > > Signed-off-by: Thomas Huth > --- > pc-bi

Re: [PATCH for-5.2 v2 9/9] tests/qtest/cdrom: Add more s390x-related boot tests

2020-08-06 Thread Cornelia Huck
On Thu, 6 Aug 2020 12:53:49 +0200 Thomas Huth wrote: > Let's add two new tests: > > 1) Booting with "bootindex" is the architected default behavior on the > s390x target, so we should have at least one test that is using the > "bootindex" property. > > 2) The s390-ccw bios used to fail when ot

Re: [PATCH for-5.2 v2 4/9] pc-bios/s390-ccw: Move the inner logic of find_subch() to a separate function

2020-08-06 Thread Cornelia Huck
On Thu, 6 Aug 2020 12:53:44 +0200 Thomas Huth wrote: > Move the code to a separate function to be able to re-use it from a > different spot later. > > Reviewed-by: Claudio Imbrenda > Signed-off-by: Thomas Huth > --- > pc-bios/s390-ccw/main.c | 99 - >

[PATCH for-5.2 v2 8/9] pc-bios/s390-ccw/main: Remove superfluous call to enable_subchannel()

2020-08-06 Thread Thomas Huth
enable_subchannel() is already done during is_dev_possibly_bootable() (which is called from find_boot_device() -> find_subch()), so there is no need to do this again in the main() function. Signed-off-by: Thomas Huth --- pc-bios/s390-ccw/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/

[PATCH for-5.2 v2 7/9] pc-bios/s390-ccw: Allow booting in case the first virtio-blk disk is bad

2020-08-06 Thread Thomas Huth
If you try to boot with two virtio-blk disks (without bootindex), and only the second one is bootable, the s390-ccw bios currently stops at the first disk and does not continue booting from the second one. This is annoying - and all other major QEMU firmwares succeed to boot from the second disk in

[PATCH for-5.2 v2 4/9] pc-bios/s390-ccw: Move the inner logic of find_subch() to a separate function

2020-08-06 Thread Thomas Huth
Move the code to a separate function to be able to re-use it from a different spot later. Reviewed-by: Claudio Imbrenda Signed-off-by: Thomas Huth --- pc-bios/s390-ccw/main.c | 99 - 1 file changed, 57 insertions(+), 42 deletions(-) diff --git a/pc-bios/

[PATCH for-5.2 v2 1/9] pc-bios/s390-ccw/Makefile: Compile with -std=gnu99, -fwrapv and -fno-common

2020-08-06 Thread Thomas Huth
The main QEMU code is compiled with -std=gnu99, -fwrapv and -fno-common. We should use the same flags for the s390-ccw bios, too, to avoid that we get different behavior with different compiler versions that changed their default settings in the course of time (it happened at least with -std=... an

[PATCH for-5.2 v2 2/9] pc-bios/s390-ccw: Move ipl-related code from main() into a separate function

2020-08-06 Thread Thomas Huth
Let's move this part of the code into a separate function to be able to use it from multiple spots later. Reviewed-by: Claudio Imbrenda Reviewed-by: Cornelia Huck Reviewed-by: Janosch Frank Signed-off-by: Thomas Huth --- pc-bios/s390-ccw/main.c | 20 1 file changed, 12 in

[PATCH for-5.2 v2 5/9] pc-bios/s390-ccw: Do not bail out early if not finding a SCSI disk

2020-08-06 Thread Thomas Huth
In case the user did not specify a boot device, we want to continue looking for other devices if there are no valid SCSI disks on a virtio- scsi controller. As a first step, do not panic in this case and let the control flow carry the error to the upper functions instead. Signed-off-by: Thomas Hut

[PATCH for-5.2 v2 3/9] pc-bios/s390-ccw: Introduce ENODEV define and remove guards of others

2020-08-06 Thread Thomas Huth
Remove the "#ifndef E..." guards from the defines here - the header guard S390_CCW_H at the top of the file should avoid double definition, and if the error code is defined in a different file already, we're in trouble anyway, then it's better to see the error at compile time instead of hunting wei

[PATCH for-5.2 v2 0/9] Continue booting in case the first device is not bootable

2020-08-06 Thread Thomas Huth
The traditional / architected way of booting on s390x is to always specify the device where the guest should be booted from - that means s390x guests should be always started with a device that has the "bootindex" property set. For the users that are used to a firmware from a different CPU archi-

Re: [PATCH-for-5.2 7/7] hw/block/fdc: Add ASCII art schema of QOM relations

2020-08-06 Thread Philippe Mathieu-Daudé
On 8/6/20 10:57 AM, Kevin Wolf wrote: > Am 06.08.2020 um 10:08 hat Philippe Mathieu-Daudé geschrieben: >> Without knowing the QEMU history, it is hard to relate QEMU objects >> with the hardware datasheet. >> >> For example, one naively expects: >> >> * a floppy disk is plugged / unplugged o

Re: [PATCH 1/3] qemu: implementation of transient option for qcow2 file

2020-08-06 Thread Peter Krempa
On Sun, Jul 19, 2020 at 22:56:50 -0400, Masayoshi Mizuma wrote: > On Sat, Jul 18, 2020 at 08:06:00AM +0200, Peter Krempa wrote: > > On Thu, Jul 16, 2020 at 20:55:29 -0400, Masayoshi Mizuma wrote: > > > Thank you for your review. > > > > > > On Tue, Jul 07, 2020 at 06:36:23AM -0500, Eric Blake wrot

Re: [PATCH v12 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-08-06 Thread Vladimir Sementsov-Ogievskiy
06.08.2020 12:08, Andrey Shinkevich wrote: On 05.08.2020 19:58, Vladimir Sementsov-Ogievskiy wrote: 30.07.2020 17:15, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, add the to_dict() method to classes that returns a dictionary with desired fie

Re: [PATCH] qcow2: flush qcow2 l2 meta for new allocated clusters

2020-08-06 Thread Kevin Wolf
Am 05.08.2020 um 04:38 hat Ying Fang geschrieben: > From: fangying > > When qemu or qemu-nbd process uses a qcow2 image and configured with > 'cache = none', it will write to the qcow2 image with a cache to cache > L2 tables, however the process will not use L2 tables without explicitly > calling

Re: [PATCH v12 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-08-06 Thread Andrey Shinkevich
On 05.08.2020 19:58, Vladimir Sementsov-Ogievskiy wrote: 30.07.2020 17:15, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, add the to_dict() method to classes that returns a dictionary with desired fields and their values. Extend it in subclass

Re: [PATCH] qcow2: flush qcow2 l2 meta for new allocated clusters

2020-08-06 Thread Daniel P . Berrangé
On Thu, Aug 06, 2020 at 05:01:51PM +0800, Ying Fang wrote: > > > On 8/5/2020 10:43 AM, no-re...@patchew.org wrote: > > Patchew URL: > > https://patchew.org/QEMU/20200805023826.184-1-fangyi...@huawei.com/ > > > > > > > > Hi, > > > > This series failed the docker-quick@centos7 build test. Plea

Re: [PATCH] qcow2: flush qcow2 l2 meta for new allocated clusters

2020-08-06 Thread Ying Fang
On 8/5/2020 10:43 AM, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200805023826.184-1-fangyi...@huawei.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can pro

Re: [PATCH] ide: Get rid of IDEDrive struct

2020-08-06 Thread Peter Maydell
On Wed, 5 Aug 2020 at 23:14, Eduardo Habkost wrote: > On Wed, Aug 05, 2020 at 09:41:25PM +0100, Peter Maydell wrote: > > This is one of those areas where this change works and reduces > > amount of code, but on the other hand it means the QOM type > > doesn't follow the common pattern for a leaf t

Re: [PATCH-for-5.2 7/7] hw/block/fdc: Add ASCII art schema of QOM relations

2020-08-06 Thread Kevin Wolf
Am 06.08.2020 um 10:08 hat Philippe Mathieu-Daudé geschrieben: > Without knowing the QEMU history, it is hard to relate QEMU objects > with the hardware datasheet. > > For example, one naively expects: > > * a floppy disk is plugged / unplugged on the bus > > Wrong! QEMU floppy disks always s

Re: [PATCH] ide: Get rid of IDEDrive struct

2020-08-06 Thread Daniel P . Berrangé
On Thu, Aug 06, 2020 at 07:58:06AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Wed, Aug 05, 2020 at 09:41:25PM +0100, Peter Maydell wrote: > >> On Wed, 5 Aug 2020 at 20:49, Eduardo Habkost wrote: > >> > > >> > The struct had a single field (IDEDevice dev), and is only used

[PATCH-for-5.2 3/7] hw/block/fdc: Use warn_report() instead of debug FLOPPY_DPRINTF() calls

2020-08-06 Thread Philippe Mathieu-Daudé
Use warn_report() instead of debug FLOPPY_DPRINTF() calls. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index c91ed7ee2d..ee45ec0b27 100644 --- a/hw/

[PATCH-for-5.2 6/7] hw/block/fdc: Use more descriptive TypeInfo names

2020-08-06 Thread Philippe Mathieu-Daudé
Better name TypeInfo structures: - ISA bus - Common floppy controller - Intel 82078 floppy controller - SUN floppy controller Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/block/fdc.c b/hw/bloc

[PATCH-for-5.2 5/7] hw/block/fdc: Drop pointless FLOPPY_DPRINTF() call

2020-08-06 Thread Philippe Mathieu-Daudé
Remove not very helpful debug call. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index f9f3f3c079..278220ed29 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -2636,7 +2636,6 @@ static void fdctrl_r

[PATCH-for-5.2 1/7] hw/block/fdc: Let sector count be unsigned

2020-08-06 Thread Philippe Mathieu-Daudé
Sectors count can not be negative, make it unsigned. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index e9ed3eef45..2cec7568c1 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@

[PATCH-for-5.2 7/7] hw/block/fdc: Add ASCII art schema of QOM relations

2020-08-06 Thread Philippe Mathieu-Daudé
Without knowing the QEMU history, it is hard to relate QEMU objects with the hardware datasheet. For example, one naively expects: * a floppy disk is plugged / unplugged on the bus Wrong! QEMU floppy disks always sit on the bus. The block drives are plugged / unplugged on the disks, and the

[PATCH-for-5.2 4/7] hw/block/fdc: Convert debug FLOPPY_DPRINTF() to trace events

2020-08-06 Thread Philippe Mathieu-Daudé
Convert debug FLOPPY_DPRINTF() to trace events. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc.c| 6 +++--- hw/block/trace-events | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index ee45ec0b27..f9f3f3c079 100644 --- a/hw/b

[PATCH-for-5.2 2/7] hw/block/fdc: Let sector offset be unsigned

2020-08-06 Thread Philippe Mathieu-Daudé
Sector offset can not be negative, make it unsigned. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 2cec7568c1..c91ed7ee2d 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -259,

[PATCH-for-5.2 0/7] hw/block/fdc: Cleanups trying to make sense of the floppy controllers

2020-08-06 Thread Philippe Mathieu-Daudé
Trivial patches while trying to make sense of the floppy controllers code. Philippe Mathieu-Daudé (7): hw/block/fdc: Let sector count be unsigned hw/block/fdc: Let sector offset be unsigned hw/block/fdc: Use warn_report() instead of debug FLOPPY_DPRINTF() calls hw/block/fdc: Convert de

Re: [PATCH v2 1/3] async: rename event_notifier_dummy_cb/poll()

2020-08-06 Thread Philippe Mathieu-Daudé
On 8/5/20 12:00 PM, Stefan Hajnoczi wrote: > The event_notifier_*() prefix can be confused with the EventNotifier > APIs that are also called event_notifier_*(). > > Rename the functions to aio_context_notifier_*() to make it clear that > they relate to the AioContext::notifier field. > > Signed-

Re: [PATCH] block/vhdx: Support vhdx image only with 512 bytes logical sector size

2020-08-06 Thread Philippe Mathieu-Daudé
On 8/5/20 11:30 PM, Swapnil Ingle wrote: > block/vhdx uses qemu block layer where sector size is always 512 byte. "bytes". > This may have issues with 4K logical sector sized vhdx image. > > For e.g qemu-img convert on such images fails with following assert: > > $qemu-img convert -f vhdx -O r