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
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.
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 @@
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
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
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
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
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
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
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
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
Implementation of dumping QCOW2 image metadata.
The sample output:
{
"Header_extensions": [
{
"name": "Feature table",
"magic": 1745090647,
"length": 192,
"data_str": ""
},
{
"name": "Bitmaps",
"magi
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 ---
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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.
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
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'
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
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
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
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
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 -
>
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/
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
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/
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
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
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
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
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-
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
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
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
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
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
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
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
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
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
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
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/
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
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
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
@@
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
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
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,
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
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-
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
68 matches
Mail list logo