Re: [Qemu-block] [Qemu-devel] [PATCH v2 00/12] block: qiov_offset parameter for io

2019-06-28 Thread Stefan Hajnoczi
On Tue, Jun 04, 2019 at 07:15:02PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Here is new parameter qiov_offset for io path, to avoid > a lot of places with same pattern of creating local_qiov or hd_qiov > variables. > > These series also includes my > "[Qemu-devel] [PATCH 0/2] bloc

Re: [Qemu-block] [PATCH v2] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-06-28 Thread Stefano Garzarella
On Thu, Jun 27, 2019 at 03:43:04PM -0400, Jason Dillaman wrote: > On Thu, Jun 27, 2019 at 1:24 PM John Snow wrote: > > On 6/27/19 4:48 AM, Stefano Garzarella wrote: > > > On Wed, Jun 26, 2019 at 05:04:25PM -0400, John Snow wrote: > > >> It looks like this has hit a 30 day expiration without any re

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Kevin Wolf
Am 27.06.2019 um 17:42 hat Alberto Garcia geschrieben: > On Thu 27 Jun 2019 05:38:56 PM CEST, Alberto Garcia wrote: > >> I would consider 64k cluster/8k subcluster as too extreme for me. > > I forgot to add: this 64k/8k ratio is only with my current prototype. > > In practice if we go with the 12

Re: [Qemu-block] [Qemu-devel] [PATCH] block/qcow: Improve error when opening qcow2 files as qcow

2019-06-28 Thread Kevin Wolf
Am 27.06.2019 um 19:17 hat John Snow geschrieben: > > > On 6/27/19 4:34 AM, Kevin Wolf wrote: > > Am 26.06.2019 um 23:53 hat John Snow geschrieben: > >> Reported-by: radmehrsae...@gmail.com > >> Fixes: https://bugs.launchpad.net/bugs/1832914 > >> Signed-off-by: John Snow > >> --- > >> block/qco

Re: [Qemu-block] [PATCH v0 1/3] qcow2: introduce compression type feature

2019-06-28 Thread Kevin Wolf
Am 29.05.2019 um 13:40 hat Vladimir Sementsov-Ogievskiy geschrieben: > 28.05.2019 17:37, Denis Plotnikov wrote: > > The patch adds some preparation parts for incompatible compression type > > feature to QCOW2 header that indicates that *all* compressed clusters > > must be (de)compressed using a ce

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
On Fri 28 Jun 2019 11:20:57 AM CEST, Kevin Wolf wrote: >> >> I would consider 64k cluster/8k subcluster as too extreme for me. >> >> I forgot to add: this 64k/8k ratio is only with my current prototype. >> >> In practice if we go with the 128-bit L2 entries we would have 64 >> subclusters per clu

Re: [Qemu-block] [PATCH v0 1/3] qcow2: introduce compression type feature

2019-06-28 Thread Kevin Wolf
Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben: > The patch adds some preparation parts for incompatible compression type > feature to QCOW2 header that indicates that *all* compressed clusters > must be (de)compressed using a certain compression type. > > It is implied that the compressio

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Kevin Wolf
Am 28.06.2019 um 11:53 hat Alberto Garcia geschrieben: > On Fri 28 Jun 2019 11:20:57 AM CEST, Kevin Wolf wrote: > >> >> I would consider 64k cluster/8k subcluster as too extreme for me. > >> > >> I forgot to add: this 64k/8k ratio is only with my current prototype. > >> > >> In practice if we go

Re: [Qemu-block] [PATCH v0 1/3] qcow2: introduce compression type feature

2019-06-28 Thread Kevin Wolf
Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben: > The patch adds some preparation parts for incompatible compression type > feature to QCOW2 header that indicates that *all* compressed clusters > must be (de)compressed using a certain compression type. > > It is implied that the compressio

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Kevin Wolf
Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben: > With the patch, qcow2 is able to process image compression type > defined in the image header and choose the corresponding method > for clusters compressing. > > Also, it rework the cluster compression code for adding more > compression typ

Re: [Qemu-block] [PATCH v0 1/3] qcow2: introduce compression type feature

2019-06-28 Thread Denis Plotnikov
On 28.06.2019 12:54, Kevin Wolf wrote: > Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben: >> The patch adds some preparation parts for incompatible compression type >> feature to QCOW2 header that indicates that *all* compressed clusters >> must be (de)compressed using a certain compressio

