[Qemu-block] [PULL 2/9] qemugdb/coroutine: fix arch_prctl has unknown return type

2019-02-10 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy qemu coroutine command results in following error output: Python Exception 'arch_prctl' has unknown return type; cast the call to its declared return type: Error occurred in Python command: 'arch_prctl' has unknown return type; cast the call to its declared

[Qemu-block] [PULL 1/9] iothread: fix iothread hang when stop too soon

2019-02-10 Thread Stefan Hajnoczi
From: Peter Xu Lukas reported an hard to reproduce QMP iothread hang on s390 that QEMU might hang at pthread_join() of the QMP monitor iothread before quitting: Thread 1 #0 0x03ffad10932c in pthread_join #1 0x000109e95750 in qemu_thread_join at

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

2019-02-10 Thread Stefan Hajnoczi
The following changes since commit e47f81b617684c4546af286d307b69014a83538a: Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2019-02-07 18:53:25 +) are available in the Git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for

[Qemu-block] [PULL 5/9] virtio-blk: add host_features field in VirtIOBlock

2019-02-10 Thread Stefan Hajnoczi
From: Stefano Garzarella Since configurable features for virtio-blk are growing, this patch adds host_features field in the struct VirtIOBlock. (as in virtio-net) In this way, we can avoid to add new fields for new properties and we can directly set VIRTIO_BLK_F* flags in the host_features. We

[Qemu-block] [PULL 6/9] virtio-blk: add "discard" and "write-zeroes" properties

2019-02-10 Thread Stefan Hajnoczi
From: Stefano Garzarella In order to avoid migration issues, we enable DISCARD and WRITE_ZEROES features only for machine type >= 4.0 As discussed with Michael S. Tsirkin and Stefan Hajnoczi on the list [1], DISCARD operation should not have security implications (eg. page cache attacks), so we

[Qemu-block] [PULL 9/9] tests/virtio-blk: add test for WRITE_ZEROES command

2019-02-10 Thread Stefan Hajnoczi
From: Stefano Garzarella If the WRITE_ZEROES feature is enabled, we check this command in the test_basic(). Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Acked-by: Thomas Huth Signed-off-by: Stefano Garzarella Acked-by: Pankaj Gupta Message-id:

[Qemu-block] [PULL 8/9] tests/virtio-blk: change assert on data_size in virtio_blk_request()

2019-02-10 Thread Stefan Hajnoczi
From: Stefano Garzarella The size of data in the virtio_blk_request must be a multiple of 512 bytes for IN and OUT requests, or a multiple of the size of struct virtio_blk_discard_write_zeroes for DISCARD and WRITE_ZEROES requests. Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi

[Qemu-block] [PULL 4/9] virtio-blk: add acct_failed param to virtio_blk_handle_rw_error()

2019-02-10 Thread Stefan Hajnoczi
From: Stefano Garzarella We add acct_failed param in order to use virtio_blk_handle_rw_error() also when is not required to call block_acct_failed(). (eg. a discard operation is failed) Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Acked-by:

[Qemu-block] [PULL 7/9] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-10 Thread Stefan Hajnoczi
From: Stefano Garzarella This patch adds the support of DISCARD and WRITE_ZEROES commands, that have been introduced in the virtio-blk protocol to have better performance when using SSD backend. We support only one segment per request since multiple segments are not widely used and there are no

[Qemu-block] [PULL 3/9] virtio-blk: cleanup using VirtIOBlock *s and VirtIODevice *vdev

2019-02-10 Thread Stefan Hajnoczi
From: Stefano Garzarella In several part we still using req->dev or VIRTIO_DEVICE(req->dev) when we have already defined s and vdev pointers: VirtIOBlock *s = req->dev; VirtIODevice *vdev = VIRTIO_DEVICE(s); Signed-off-by: Stefano Garzarella Reviewed-by: Liam Merwick Message-id:

Re: [Qemu-block] [PATCH v4 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-10 Thread Stefan Hajnoczi
On Fri, Feb 08, 2019 at 02:49:44PM +0100, Stefano Garzarella wrote: > This series adds the support of DISCARD and WRITE_ZEROES commands > and extends the virtio-blk-test to test WRITE_ZEROES command when > the feature is enabled. > > v4: > - fixed error with mingw compiler in patch 4 > gcc and

Re: [Qemu-block] [PATCH] virtio-blk: cleanup using VirtIOBlock *s and VirtIODevice *vdev

2019-02-10 Thread Stefan Hajnoczi
On Fri, Feb 08, 2019 at 03:23:47PM +0100, Stefano Garzarella wrote: > In several part we still using req->dev or VIRTIO_DEVICE(req->dev) > when we have already defined s and vdev pointers: > VirtIOBlock *s = req->dev; > VirtIODevice *vdev = VIRTIO_DEVICE(s); > > Signed-off-by: Stefano

Re: [Qemu-block] [RFC PATCH] coroutines: generate wrapper code

2019-02-10 Thread Stefan Hajnoczi
On Fri, Feb 08, 2019 at 05:11:22PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > We have a very frequent pattern of wrapping a coroutine_fn function > to be called from non-coroutine context: > > - create structure to pack parameters > - create function to call original function

Re: [Qemu-block] [Qemu-devel] Guest unresponsive after Virtqueue size exceeded error

2019-02-10 Thread Stefan Hajnoczi
On Wed, Feb 06, 2019 at 04:47:19PM +, Fernando Casas Schössow wrote: > I could also repro the same with virtio-scsi on the same guest a couple of > hours later: > > 2019-02-06 07:10:37.672+: starting up libvirt version: 4.10.0, qemu > version: 3.1.0, kernel: 4.19.18-0-vanilla, hostname:

Re: [Qemu-block] [PATCH 1/1] Introduce a Python module structure

2019-02-10 Thread Stefan Hajnoczi
On Wed, Feb 06, 2019 at 11:29:01AM -0500, Cleber Rosa wrote: > This is a simple move of Python code that wraps common QEMU > functionality, and are used by a number of different tests > and scripts. > > By treating that code as a real Python module, we can more easily: > * reuse code > * have a

Re: [Qemu-block] [PATCH v3 10/10] iotests.py: s/_/-/g on keys in qmp_log()

2019-02-10 Thread Max Reitz
On 10.02.19 15:57, Max Reitz wrote: > This follows what qmp() does, so the output will correspond to the > actual QMP command. > > Signed-off-by: Max Reitz > Reviewed-by: John Snow Dang it, sorry, I forgot to drop this R-b tag while rebasing. It shouldn't be here. :-/ Max > --- >

[Qemu-block] [PATCH v3 09/10] iotests: Let 045 be run concurrently

2019-02-10 Thread Max Reitz
Adding a telnet monitor for no real purpose on a fixed port is not so great. Just use a null monitor instead. Signed-off-by: Max Reitz Reviewed-by: John Snow --- scripts/qemu.py| 5 ++--- tests/qemu-iotests/045 | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git

[Qemu-block] [PATCH v3 04/10] iotests: Fix 232 for LUKS

2019-02-10 Thread Max Reitz
With IMGOPTSSYNTAX, $TEST_IMG is useless for this test (it only tests the file-posix protocol driver). Therefore, if $TEST_IMG_FILE is set, use that instead. Because this test requires the file protocol, $TEST_IMG_FILE will always be set if $IMGOPTSSYNTAX is true. Signed-off-by: Max Reitz

[Qemu-block] [PATCH v3 07/10] iotests.py: Filter filename in any string value

2019-02-10 Thread Max Reitz
filter_qmp_testfiles() currently filters the filename only for specific keys. However, there are more keys that take filenames (such as block-commit's @top and @base, or ssh's @path), and it does not make sense to list them all here. "$TEST_DIR/$PID-" should have enough entropy not to appear

[Qemu-block] [PATCH v3 08/10] iotests: Filter SSH paths

2019-02-10 Thread Max Reitz
8908b253c4ad5f8874c8d13abec169c696a5cd32 has implemented filtering of remote paths for NFS, but forgot SSH. This patch takes care of that. Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/common.rc | 1 + 1 file changed, 1 insertion(+) diff --git

[Qemu-block] [PATCH v3 05/10] iotests: Fix 207 to use QMP filters for qmp_log

2019-02-10 Thread Max Reitz
Fixes: 08fcd6111e1949f456e1b232ebeeb0cc17019a92 Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/207 | 10 +++--- tests/qemu-iotests/207.out | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/207 b/tests/qemu-iotests/207

[Qemu-block] [PATCH v3 10/10] iotests.py: s/_/-/g on keys in qmp_log()

2019-02-10 Thread Max Reitz
This follows what qmp() does, so the output will correspond to the actual QMP command. Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/206.out| 56 +-- tests/qemu-iotests/207.out| 18 +-- tests/qemu-iotests/210.out| 28

[Qemu-block] [PATCH v3 02/10] iotests: Fix 237 for Python 2.x

2019-02-10 Thread Max Reitz
math.ceil() returns an integer on Python 3.x, but a float on Python 2.x. range() always needs integers, so we need an explicit conversion on 2.x (which does not hurt on 3.x). It is not quite clear whether we want to support Python 2.x for any prolonged time, but this may as well be fixed along

[Qemu-block] [PATCH v3 06/10] iotests.py: Add is_str()

2019-02-10 Thread Max Reitz
On Python 2.x, strings are not always unicode strings. This function checks whether a given value is a plain string, or a unicode string (if there is a difference). Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/iotests.py | 6 ++ 1 file changed, 6 insertions(+)

[Qemu-block] [PATCH v3 03/10] iotests: Remove superfluous rm from 232

2019-02-10 Thread Max Reitz
This test creates no such file. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: John Snow --- tests/qemu-iotests/232 | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232 index 0708b8b155..93e5d641a3 100755 ---

[Qemu-block] [PATCH v3 00/10] iotests: Fix some issues

2019-02-10 Thread Max Reitz
No fundamental changes from v2, so if you’re new to this series, the cover letter is here: http://lists.nongnu.org/archive/html/qemu-block/2019-01/msg01123.html Otherwise, these are the changes: v3: - Patch 10: Rebased onto 039be85c410bfb4b53cdee2083b4245e0d4e4181 git-backport-diff against

[Qemu-block] [PATCH v3 01/10] iotests: Re-add filename filters

2019-02-10 Thread Max Reitz
A previous commit removed the default filters for qmp_log with the intention to make them explicit; but this happened only for test 206. There are more tests (for more exotic image formats than qcow2) which require the filename filter, though. Note that 237 is still broken for Python 2.x, which

Re: [Qemu-block] [PATCH v13 00/31] Fix some filename generation issues

2019-02-10 Thread Max Reitz
On 01.02.19 20:29, Max Reitz wrote: > Once more, I’ll spare both me and you another iteration of the cover > letter, so I direct you to the previous version’s cover letter (which > will direct you further): > > http://lists.nongnu.org/archive/html/qemu-block/2018-10/msg00229.html > > There are