Re: [Qemu-block] [Qemu-devel] [PATCH-for-4.1 v6 3/5] hw/block/pflash_cfi01: Extract pflash_mode_read_array()

2019-07-16 Thread Alistair Francis
On Tue, Jul 16, 2019 at 3:16 PM Philippe Mathieu-Daudé wrote: > > The same pattern is used when setting the flash in READ_ARRAY mode: > - Set the state machine command to READ_ARRAY > - Reset the write_cycle counter > - Reset the memory region in ROMD > > Refactor the current code by extracting

Re: [Qemu-block] [Qemu-devel] [PATCH-for-4.1 v6 2/5] hw/block/pflash_cfi01: Document use of non-CFI compliant command '0x00'

2019-07-16 Thread Alistair Francis
On Tue, Jul 16, 2019 at 3:16 PM Philippe Mathieu-Daudé wrote: > > The command 0x00 is used by this model since its origin (commit > 05ee37ebf630). In this commit the command is described with a > amusing '/* ??? */' comment, probably meaning 'FIXME'. > > switch (cmd) { > case

[Qemu-block] [PATCH-for-4.1 v6 5/5] hw/block/pflash_cfi01: Add the DeviceReset() handler

2019-07-16 Thread Philippe Mathieu-Daudé
A "system reset" sets the device state machine in READ_ARRAY mode and, after some delay, set the SR.7 READY bit. We do not model timings, so we set the SR.7 bit directly. The TYPE_DEVICE interface provides a DeviceReset handler. This pflash device is a subclass of TYPE_SYS_BUS_DEVICE (which is a

[Qemu-block] [PATCH-for-4.1 v6 4/5] hw/block/pflash_cfi01: Rename 'reset_flash' label as 'mode_read_array'

2019-07-16 Thread Philippe Mathieu-Daudé
Rename the 'reset_flash' as 'mode_read_array' to make explicit we do not reset the device, we simply set its internal state machine in the READ_ARRAY mode. We do not reset the status register error bits, as a device reset would do. Reviewed-by: John Snow Reviewed-by: Alistair Francis

[Qemu-block] [PATCH-for-4.1 v6 3/5] hw/block/pflash_cfi01: Extract pflash_mode_read_array()

2019-07-16 Thread Philippe Mathieu-Daudé
The same pattern is used when setting the flash in READ_ARRAY mode: - Set the state machine command to READ_ARRAY - Reset the write_cycle counter - Reset the memory region in ROMD Refactor the current code by extracting this pattern. It is used three times: - On a read access (on invalid

[Qemu-block] [PATCH-for-4.1 v6 2/5] hw/block/pflash_cfi01: Document use of non-CFI compliant command '0x00'

2019-07-16 Thread Philippe Mathieu-Daudé
The command 0x00 is used by this model since its origin (commit 05ee37ebf630). In this commit the command is described with a amusing '/* ??? */' comment, probably meaning 'FIXME'. switch (cmd) { case 0x00: /* ??? */ ... This comment survived 12 years because the 0x00

[Qemu-block] [PATCH-for-4.1 v6 1/5] hw/block/pflash_cfi01: Removed an unused timer

2019-07-16 Thread Philippe Mathieu-Daudé
The 'CFI02' NOR flash was introduced in commit 29133e9a0fff, with timing modelled. One year later, the CFI01 model was introduced (commit 05ee37ebf630) based on the CFI02 model. As noted in the header, "It does not support timings". 12 years later, we never had to model the device timings. Time to

[Qemu-block] [PATCH-for-4.1 v6 0/5] hw/block/pflash_cfi01: Add DeviceReset() handler

2019-07-16 Thread Philippe Mathieu-Daudé
Hello it's me again, insisting with this series because there are at least 2 different report of guests bricked on reset due to the bug fixed by patch #5: https://bugzilla.redhat.com/show_bug.cgi?id=1678713 https://bugzilla.redhat.com/show_bug.cgi?id=1704584 Patches missing review: 2 and 3 The

Re: [Qemu-block] [Qemu-devel] [PULL 0/2] pflash-next patches for v4.1.0-rc1

2019-07-16 Thread Philippe Mathieu-Daudé
On 7/16/19 11:32 PM, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20190716160143.394-1-phi...@redhat.com/ > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Type: series > Subject: [Qemu-devel] [PULL 0/2]

Re: [Qemu-block] [Qemu-devel] [PULL 0/2] pflash-next patches for v4.1.0-rc1

2019-07-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190716160143.394-1-phi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PULL 0/2] pflash-next patches for v4.1.0-rc1 Message-id:

Re: [Qemu-block] [PATCH v2 05/12] block: Reduce (un)drains when replacing a child

2019-07-16 Thread Kevin Wolf
Am 03.07.2019 um 19:28 hat Max Reitz geschrieben: > Currently, bdrv_replace_child_noperm() undrains the parent until it is > completely undrained, then re-drains it after attaching the new child > node. > > This is a problem with bdrv_drop_intermediate(): We want to keep the > whole subtree

Re: [Qemu-block] [PATCH v2 04/12] block: Keep subtree drained in drop_intermediate

2019-07-16 Thread Kevin Wolf
Am 03.07.2019 um 19:28 hat Max Reitz geschrieben: > bdrv_drop_intermediate() calls BdrvChildRole.update_filename(). That > may poll, thus changing the graph, which potentially breaks the > QLIST_FOREACH_SAFE() loop. > > Just keep the whole subtree drained. This is probably the right thing > to

Re: [Qemu-block] [PATCH v2 06/12] block: Deep-clear inherits_from

2019-07-16 Thread Kevin Wolf
Am 03.07.2019 um 19:28 hat Max Reitz geschrieben: > BDS.inherits_from does not always point to an immediate parent node. > When launching a block job with a filter node, for example, the node > directly below the filter will not point to the filter, but keep its old > pointee (above the filter). >

Re: [Qemu-block] [PATCH v2 11/11] iotests/257: test traditional sync modes

2019-07-16 Thread John Snow
On 7/16/19 8:04 AM, Max Reitz wrote: > On 16.07.19 02:01, John Snow wrote: >> Signed-off-by: John Snow >> --- >> tests/qemu-iotests/257 | 41 +- >> tests/qemu-iotests/257.out | 3089 >> 2 files changed, 3128 insertions(+), 2 deletions(-) > > This

Re: [Qemu-block] [PATCH for-4.1? 1/4] qcow2: Fix .bdrv_has_zero_init()

2019-07-16 Thread Kevin Wolf
Am 15.07.2019 um 12:45 hat Max Reitz geschrieben: > If a qcow2 file is preallocated, it can no longer guarantee that it > initially appears as filled with zeroes. > > So implement .bdrv_has_zero_init() by checking whether the file is > preallocated; if so, forward the call to the underlying

Re: [Qemu-block] [PATCH v2 0/9] block: Delay poll when ending drained sections

2019-07-16 Thread Kevin Wolf
Am 16.07.2019 um 18:24 hat Max Reitz geschrieben: > On 16.07.19 16:40, Kevin Wolf wrote: > > Am 19.06.2019 um 17:25 hat Max Reitz geschrieben: > >> Hi, > >> > >> This is v2 to “block: Keep track of parent quiescing”. > >> > >> Please read this cover letter, because I’m very unsure about the design

Re: [Qemu-block] [H v5 0/3] Few bugfixes for userspace nvme driver

2019-07-16 Thread Maxim Levitsky
On Tue, 2019-07-16 at 19:29 +0300, Maxim Levitsky wrote: > This is reduced version of patch series for userspace nvme driver, > that only includes the bugfixes I made. > > Best regards, > Maxim Levitsky > > Maxim Levitsky (3): > block/nvme: fix doorbell stride > block/nvme: support

[Qemu-block] [PATCH v4 3/3] block/nvme: don't touch the completion entries

2019-07-16 Thread Maxim Levitsky
Completion entries are meant to be only read by the host and written by the device. The driver is supposed to scan the completions from the last point where it left, and until it sees a completion with non flipped phase bit. Signed-off-by: Maxim Levitsky Reviewed-by: Max Reitz ---

Re: [Qemu-block] [Qemu-devel] [PULL 0/2] pflash-next patches for v4.1.0-rc1

2019-07-16 Thread Peter Maydell
in the Git repository at: > > https://gitlab.com/philmd/qemu.git tags/pflash-next-20190716 > > for you to fetch changes up to 611c749c3b86fe377c94ea301feab3d9ce3bf617: > > hw/block/pflash_cfi01: Start state machine as READY to accept

[Qemu-block] [PATCH v4 1/3] block/nvme: fix doorbell stride

2019-07-16 Thread Maxim Levitsky
Fix the math involving non standard doorbell stride Signed-off-by: Maxim Levitsky Reviewed-by: Max Reitz --- block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nvme.c b/block/nvme.c index 9896b7f7c6..82fdefccd6 100644 --- a/block/nvme.c +++ b/block/nvme.c @@

[Qemu-block] [PATCH v4 2/3] block/nvme: support larger that 512 bytes sector devices

2019-07-16 Thread Maxim Levitsky
Currently the driver hardcodes the sector size to 512, and doesn't check the underlying device. Fix that. Also fail if underlying nvme device is formatted with metadata as this needs special support. Signed-off-by: Maxim Levitsky --- block/nvme.c | 45

[Qemu-block] [PATCH v4 0/3] Few bugfixes for userspace nvme driver

2019-07-16 Thread Maxim Levitsky
This is reduced version of patch series for userspace nvme driver, that only includes the bugfixes I made. Best regards, Maxim Levitsky Maxim Levitsky (3): block/nvme: fix doorbell stride block/nvme: support larger that 512 bytes sector devices block/nvme: don't touch the

[Qemu-block] [H v5 0/3] Few bugfixes for userspace nvme driver

2019-07-16 Thread Maxim Levitsky
This is reduced version of patch series for userspace nvme driver, that only includes the bugfixes I made. Best regards, Maxim Levitsky Maxim Levitsky (3): block/nvme: fix doorbell stride block/nvme: support larger that 512 bytes sector devices block/nvme: don't touch the

Re: [Qemu-block] [PATCH v2 0/9] block: Delay poll when ending drained sections

2019-07-16 Thread Max Reitz
On 16.07.19 16:40, Kevin Wolf wrote: > Am 19.06.2019 um 17:25 hat Max Reitz geschrieben: >> Hi, >> >> This is v2 to “block: Keep track of parent quiescing”. >> >> Please read this cover letter, because I’m very unsure about the design >> in this series and I’d appreciate some comments. >> >> As

[Qemu-block] [PATCH v5] LUKS: support preallocation

2019-07-16 Thread Maxim Levitsky
preallocation=off and preallocation=metadata both allocate luks header only, and preallocation=falloc/full is passed to underlying file. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534951 Signed-off-by: Maxim Levitsky --- This is hopefully a revision without coding style violations.

Re: [Qemu-block] [QEMU-SECURITY] ide: fix assertion in ide_dma_cb() to prevent qemu DoS from quest

2019-07-16 Thread P J P
+-- On Tue, 16 Jul 2019, John Snow wrote --+ | I also feel that a privileged DOS by a guest of a legacy device is actually | low priority security-wise, unless we can demonstrate that there are side | effects that can be exploited. Right, we are not treating this as a CVE issue as is.

Re: [Qemu-block] [PATCH v2 2/4] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Max Reitz
On 16.07.19 18:09, Eric Blake wrote: > On 7/16/19 10:58 AM, Max Reitz wrote: > Ah, OK. So, uh, we effectively can’t run any Python tests on macOS? >>> >>> Not when our CI is set up to use super-long file names: >>> >>> + File >>>

Re: [Qemu-block] [PATCH v2 09/11] block/backup: teach TOP to never copy unallocated regions

2019-07-16 Thread Max Reitz
On 16.07.19 18:02, John Snow wrote: > > > On 7/16/19 7:43 AM, Max Reitz wrote: >> On 16.07.19 02:01, John Snow wrote: >>> Presently, If sync=TOP is selected, we mark the entire bitmap as dirty. >>> In the write notifier handler, we dutifully copy out such regions. >>> >>> Fix this in three

Re: [Qemu-block] [PATCH v2 2/4] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Eric Blake
On 7/16/19 10:58 AM, Max Reitz wrote: >>> Ah, OK. So, uh, we effectively can’t run any Python tests on macOS? >> >> Not when our CI is set up to use super-long file names: >> >> + File >>

Re: [Qemu-block] [PATCH 2/7] block: Add blk_truncate_for_formatting()

2019-07-16 Thread Max Reitz
On 16.07.19 17:45, Maxim Levitsky wrote: > On Tue, 2019-07-16 at 16:08 +0300, Maxim Levitsky wrote: >> On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote: >>> Signed-off-by: Max Reitz >>> --- >>> include/sysemu/block-backend.h | 12 >>> block/block-backend.c | 54

Re: [Qemu-block] [PATCH v2 09/11] block/backup: teach TOP to never copy unallocated regions

2019-07-16 Thread John Snow
On 7/16/19 7:43 AM, Max Reitz wrote: > On 16.07.19 02:01, John Snow wrote: >> Presently, If sync=TOP is selected, we mark the entire bitmap as dirty. >> In the write notifier handler, we dutifully copy out such regions. >> >> Fix this in three parts: >> >> 1. Mark the bitmap as being

[Qemu-block] [PULL 1/2] hw/block/pflash_cfi02: Explicit switch fallthrough for ERASE commands

2019-07-16 Thread Philippe Mathieu-Daudé
Previous to commit ddb6f2254, the DQ2 bit was incorrectly set during PROGRAM command (0xA0). The commit reordered the switch cases to only set the DQ2 bit for the ERASE commands using a fallthrough, but did not explicit the fallthrough is intentional. Mark the switch fallthrough with a comment

[Qemu-block] [PULL 2/2] hw/block/pflash_cfi01: Start state machine as READY to accept commands

2019-07-16 Thread Philippe Mathieu-Daudé
When the state machine is ready to accept command, the bit 7 of the status register (SR) is set to 1. The guest polls the status register and check this bit before writting command to the internal 'Write State Machine' (WSM). Set SR.7 bit to 1 when the device is created. There is no migration

[Qemu-block] [PULL 0/2] pflash-next patches for v4.1.0-rc1

2019-07-16 Thread Philippe Mathieu-Daudé
The following changes since commit 697f59243f5a28b8a243ff5ad59e34bbecffcae1: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2019-07-16 15:08:29 +0100) are available in the Git repository at: https://gitlab.com/philmd/qemu.git tags/pflash-next-20190716

Re: [Qemu-block] [PATCH v2 2/4] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Max Reitz
On 16.07.19 17:56, Eric Blake wrote: > On 7/16/19 10:44 AM, Max Reitz wrote: >> On 16.07.19 17:31, Thomas Huth wrote: >>> On 16/07/2019 17.26, Max Reitz wrote: On 16.07.19 14:28, Thomas Huth wrote: > Remove some more tests from the "auto" group that either have issues > in certain

Re: [Qemu-block] [PATCH v2 4/4] gitlab-ci: Remove qcow2 tests that are handled by "make check" already

2019-07-16 Thread Max Reitz
On 16.07.19 17:51, Thomas Huth wrote: > On 16/07/2019 17.41, Max Reitz wrote: >> On 16.07.19 14:28, Thomas Huth wrote: >>> Since most iotests are now run during "make check" already, we do not >>> need to test them explicitly from the gitlab-ci.yml script anymore. >>> And while we're at it, add

Re: [Qemu-block] [PATCH v2 2/4] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Eric Blake
On 7/16/19 10:44 AM, Max Reitz wrote: > On 16.07.19 17:31, Thomas Huth wrote: >> On 16/07/2019 17.26, Max Reitz wrote: >>> On 16.07.19 14:28, Thomas Huth wrote: Remove some more tests from the "auto" group that either have issues in certain environments (like macOS or FreeBSD, or on

Re: [Qemu-block] [PATCH v2 1/4] tests/qemu-iotests/check: Allow tests without groups

2019-07-16 Thread Alex Bennée
Thomas Huth writes: > The regular expressions in the "check" script currently expect that there > is always a space after the test number in the group file, so you can't > have a test in there without a group unless the line still ends with a > space - which is quite error prone since some

Re: [Qemu-block] [PATCH v2 4/4] gitlab-ci: Remove qcow2 tests that are handled by "make check" already

2019-07-16 Thread Thomas Huth
On 16/07/2019 17.41, Max Reitz wrote: > On 16.07.19 14:28, Thomas Huth wrote: >> Since most iotests are now run during "make check" already, we do not >> need to test them explicitly from the gitlab-ci.yml script anymore. >> And while we're at it, add some of the new non-auto tests >= 248 instead.

Re: [Qemu-block] [PATCH v2 2/4] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Max Reitz
On 16.07.19 17:44, Max Reitz wrote: > On 16.07.19 17:31, Thomas Huth wrote: >> On 16/07/2019 17.26, Max Reitz wrote: >>> On 16.07.19 14:28, Thomas Huth wrote: Remove some more tests from the "auto" group that either have issues in certain environments (like macOS or FreeBSD, or on

Re: [Qemu-block] [PATCH 2/7] block: Add blk_truncate_for_formatting()

2019-07-16 Thread Maxim Levitsky
On Tue, 2019-07-16 at 16:08 +0300, Maxim Levitsky wrote: > On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote: > > Signed-off-by: Max Reitz > > --- > > include/sysemu/block-backend.h | 12 > > block/block-backend.c | 54 ++ > > 2 files changed,

Re: [Qemu-block] [PATCH v2 2/4] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Max Reitz
On 16.07.19 17:31, Thomas Huth wrote: > On 16/07/2019 17.26, Max Reitz wrote: >> On 16.07.19 14:28, Thomas Huth wrote: >>> Remove some more tests from the "auto" group that either have issues >>> in certain environments (like macOS or FreeBSD, or on certain file systems >>> like ZFS or tmpfs), do

Re: [Qemu-block] [PATCH v2 4/4] gitlab-ci: Remove qcow2 tests that are handled by "make check" already

2019-07-16 Thread Max Reitz
On 16.07.19 14:28, Thomas Huth wrote: > Since most iotests are now run during "make check" already, we do not > need to test them explicitly from the gitlab-ci.yml script anymore. > And while we're at it, add some of the new non-auto tests >= 248 instead. > > Signed-off-by: Thomas Huth > --- >

Re: [Qemu-block] [PATCH v2 3/4] tests: Run the iotests during "make check" again

2019-07-16 Thread Max Reitz
On 16.07.19 14:28, Thomas Huth wrote: > People often forget to run the iotests before submitting patches or pull > requests - this is likely due to the fact that we do not run the tests > during our mandatory "make check" tests yet. Now that we've got a proper > "auto" group of iotests that should

Re: [Qemu-block] [PATCH v2 2/4] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Thomas Huth
On 16/07/2019 17.26, Max Reitz wrote: > On 16.07.19 14:28, Thomas Huth wrote: >> Remove some more tests from the "auto" group that either have issues >> in certain environments (like macOS or FreeBSD, or on certain file systems >> like ZFS or tmpfs), do not work with the qcow2 format, or that are

Re: [Qemu-block] [PATCH v2 1/4] tests/qemu-iotests/check: Allow tests without groups

2019-07-16 Thread Max Reitz
On 16.07.19 14:28, Thomas Huth wrote: > The regular expressions in the "check" script currently expect that there > is always a space after the test number in the group file, so you can't > have a test in there without a group unless the line still ends with a > space - which is quite error prone

Re: [Qemu-block] [Qemu-devel] [PATCH] qapi: add dirty-bitmaps to query-named-block-nodes result

2019-07-16 Thread John Snow
On 7/16/19 2:32 AM, Markus Armbruster wrote: > John Snow writes: > >> On 6/5/19 8:46 AM, Markus Armbruster wrote: >>> John Snow writes: >>> On 5/31/19 10:55 AM, Eric Blake wrote: > On 5/30/19 11:26 AM, John Snow wrote: >> >> >> On 5/30/19 10:39 AM, Vladimir

Re: [Qemu-block] [PATCH v2 2/4] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Max Reitz
On 16.07.19 14:28, Thomas Huth wrote: > Remove some more tests from the "auto" group that either have issues > in certain environments (like macOS or FreeBSD, or on certain file systems > like ZFS or tmpfs), do not work with the qcow2 format, or that are simply > taking too much time. > >

Re: [Qemu-block] [Qemu-devel] [PATCH v5 2/5] hw/block/pflash_cfi01: Use the correct READ_ARRAY value

2019-07-16 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> Philippe asked me to have a look at this one, so here goes. >> >> Philippe Mathieu-Daudé writes: >> >> > In the document [*] the "Read Array Flowchart", the READ_ARRAY >> > command has a value of 0xff. >> >

Re: [Qemu-block] [QEMU-SECURITY] ide: fix assertion in ide_dma_cb() to prevent qemu DoS from quest

2019-07-16 Thread John Snow
On 7/16/19 7:25 AM, Kevin Wolf wrote: > Am 15.07.2019 um 13:24 hat Alexander Popov geschrieben: >> On 05.07.2019 17:07, Alexander Popov wrote: >>> This assertion was introduced in the commit a718978ed58a in July 2015. >>> It implies that the size of successful DMA transfers handled in >>>

Re: [Qemu-block] [PATCH v4] LUKS: support preallocation

2019-07-16 Thread Kevin Wolf
Am 16.07.2019 um 14:41 hat Max Reitz geschrieben: > On 16.07.19 10:15, Maxim Levitsky wrote: > > preallocation=off and preallocation=metadata > > both allocate luks header only, and preallocation=falloc/full > > is passed to underlying file. > > > > Fixes:

Re: [Qemu-block] [Qemu-devel] [PATCH v2 10/11] block/backup: support bitmap sync modes for non-bitmap backups

2019-07-16 Thread John Snow
On 7/16/19 1:18 AM, Markus Armbruster wrote: > John Snow writes: > >> Accept bitmaps and sync policies for the other backup modes. >> This allows us to do things like create a bitmap synced to a full backup >> without a transaction, or start a resumable backup process. >> >> Some combinations

Re: [Qemu-block] [PATCH v2 0/9] block: Delay poll when ending drained sections

2019-07-16 Thread Kevin Wolf
Am 19.06.2019 um 17:25 hat Max Reitz geschrieben: > Hi, > > This is v2 to “block: Keep track of parent quiescing”. > > Please read this cover letter, because I’m very unsure about the design > in this series and I’d appreciate some comments. > > As Kevin wrote in his reply to that series, the

Re: [Qemu-block] [Qemu-devel] [PATCH v2] nbd: fix uninitialized variable warning

2019-07-16 Thread Eric Blake
On 7/16/19 5:21 AM, Philippe Mathieu-Daudé wrote: > I was writing on your v1 "it might be worth commenting this is when > building with -O3" > > This might be as easy as having the subject modified (by maintainer > taking this patch?) as: > > "fix uninitialized variable warning [when building

Re: [Qemu-block] [Qemu-devel] [PATCH 7/7] iotests: Add test for image creation fallback

2019-07-16 Thread Eric Blake
On 7/15/19 4:48 AM, Max Reitz wrote: >>> + >>> +_supported_fmt raw >> >> Why is this stating "raw" here... >> >>> +_supported_proto nbd > > Because it’s an NBD test. > >>> +_supported_os Linux >>> + >>> + >>> +_make_test_img 64M > > Also, because I don‘t want this to create a qcow2 image.

Re: [Qemu-block] [Qemu-devel] [PATCH v5 2/5] hw/block/pflash_cfi01: Use the correct READ_ARRAY value

2019-07-16 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Philippe asked me to have a look at this one, so here goes. > > Philippe Mathieu-Daudé writes: > > > In the document [*] the "Read Array Flowchart", the READ_ARRAY > > command has a value of 0xff. > > > > Use the correct value in the pflash

Re: [Qemu-block] [PATCH 1/7] block/nbd: Fix hang in .bdrv_close()

2019-07-16 Thread Maxim Levitsky
On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote: > When nbd_close() is called from a coroutine, the connection_co never > gets to run, and thus nbd_teardown_connection() hangs. > > This is because aio_co_enter() only puts the connection_co into the main > coroutine's wake-up queue, so this

Re: [Qemu-block] [PATCH 4/7] block: Generic file creation fallback

2019-07-16 Thread Maxim Levitsky
On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote: > If a protocol driver does not support image creation, we can see whether > maybe the file exists already. If so, just truncating it will be > sufficient. > > Signed-off-by: Max Reitz > --- > block.c | 83

Re: [Qemu-block] [PATCH 3/7] block: Use blk_truncate_for_formatting()

2019-07-16 Thread Maxim Levitsky
On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > block/parallels.c | 2 +- > block/qcow.c | 2 +- > block/qcow2.c | 2 +- > block/qed.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/block/parallels.c

Re: [Qemu-block] [PATCH 5/7] file-posix: Drop hdev_co_create_opts()

2019-07-16 Thread Maxim Levitsky
On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote: > The generic fallback implementation effectively does the same. > > Signed-off-by: Max Reitz > --- > block/file-posix.c | 67 -- > 1 file changed, 67 deletions(-) > > diff --git

Re: [Qemu-block] [PATCH 2/7] block: Add blk_truncate_for_formatting()

2019-07-16 Thread Maxim Levitsky
On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > include/sysemu/block-backend.h | 12 > block/block-backend.c | 54 ++ > 2 files changed, 66 insertions(+) > > diff --git a/include/sysemu/block-backend.h

Re: [Qemu-block] [PATCH 6/7] iscsi: Drop iscsi_co_create_opts()

2019-07-16 Thread Maxim Levitsky
On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote: > The generic fallback implementation effectively does the same. > > Signed-off-by: Max Reitz > --- > block/iscsi.c | 56 --- > 1 file changed, 56 deletions(-) > > diff --git a/block/iscsi.c

Re: [Qemu-block] [PATCH v4] LUKS: support preallocation

2019-07-16 Thread Maxim Levitsky
On Tue, 2019-07-16 at 14:41 +0200, Max Reitz wrote: > On 16.07.19 10:15, Maxim Levitsky wrote: > > preallocation=off and preallocation=metadata > > both allocate luks header only, and preallocation=falloc/full > > is passed to underlying file. > > > > Fixes:

Re: [Qemu-block] [PATCH v4] LUKS: support preallocation

2019-07-16 Thread Max Reitz
On 16.07.19 10:15, Maxim Levitsky wrote: > preallocation=off and preallocation=metadata > both allocate luks header only, and preallocation=falloc/full > is passed to underlying file. > > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534951 > > Signed-off-by: Maxim Levitsky > --- >

[Qemu-block] [PATCH v2 2/4] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Thomas Huth
Remove some more tests from the "auto" group that either have issues in certain environments (like macOS or FreeBSD, or on certain file systems like ZFS or tmpfs), do not work with the qcow2 format, or that are simply taking too much time. Signed-off-by: Thomas Huth --- tests/qemu-iotests/group

[Qemu-block] [PATCH v2 4/4] gitlab-ci: Remove qcow2 tests that are handled by "make check" already

2019-07-16 Thread Thomas Huth
Since most iotests are now run during "make check" already, we do not need to test them explicitly from the gitlab-ci.yml script anymore. And while we're at it, add some of the new non-auto tests >= 248 instead. Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 12 +++- 1 file changed, 3

[Qemu-block] [PATCH v2 1/4] tests/qemu-iotests/check: Allow tests without groups

2019-07-16 Thread Thomas Huth
The regular expressions in the "check" script currently expect that there is always a space after the test number in the group file, so you can't have a test in there without a group unless the line still ends with a space - which is quite error prone since some editors might remove spaces at the

[Qemu-block] [PATCH v2 3/4] tests: Run the iotests during "make check" again

2019-07-16 Thread Thomas Huth
People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not run the tests during our mandatory "make check" tests yet. Now that we've got a proper "auto" group of iotests that should be fine to run in every environment, we can

[Qemu-block] [PATCH v2 0/4] Enable iotests during "make check"

2019-07-16 Thread Thomas Huth
Let's enable the block iotests during "make check" again, to avoid that they get broken so easily by accident (like we've seen many times in the past). v2: - Added new patch to allow tests without groups, removed the "o_direct" group again. - Removed some more tests from the "auto" group,

Re: [Qemu-block] [Qemu-devel] [PATCH v5 2/5] hw/block/pflash_cfi01: Use the correct READ_ARRAY value

2019-07-16 Thread Markus Armbruster
Philippe asked me to have a look at this one, so here goes. Philippe Mathieu-Daudé writes: > In the document [*] the "Read Array Flowchart", the READ_ARRAY > command has a value of 0xff. > > Use the correct value in the pflash model. > > There is no change of behavior in the guest, because: > -

Re: [Qemu-block] [PATCH v2 11/11] iotests/257: test traditional sync modes

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > Signed-off-by: John Snow > --- > tests/qemu-iotests/257 | 41 +- > tests/qemu-iotests/257.out | 3089 > 2 files changed, 3128 insertions(+), 2 deletions(-) This needs a %s/specify Bitmap sync mode/specify bitmap

Re: [Qemu-block] [PATCH v2 10/11] block/backup: support bitmap sync modes for non-bitmap backups

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > Accept bitmaps and sync policies for the other backup modes. > This allows us to do things like create a bitmap synced to a full backup > without a transaction, or start a resumable backup process. > > Some combinations don't make sense, though: > > - NEVER

Re: [Qemu-block] [PATCH v2 09/11] block/backup: teach TOP to never copy unallocated regions

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > Presently, If sync=TOP is selected, we mark the entire bitmap as dirty. > In the write notifier handler, we dutifully copy out such regions. > > Fix this in three parts: > > 1. Mark the bitmap as being initialized before the first yield. > 2. After the first

Re: [Qemu-block] [QEMU-SECURITY] ide: fix assertion in ide_dma_cb() to prevent qemu DoS from quest

2019-07-16 Thread Kevin Wolf
Am 15.07.2019 um 13:24 hat Alexander Popov geschrieben: > On 05.07.2019 17:07, Alexander Popov wrote: > > This assertion was introduced in the commit a718978ed58a in July 2015. > > It implies that the size of successful DMA transfers handled in > > ide_dma_cb() should be multiple of 512 (the size

Re: [Qemu-block] [PATCH] iotests: Set read-zeroes on in null block driver for Valgrind

2019-07-16 Thread Kevin Wolf
Am 15.07.2019 um 18:07 hat Andrey Shinkevich geschrieben: > The Valgrind tool reports about the uninitialised buffer 'buf' > instantiated on the stack of the function guess_disk_lchs(). > Pass 'read-zeroes=on' to the null block driver to make it deterministic. > The output of the tests 051, 186

Re: [Qemu-block] [PATCH v2 08/11] block/backup: add backup_is_cluster_allocated

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > Modify the existing bdrv_is_unallocated_range to utilize the pnum return > from bdrv_is_allocated; optionally returning a full number of clusters > that share the same allocation status. > > This will be used to carefully toggle bits in the bitmap for

Re: [Qemu-block] [PATCH v2 07/11] block/backup: centralize copy_bitmap initialization

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > Just a few housekeeping changes that keeps the following commit easier > to read; perform the initial copy_bitmap initialization in one place. > > Signed-off-by: John Snow > --- > block/backup.c | 29 +++-- > 1 file changed, 15

Re: [Qemu-block] [PATCH v2 06/11] block/backup: improve sync=bitmap work estimates

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > When making backups based on bitmaps, the work estimate can be more > accurate. Update iotests to reflect the new strategy. > > TOP work estimates are broken, but do not get worse with this commit. > That issue is addressed in the following commits instead. >

Re: [Qemu-block] [PATCH v2 05/11] iotests/257: test API failures

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > Signed-off-by: John Snow > --- > tests/qemu-iotests/257 | 67 ++ > tests/qemu-iotests/257.out | 85 ++ > 2 files changed, 152 insertions(+) Reviewed-by: Max Reitz signature.asc

Re: [Qemu-block] [PATCH v2 03/11] iotests/257: Refactor backup helpers

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > This test needs support for non-bitmap backups and missing or > unspecified bitmap sync modes, so rewrite the helpers to be a little > more generic. > > Signed-off-by: John Snow > --- > tests/qemu-iotests/257 | 56 ++- >

Re: [Qemu-block] [Qemu-devel] [PATCH v2] nbd: fix uninitialized variable warning

2019-07-16 Thread Philippe Mathieu-Daudé
I was writing on your v1 "it might be worth commenting this is when building with -O3" This might be as easy as having the subject modified (by maintainer taking this patch?) as: "fix uninitialized variable warning [when building with -O3]" On 7/16/19 12:07 PM, Marc-André Lureau wrote: >

Re: [Qemu-block] [PATCH v2 02/11] iotests/257: add EmulatedBitmap class

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > Represent a bitmap with an object that we can mark and clear bits in. > This makes it easier to manage partial writes when we don't write a > full group's worth of patterns before an error. > > Signed-off-by: John Snow > --- > tests/qemu-iotests/257 | 124

Re: [Qemu-block] [PATCH v2 01/11] iotests/257: add Pattern class

2019-07-16 Thread Max Reitz
On 16.07.19 02:01, John Snow wrote: > Just kidding, this is easier to manage with a full class instead of a > namedtuple. > > Signed-off-by: John Snow > --- > tests/qemu-iotests/257 | 58 +++--- > 1 file changed, 32 insertions(+), 26 deletions(-)

[Qemu-block] [PATCH v2] nbd: fix uninitialized variable warning

2019-07-16 Thread Marc-André Lureau
../block/nbd.c: In function 'nbd_co_request': ../block/nbd.c:745:8: error: 'local_reply.type' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (chunk->type == NBD_REPLY_TYPE_NONE) { ^ ../block/nbd.c:710:14: note: 'local_reply.type' was declared here

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd: fix uninitialized variable warning

2019-07-16 Thread Marc-André Lureau
Hi On Tue, Jul 16, 2019 at 1:19 PM Philippe Mathieu-Daudé wrote: > > Hi Marc-André, > > On 7/16/19 10:42 AM, Marc-André Lureau wrote: > > ../block/nbd.c: In function 'nbd_co_request': > > ../block/nbd.c:745:8: error: 'local_reply.type' may be used uninitialized > > in this function

Re: [Qemu-block] [Qemu-devel] [PATCH] nbd: fix uninitialized variable warning

2019-07-16 Thread Philippe Mathieu-Daudé
Hi Marc-André, On 7/16/19 10:42 AM, Marc-André Lureau wrote: > ../block/nbd.c: In function 'nbd_co_request': > ../block/nbd.c:745:8: error: 'local_reply.type' may be used uninitialized in > this function [-Werror=maybe-uninitialized] > if (chunk->type == NBD_REPLY_TYPE_NONE) { > ^ >

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Max Reitz
On 16.07.19 11:03, Thomas Huth wrote: > On 15/07/2019 19.17, Max Reitz wrote: >> On 15.07.19 17:18, Thomas Huth wrote: >>> On 15/07/2019 17.12, Eric Blake wrote: On 7/15/19 9:54 AM, Thomas Huth wrote: > Remove some more tests from the "auto" group that either have issues > in certain

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] tests/qemu-iotests/group: Remove some more tests from the "auto" group

2019-07-16 Thread Thomas Huth
On 15/07/2019 19.17, Max Reitz wrote: > On 15.07.19 17:18, Thomas Huth wrote: >> On 15/07/2019 17.12, Eric Blake wrote: >>> On 7/15/19 9:54 AM, Thomas Huth wrote: Remove some more tests from the "auto" group that either have issues in certain environments (like macOS or FreeBSD, or on

[Qemu-block] [PATCH] nbd: fix uninitialized variable warning

2019-07-16 Thread Marc-André Lureau
../block/nbd.c: In function 'nbd_co_request': ../block/nbd.c:745:8: error: 'local_reply.type' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (chunk->type == NBD_REPLY_TYPE_NONE) { ^ ../block/nbd.c:710:14: note: 'local_reply.type' was declared here

[Qemu-block] [PATCH v4] LUKS: support preallocation

2019-07-16 Thread Maxim Levitsky
preallocation=off and preallocation=metadata both allocate luks header only, and preallocation=falloc/full is passed to underlying file. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534951 Signed-off-by: Maxim Levitsky --- block/crypto.c | 29 ++---

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] block/io_uring: resubmit short buffered reads

2019-07-16 Thread Philippe Mathieu-Daudé
On 7/15/19 10:19 PM, Stefan Hajnoczi wrote: > The io_uring API had unusual read behavior up until recently, where > short reads could occur when the start of the file range was in the page > cache and a later portion was not in the page cache. Normally read(2) > does not expose this detail to

Re: [Qemu-block] [Qemu-devel] [PATCH 1/3] block/io_uring: add submission and completion trace events

2019-07-16 Thread Philippe Mathieu-Daudé
On 7/15/19 10:19 PM, Stefan Hajnoczi wrote: > It is useful to follow individual requests as they are submitted. Add > trace events that show details of each request. > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé > --- > block/io_uring.c | 5 + >

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] vl: Drain before (block) job cancel when quitting

2019-07-16 Thread Philippe Mathieu-Daudé
On 6/19/19 9:40 PM, Max Reitz wrote: > On 14.06.19 11:22, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 19:03, Max Reitz wrote: >>> [re-adding the original CCs, why not] >>> >>> On 13.06.19 16:30, Vladimir Sementsov-Ogievskiy wrote: 13.06.2019 17:21, Max Reitz wrote: > On 13.06.19

Re: [Qemu-block] [Qemu-devel] [PATCH] qapi: add dirty-bitmaps to query-named-block-nodes result

2019-07-16 Thread Markus Armbruster
John Snow writes: > On 6/5/19 8:46 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 5/31/19 10:55 AM, Eric Blake wrote: On 5/30/19 11:26 AM, John Snow wrote: > > > On 5/30/19 10:39 AM, Vladimir Sementsov-Ogievskiy wrote: >> Let's add a possibility to query