Re: [Qemu-block] [PATCH v0 3/3] qcow2: add zstd cluster compression

2019-06-28 Thread Kevin Wolf
Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben: > zstd significantly reduces cluster compression time. > It provides better compression performance maintaining > the same level of compression ratio in comparison with > zlib, which, by the moment, has been the only compression > method avail

Re: [Qemu-block] [Qemu-devel] [PATCH] blk: postpone request execution on a context protected with "drained section"

2019-06-28 Thread Kevin Wolf
Am 26.06.2019 um 10:46 hat Denis Plotnikov geschrieben: > On 24.06.2019 12:46, Denis Plotnikov wrote: > > On 21.06.2019 12:59, Vladimir Sementsov-Ogievskiy wrote: > >> 21.06.2019 12:16, Kevin Wolf wrote: > >>> Am 09.04.2019 um 12:01 hat Kevin Wolf geschrieben: > Am 02.04.2019 um 10:35 hat Deni

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Denis Plotnikov
On 28.06.2019 13:23, Kevin Wolf wrote: > Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben: >> With the patch, qcow2 is able to process image compression type >> defined in the image header and choose the corresponding method >> for clusters compressing. >> >> Also, it rework the cluster com

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Kevin Wolf
Am 28.06.2019 um 13:24 hat Denis Plotnikov geschrieben: > > > On 28.06.2019 13:23, Kevin Wolf wrote: > > Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben: > >> With the patch, qcow2 is able to process image compression type > >> defined in the image header and choose the corresponding metho

[Qemu-block] [PULL 1/1] build: use $(DESTDIR)x instead of $(DESTDIR)/x

2019-06-28 Thread Stefan Hajnoczi
The GNU make manual[1] demonstrates $(DESTDIR)$(bindir)/foo and QEMU mostly follows that. There are just a few instances of $(DESTDIR)/$(bindir)/foo. Fix these inconsistencies. [1] https://www.gnu.org/software/make/manual/html_node/DESTDIR.html Cc: Daniel P. Berrange Signed-off-by: Stefan Hajn

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
On Thu 27 Jun 2019 06:54:34 PM CEST, Kevin Wolf wrote: >> |-++-| >> | Cluster size | subclusters=on | subclusters=off | >> |-++-| >> | 2 MB (256 KB) | 571 IOPS | 124 IOPS | >> | 1 MB

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
On Fri 28 Jun 2019 12:04:22 PM CEST, Kevin Wolf wrote: > Am 28.06.2019 um 11:53 hat Alberto Garcia geschrieben: >> On Fri 28 Jun 2019 11:20:57 AM CEST, Kevin Wolf wrote: >> >> >> I would consider 64k cluster/8k subcluster as too extreme for me. >> >> >> >> I forgot to add: this 64k/8k ratio is onl

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Denis Plotnikov
On 28.06.2019 15:06, Kevin Wolf wrote: > Am 28.06.2019 um 13:24 hat Denis Plotnikov geschrieben: >> >> >> On 28.06.2019 13:23, Kevin Wolf wrote: >>> Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben: With the patch, qcow2 is able to process image compression type defined in the ima

[Qemu-block] [PATCH v3 0/7] Allow Valgrind checking all QEMU processes

2019-06-28 Thread Andrey Shinkevich
In the current implementation of the QEMU bash iotests, only qemu-io processes may be run under the Valgrind, which is a useful tool for finding memory usage issues. Let's allow the common.rc bash script runing all the QEMU processes, such as qemu-kvm, qemu-img, qemu-ndb and qemu-vxhs, under the Va

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
I pressed "send" too early, here's the last part of my reply: On Fri 28 Jun 2019 02:57:56 PM CEST, Alberto Garcia wrote: >> I also ran some tests on a rotating HDD drive. Here having >> subclusters doesn't make a big difference regardless of whether there >> is a backing image or not, so we can ig

[Qemu-block] [PATCH v3 3/7] iotests: Add casenotrun report to bash tests

2019-06-28 Thread Andrey Shinkevich
The new function _casenotrun() is to be invoked if a test case cannot be run for some reason. The user will be notified by a message passed to the function. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/common.rc | 7 +++ 1 file changed, 7 insertions(+) d

[Qemu-block] [PATCH v3 5/7] iotests: extended timeout under Valgrind

2019-06-28 Thread Andrey Shinkevich
As the iotests run longer under the Valgrind, the QEMU_COMM_TIMEOUT is to be increased in the test cases 028, 183 and 192 when running under the Valgrind. Suggested-by: Roman Kagan Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/028 | 6 +-

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

2019-06-28 Thread Andrey Shinkevich
The Valgrind tool reports about the uninitialised buffer 'buf' instantiated on the stack of the function guess_disk_lchs(). It is revealed in the tests 051, 186, 227 and 240. Pass 'read-zeroes=on' to the null block driver in the mentioned tests to make them deterministic. The output of the tests ab

[Qemu-block] [PULL 0/1] Block patches

2019-06-28 Thread Stefan Hajnoczi
The following changes since commit 474f3938d79ab36b9231c9ad3b5a9314c2aeacde: Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-jun-21-2019' into staging (2019-06-21 15:40:50 +0100) are available in the Git repository at: https://github.com/stefanha/qemu.git tags/block-pull-req

[Qemu-block] [PATCH v3 2/7] iotests: exclude killed processes from running under Valgrind

2019-06-28 Thread Andrey Shinkevich
The Valgrind tool fails to manage its termination when QEMU raises the signal SIGKILL in the multi-threaded process. The bug has been reported to the Valgrind maintainers. Let's exclude such test cases from running under the Valgrind because checking for the memory issues is covered by other t

[Qemu-block] [PATCH v3 6/7] iotests: extend sleeping time under Valgrind

2019-06-28 Thread Andrey Shinkevich
To synchronize the time when QEMU is running longer under the Valgrind, increase the sleeping time in the test 247. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/247 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Kevin Wolf
Am 28.06.2019 um 15:19 hat Alberto Garcia geschrieben: > On Fri 28 Jun 2019 12:04:22 PM CEST, Kevin Wolf wrote: > > Am 28.06.2019 um 11:53 hat Alberto Garcia geschrieben: > >> On Fri 28 Jun 2019 11:20:57 AM CEST, Kevin Wolf wrote: > >> >> >> I would consider 64k cluster/8k subcluster as too extreme

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Denis Plotnikov
On 28.06.2019 17:24, Kevin Wolf wrote: > Am 28.06.2019 um 14:56 hat Denis Plotnikov geschrieben: >> >> >> On 28.06.2019 15:06, Kevin Wolf wrote: >>> Am 28.06.2019 um 13:24 hat Denis Plotnikov geschrieben: On 28.06.2019 13:23, Kevin Wolf wrote: > Am 28.05.2019 um 16:37 hat Denis

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Denis Lunev
On 6/28/19 5:43 PM, Alberto Garcia wrote: > On Thu 27 Jun 2019 06:05:55 PM CEST, Denis Lunev wrote: Thus in respect to this patterns subclusters could give us benefits of fast random IO and good reclaim rate. >>> Exactly, but that fast random I/O would only happen when allocating >>> new

[Qemu-block] [PATCH v3 1/7] iotests: allow Valgrind checking all QEMU processes

2019-06-28 Thread Andrey Shinkevich
With the '-valgrind' option, let all the QEMU processes be run under the Valgrind tool. The Valgrind own parameters may be set with its environment variable VALGRIND_OPTS, e.g. VALGRIND_OPTS="--leak-check=yes" ./check -qcow2 -valgrind or they may be listed in the Valgrind checked file ./.valgrindr

[Qemu-block] [PATCH v3 4/7] iotests: Valgrind fails with nonexistent directory

2019-06-28 Thread Andrey Shinkevich
The Valgrind uses the exported variable TMPDIR and fails if the directory does not exist. Let us exclude such a test case from being run under the Valgrind and notify the user of it. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/051 | 4 1 file changed, 4

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Kevin Wolf
Am 28.06.2019 um 16:43 hat Alberto Garcia geschrieben: > On Thu 27 Jun 2019 06:05:55 PM CEST, Denis Lunev wrote: > > Please note, I am not talking now about your case with COW. Here the > > allocation is performed on the sub-cluster basis, i.e. the abscence of > > the sub-cluster in the image means

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Kevin Wolf
Am 28.06.2019 um 16:40 hat Denis Plotnikov geschrieben: > > > On 28.06.2019 17:24, Kevin Wolf wrote: > > Am 28.06.2019 um 14:56 hat Denis Plotnikov geschrieben: > >> > >> > >> On 28.06.2019 15:06, Kevin Wolf wrote: > >>> Am 28.06.2019 um 13:24 hat Denis Plotnikov geschrieben: > > >

Re: [Qemu-block] [PATCH] MAINTAINERS: update RBD block maintainer

2019-06-28 Thread Kevin Wolf
Am 28.06.2019 um 15:55 hat jdill...@redhat.com geschrieben: > From: Jason Dillaman > > Remove Josh as per his request since he is no longer the upstream RBD > tech lead. Add myself as the maintainer since I am the current RBD tech > lead. > > Signed-off-by: Jason Dillaman Thanks, applied to th

[Qemu-block] [PATCH] MAINTAINERS: update RBD block maintainer

2019-06-28 Thread jdillama
From: Jason Dillaman Remove Josh as per his request since he is no longer the upstream RBD tech lead. Add myself as the maintainer since I am the current RBD tech lead. Signed-off-by: Jason Dillaman --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Denis Lunev
On 6/28/19 6:02 PM, Alberto Garcia wrote: > On Fri 28 Jun 2019 04:57:08 PM CEST, Kevin Wolf wrote: >> Am 28.06.2019 um 16:43 hat Alberto Garcia geschrieben: >>> On Thu 27 Jun 2019 06:05:55 PM CEST, Denis Lunev wrote: Please note, I am not talking now about your case with COW. Here the all

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Max Reitz
On 28.06.19 16:54, Kevin Wolf wrote: > Am 28.06.2019 um 16:40 hat Denis Plotnikov geschrieben: >> >> >> On 28.06.2019 17:24, Kevin Wolf wrote: >>> Am 28.06.2019 um 14:56 hat Denis Plotnikov geschrieben: On 28.06.2019 15:06, Kevin Wolf wrote: > Am 28.06.2019 um 13:24 hat Denis Plo

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
On Thu 27 Jun 2019 06:05:55 PM CEST, Denis Lunev wrote: >>> Thus in respect to this patterns subclusters could give us benefits >>> of fast random IO and good reclaim rate. >> Exactly, but that fast random I/O would only happen when allocating >> new clusters. Once the clusters are allocated it doe

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Kevin Wolf
Am 28.06.2019 um 17:02 hat Alberto Garcia geschrieben: > On Fri 28 Jun 2019 04:57:08 PM CEST, Kevin Wolf wrote: > > Am 28.06.2019 um 16:43 hat Alberto Garcia geschrieben: > >> On Thu 27 Jun 2019 06:05:55 PM CEST, Denis Lunev wrote: > >> > Please note, I am not talking now about your case with COW.

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
On Fri 28 Jun 2019 05:03:13 PM CEST, Denis Lunev wrote: > On 6/28/19 6:02 PM, Alberto Garcia wrote: > Please note, I am not talking now about your case with COW. Here the > allocation is performed on the sub-cluster basis, i.e. the abscence of > the sub-cluster in the image means hole o

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Kevin Wolf
Am 28.06.2019 um 14:56 hat Denis Plotnikov geschrieben: > > > On 28.06.2019 15:06, Kevin Wolf wrote: > > Am 28.06.2019 um 13:24 hat Denis Plotnikov geschrieben: > >> > >> > >> On 28.06.2019 13:23, Kevin Wolf wrote: > >>> Am 28.05.2019 um 16:37 hat Denis Plotnikov geschrieben: > With the patc

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
On Fri 28 Jun 2019 04:57:08 PM CEST, Kevin Wolf wrote: > Am 28.06.2019 um 16:43 hat Alberto Garcia geschrieben: >> On Thu 27 Jun 2019 06:05:55 PM CEST, Denis Lunev wrote: >> > Please note, I am not talking now about your case with COW. Here the >> > allocation is performed on the sub-cluster basis,

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Kevin Wolf
Am 28.06.2019 um 17:10 hat Alberto Garcia geschrieben: > On Fri 28 Jun 2019 05:03:13 PM CEST, Denis Lunev wrote: > > On 6/28/19 6:02 PM, Alberto Garcia wrote: > > Please note, I am not talking now about your case with COW. Here the > > allocation is performed on the sub-cluster basis, i.e.

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Denis Plotnikov
On 28.06.2019 18:03, Max Reitz wrote: > On 28.06.19 16:54, Kevin Wolf wrote: >> Am 28.06.2019 um 16:40 hat Denis Plotnikov geschrieben: >>> >>> >>> On 28.06.2019 17:24, Kevin Wolf wrote: Am 28.06.2019 um 14:56 hat Denis Plotnikov geschrieben: > > > On 28.06.2019 15:06, Kevin Wolf

Re: [Qemu-block] [PATCH] MAINTAINERS: update RBD block maintainer

2019-06-28 Thread Josh Durgin
On 6/28/19 6:55 AM, jdill...@redhat.com wrote: From: Jason Dillaman Remove Josh as per his request since he is no longer the upstream RBD tech lead. Add myself as the maintainer since I am the current RBD tech lead. Signed-off-by: Jason Dillaman --- MAINTAINERS | 2 +- 1 file changed, 1 in

Re: [Qemu-block] [Qemu-devel] [PATCH v5 02/28] hw/block/pflash: Simplify trace_pflash_io_read/write()

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 2:50 PM Stephen Checkoway wrote: > > Hi Phil, > > Thanks for pushing this forward! I'll try to get to the rest of these early > next week. > > > On Jun 27, 2019, at 16:26, Philippe Mathieu-Daudé wrote: > > > > Call the read() trace function after the value is set, so we c

Re: [Qemu-block] [Qemu-devel] [PATCH v5 04/28] hw/block/pflash_cfi02: Fix debug format string

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:36 PM Philippe Mathieu-Daudé wrote: > > Always compile the debug code to prevent format string to bitrot. > Delete dead code. > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-3-stephen.checko...@oberlin.edu> > Reviewed-by: Philippe Mathieu-Daudé

Re: [Qemu-block] [Qemu-devel] [PATCH v5 02/28] hw/block/pflash: Simplify trace_pflash_io_read/write()

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:38 PM Philippe Mathieu-Daudé wrote: > > Call the read() trace function after the value is set, so we can > log the returned value. > Rename the I/O trace functions with '_io_' in their name. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alist

Re: [Qemu-block] [Qemu-devel] [PATCH v5 06/28] hw/block/pflash_cfi02: Add helpers to manipulate the status bits

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:49 PM Philippe Mathieu-Daudé wrote: > > Pull out all of the code to modify the status into simple helper > functions. Status handling becomes more complex once multiple > chips are interleaved to produce a single device. > > No change in functionality is intended with thi

Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/28] hw/block/pflash: Simplify trace_pflash_data_read/write()

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:30 PM Philippe Mathieu-Daudé wrote: > > Use a field width format to have a single function to log > the different width accesses. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/block/pflash_cfi01.c | 6 ++ > hw/block/

Re: [Qemu-block] [Qemu-devel] [PATCH v5 07/28] hw/block/pflash_cfi02: Simplify a statement using fall through

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:31 PM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-3-stephen.checko...@oberlin.edu> > Reviewed-by: Philippe Mathieu-Daudé > Tested-by: Philippe Mathieu-Daudé > [PMD: Extracted from bigger patch] > Signed-off-by:

Re: [Qemu-block] [Qemu-devel] [PATCH v5 10/28] hw/block/pflash_cfi02: Extract the pflash_data_read() function

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:46 PM Philippe Mathieu-Daudé wrote: > > Extract the code block in a new function, remove a goto statement. > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-3-stephen.checko...@oberlin.edu> > Reviewed-by: Philippe Mathieu-Daudé > Tested-by: Philip

Re: [Qemu-block] [Qemu-devel] [PATCH v5 11/28] hw/block/pflash_cfi02: Unify the MemoryRegionOps

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:37 PM Philippe Mathieu-Daudé wrote: > > The pflash_read()/pflash_write() can check the device endianess > via the pfl->be variable, so remove the 'int be' argument. > > Since the big/little MemoryRegionOps are now identical, it is > pointless to declare them both. Unify t

Re: [Qemu-block] [Qemu-devel] [PATCH v5 12/28] hw/block/pflash_cfi02: Fix command address comparison

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:42 PM Philippe Mathieu-Daudé wrote: > > From: Stephen Checkoway > > Most AMD commands only examine 11 bits of the address. This masks the > addresses used in the comparison to 11 bits. The exceptions are word or > sector addresses which use offset directly rather than th

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
On Fri 28 Jun 2019 05:09:11 PM CEST, Kevin Wolf wrote: > Am 28.06.2019 um 17:02 hat Alberto Garcia geschrieben: >> On Fri 28 Jun 2019 04:57:08 PM CEST, Kevin Wolf wrote: >> > Am 28.06.2019 um 16:43 hat Alberto Garcia geschrieben: >> >> On Thu 27 Jun 2019 06:05:55 PM CEST, Denis Lunev wrote: >> >> >

Re: [Qemu-block] [Qemu-devel] [PATCH v5 13/28] tests/pflash-cfi02: Refactor to support testing multiple configurations

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:50 PM Philippe Mathieu-Daudé wrote: > > Introduce the FlashConfig structure, to be able to run the same set > of tests on different flash models/configurations. > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-6-stephen.checko...@oberlin.edu> > [P

Re: [Qemu-block] [Qemu-devel] [PATCH v5 19/28] hw/block/pflash_cfi02: Extract pflash_regions_count()

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:54 PM Philippe Mathieu-Daudé wrote: > > Extract the pflash_regions_count() function, the code will be > easier to review. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/block/pflash_cfi02.c | 8 ++-- > 1 file changed,

Re: [Qemu-block] [Qemu-devel] [PATCH v5 16/28] hw/block/pflash_cfi02: Hold the PRI table offset in a variable

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:34 PM Philippe Mathieu-Daudé wrote: > > Manufacturers are allowed to move the PRI table, this is why the > offset is queryable via fixed offsets 0x15/0x16. > Add a variable to hold the offset, so it will be easier to later > move the PRI table. > > Signed-off-by: Philippe

Re: [Qemu-block] [Qemu-devel] [PATCH] block/qcow: Improve error when opening qcow2 files as qcow

2019-06-28 Thread John Snow
On 6/28/19 5:24 AM, Kevin Wolf wrote: > Am 27.06.2019 um 19:17 hat John Snow geschrieben: >> >> >> On 6/27/19 4:34 AM, Kevin Wolf wrote: >>> Am 26.06.2019 um 23:53 hat John Snow geschrieben: Reported-by: radmehrsae...@gmail.com Fixes: https://bugs.launchpad.net/bugs/1832914 Signed

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
On Fri 28 Jun 2019 04:16:28 PM CEST, Kevin Wolf wrote: >> >> >> >> I would consider 64k cluster/8k subcluster as too extreme >> >> >> >> for me. >> >> >> >> >> >> I forgot to add: this 64k/8k ratio is only with my current >> >> >> prototype. >> >> >> >> >> >> In practice if we go with the 128-bit

Re: [Qemu-block] [Qemu-devel] [PATCH v5 15/28] hw/block/pflash_cfi02: Document the current CFI values

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:53 PM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-6-stephen.checko...@oberlin.edu> > [PMD: Extracted from bigger patch] > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis Alistair > --- > hw

Re: [Qemu-block] [Qemu-devel] [PATCH v5 14/28] hw/block/pflash_cfi02: Remove pointless local variable

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:59 PM Philippe Mathieu-Daudé wrote: > > We can directly use pfl->total_len, remove the local 'chip_len' > variable. > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-6-stephen.checko...@oberlin.edu> > [PMD: Extracted from bigger patch] > Signed-off

Re: [Qemu-block] [Qemu-devel] [PATCH v5 05/28] hw/block/pflash_cfi02: Add an enum to define the write cycles

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:44 PM Philippe Mathieu-Daudé wrote: > > No change in functionality is intended with this commit. > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-3-stephen.checko...@oberlin.edu> > Reviewed-by: Philippe Mathieu-Daudé > Tested-by: Philippe Mathieu

Re: [Qemu-block] [Qemu-devel] [RFC PATCH v2 1/3] python/qemu: split QEMUMachine out from underneath __init__.py

2019-06-28 Thread Wainer dos Santos Moschetta
On 06/27/2019 06:28 PM, John Snow wrote: It's not obvious that something named __init__.py actually houses important code that isn't relevant to python packaging glue. Move the QEMUMachine and related error classes out into their own module. Adjust users to the new import location. Signed-off

Re: [Qemu-block] [Qemu-devel] [PATCH v5 08/28] hw/block/pflash_cfi02: Use the ldst API in pflash_write()

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:43 PM Philippe Mathieu-Daudé wrote: > > The load/store API eases code review. > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-3-stephen.checko...@oberlin.edu> > Reviewed-by: Philippe Mathieu-Daudé > Tested-by: Philippe Mathieu-Daudé > [PMD: Ext

Re: [Qemu-block] [Qemu-devel] [PATCH v5 09/28] hw/block/pflash_cfi02: Use the ldst API in pflash_read()

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:54 PM Philippe Mathieu-Daudé wrote: > > The load/store API eases code review. > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-3-stephen.checko...@oberlin.edu> > Reviewed-by: Philippe Mathieu-Daudé > Tested-by: Philippe Mathieu-Daudé > [PMD: Ext

Re: [Qemu-block] [PATCH v5 18/28] hw/block/pflash_cfi02: Implement nonuniform sector sizes

2019-06-28 Thread Philippe Mathieu-Daudé
On 6/27/19 10:27 PM, Philippe Mathieu-Daudé wrote: > From: Stephen Checkoway > > Some flash chips support sectors of different sizes. For example, the > AMD AM29LV160DT has 31 64 kB sectors, one 32 kB sector, two 8 kB > sectors, and a 16 kB sector, in that order. The AM29LV160DB has those in > th

Re: [Qemu-block] [RFC] Re-evaluating subcluster allocation for qcow2 images

2019-06-28 Thread Alberto Garcia
On Thu 27 Jun 2019 07:08:29 PM CEST, Denis Lunev wrote: > But can we get a link to the repo with actual version of patches. It's not in a state that can be published at the moment, but I'll try to have something available soon. Berto

Re: [Qemu-block] [Qemu-devel] [PATCH v5 17/28] hw/block/pflash_cfi02: Document 'Page Mode' operations are not supported

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:57 PM Philippe Mathieu-Daudé wrote: > > The 'page mode' feature entry was implicitly set as zero > (not supported). Document it exists, so we won't discard > it if we squeeze the CFI table. > > Signed-off-by: Stephen Checkoway > Message-Id: <20190426162624.55977-6-stephe

Re: [Qemu-block] [PATCH v0 2/3] qcow2: add compression type processing

2019-06-28 Thread Eric Blake
On 6/28/19 9:54 AM, Kevin Wolf wrote: >>> We would save most of this code if we added a new field to the header >>> instead of adding a header extension. Not saying that we should >>> definitely do this, but let's discuss it at least. >> >> If we add the new field to the header

Re: [Qemu-block] [Qemu-devel] [PATCH v5 20/28] hw/block/pflash_cfi02: Split if() condition

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:44 PM Philippe Mathieu-Daudé wrote: > > Split the if() condition check and arrange the indentation to > ease the review of the next patches. No logical change. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/block/pflash_c

Re: [Qemu-block] [Qemu-devel] [PATCH v5 21/28] hw/block/pflash_cfi02: Fix CFI in autoselect mode

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 2:09 PM Philippe Mathieu-Daudé wrote: > > From: Stephen Checkoway > > After a flash device enters CFI mode from autoselect mode, the reset > command returns the device to autoselect mode. An additional reset > command is necessary to return to read array mode. > > Signed-o

Re: [Qemu-block] [Qemu-devel] [PATCH v5 22/28] hw/block/pflash_cfi02: Fix reset command not ignored during erase

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 2:06 PM Philippe Mathieu-Daudé wrote: > > From: Stephen Checkoway > > When the flash device is performing a chip erase, all commands are > ignored. When it is performing a sector erase, only the erase suspend > command is valid, which is currently not supported. > > In par

Re: [Qemu-block] [Qemu-devel] [PATCH v5 25/28] hw/block/pflash_cfi02: Use chip erase time specified in the CFI table

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 2:12 PM Philippe Mathieu-Daudé wrote: > > From: Stephen Checkoway > > When erasing the chip, use the typical time specified in the CFI table > rather than arbitrarily selecting 5 seconds. > > Since the currently unconfigurable value set in the table is 12, this > means a c

Re: [Qemu-block] [Qemu-devel] [PATCH v5 27/28] hw/block/pflash_cfi02: Document commands

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:58 PM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/block/pflash_cfi02.c | 40 +++- > 1 file changed, 19 insertions(+), 21 deletions(-) > > diff --git a/h

Re: [Qemu-block] [Qemu-devel] [PATCH v5 28/28] hw/block/pflash_cfi02: Reduce I/O accesses to 16-bit

2019-06-28 Thread Alistair Francis
On Thu, Jun 27, 2019 at 1:55 PM Philippe Mathieu-Daudé wrote: > > Parallel NOR flashes are limited to 16-bit bus accesses. > Remove the 32-bit dead code. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/block/pflash_cfi02.c | 5 + > 1 file chang