Re: [Qemu-devel] [PATCH] tests/Makefile.include: test all rounding modes of softfloat

2019-02-25 Thread Richard Henderson
On 2/24/19 7:15 AM, Alex Bennée wrote: > We missed a bug in a recent patch as we were not testing all the > rounding modes for all operations. However enabling all rounding modes > for mulAdd does slow down the already slowest test and doesn't really > buy us much additional coverage so lets allow

[Qemu-devel] [PATCH 2/2] audio: Do not check for audio_calloc failure

2019-02-25 Thread Frediano Ziglio
audio_calloc uses g_malloc0 which never returns in case of memory failure. Signed-off-by: Frediano Ziglio --- audio/audio.c | 48 ++-- 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index

Re: [Qemu-devel] [PATCH v2 1/4] block/dirty-bitmaps: add inconsistent bit

2019-02-25 Thread Vladimir Sementsov-Ogievskiy
25.02.2019 17:18, Vladimir Sementsov-Ogievskiy wrote: > 23.02.2019 3:22, John Snow wrote: >> Add an inconsistent bit to dirty-bitmaps that allows us to report a bitmap as >> persistent but potentially inconsistent, i.e. if we find bitmaps on a qcow2 >> that have been marked as "in use". >> >>

[Qemu-devel] [PULL 60/71] iotests: Remove superfluous rm from 232

2019-02-25 Thread Kevin Wolf
From: Max Reitz This test creates no such file. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: John Snow Message-id: 20190210145736.1486-4-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/232 | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] qemu-img: implement copy offload (-C) for dd

2019-02-25 Thread Sergio Lopez
On Mon, Feb 25, 2019 at 03:01:22PM +0100, Kevin Wolf wrote: > Am 25.02.2019 um 14:40 hat Sergio Lopez geschrieben: > > On Fri, Feb 22, 2019 at 11:04:25AM +0100, Kevin Wolf wrote: > > > Am 21.02.2019 um 20:32 hat Sergio Lopez geschrieben: > > > > On Thu, Feb 21, 2019 at 12:08:12PM -0600, Eric Blake

[Qemu-devel] [PATCH 1/2] audio: Use g_strdup_printf instead of manual building a string

2019-02-25 Thread Frediano Ziglio
Instead of using lot of low level function and manually allocate the temporary string in audio_process_options use more high level GLib function. The function is not used in hot path but to read some initial setting. Signed-off-by: Frediano Ziglio --- audio/audio.c | 25

[Qemu-devel] [PULL 54/71] block/curl: Implement bdrv_refresh_filename()

2019-02-25 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Message-id: 20190201192935.18394-29-mre...@redhat.com Signed-off-by: Max Reitz --- block/curl.c | 21 + 1 file changed, 21 insertions(+) diff --git a/block/curl.c b/block/curl.c index

Re: [Qemu-devel] Questions about EDID

2019-02-25 Thread Gerd Hoffmann
On Mon, Feb 25, 2019 at 09:05:30AM -0500, G 3 wrote: > Hi Gerd, I was wondering if you have made any documentation for your EDID > patches. If you have could you provide a link please? No docs. > Also could a feature be added that allows the user to specify resolutions > to be made available to

[Qemu-devel] [PULL 71/71] iotests: Skip 211 on insufficient memory

2019-02-25 Thread Kevin Wolf
From: Max Reitz VDI keeps the whole bitmap in memory, and the maximum size (which is tested here) is 2 GB. This may not be available on all machines, and it rarely is available when running a 32 bit build. Fix this by making VM.run_job() return the error string if an error occurred, and

[Qemu-devel] [PULL 53/71] block/curl: Harmonize option defaults

2019-02-25 Thread Kevin Wolf
From: Max Reitz Both of the defaults we currently have in the curl driver are named based on a slightly different schema, let's unify that and call both CURL_BLOCK_OPT_${NAME}_DEFAULT. While at it, we can add a macro for the third option for which a default exists, namely "sslverify".

[Qemu-devel] [PULL 69/71] iotests: add LUKS payload overhead to 178 qemu-img measure test

2019-02-25 Thread Kevin Wolf
From: Stefan Hajnoczi The previous patch includes the LUKS payload overhead into the qemu-img measure calculation for qcow2. Update qemu-iotests 178 to exercise this new code path. Reviewed-by: Max Reitz Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Stefan Hajnoczi Message-id:

[Qemu-devel] [PULL 66/71] iotests: Let 045 be run concurrently

2019-02-25 Thread Kevin Wolf
From: 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 Message-id: 20190210145736.1486-10-mre...@redhat.com Signed-off-by: Max Reitz --- scripts/qemu.py| 5 ++---

[Qemu-devel] [PULL 48/71] block: Add BlockDriver.bdrv_gather_child_options

2019-02-25 Thread Kevin Wolf
From: Max Reitz Some follow-up patches will rework the way bs->full_open_options is refreshed in bdrv_refresh_filename(). The new implementation will remove the need for the block drivers' bdrv_refresh_filename() implementations to set bs->full_open_options; instead, it will be generic and use

[Qemu-devel] [PULL 50/71] block: Purify .bdrv_refresh_filename()

2019-02-25 Thread Kevin Wolf
From: Max Reitz Currently, BlockDriver.bdrv_refresh_filename() is supposed to both refresh the filename (BDS.exact_filename) and set BDS.full_open_options. Now that we have generic code in the central bdrv_refresh_filename() for creating BDS.full_open_options, we can drop the latter part from

[Qemu-devel] [PULL 64/71] iotests.py: Filter filename in any string value

2019-02-25 Thread Kevin Wolf
From: 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

[Qemu-devel] [PULL 63/71] iotests.py: Add is_str()

2019-02-25 Thread Kevin Wolf
From: 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 Message-id: 20190210145736.1486-7-mre...@redhat.com

[Qemu-devel] [PULL 46/71] iotests: Add quorum case to test 110

2019-02-25 Thread Kevin Wolf
From: Max Reitz Test 110 tests relative backing filenames for complex BDS trees. Now that the originally supposedly failing test passes, let us add a new failing test: Quorum can never work automatically (without detecting whether all child nodes have the same base directory, but that would be

[Qemu-devel] [PULL 55/71] block/null: Generate filename even with latency-ns

2019-02-25 Thread Kevin Wolf
From: Max Reitz While we cannot represent the latency-ns option in a filename, it is not a strong option so not being able to should not stop us from generating a filename nonetheless. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Message-id: 20190201192935.18394-30-mre...@redhat.com

[Qemu-devel] [PULL 62/71] iotests: Fix 207 to use QMP filters for qmp_log

2019-02-25 Thread Kevin Wolf
From: Max Reitz Fixes: 08fcd6111e1949f456e1b232ebeeb0cc17019a92 Signed-off-by: Max Reitz Reviewed-by: John Snow Message-id: 20190210145736.1486-6-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/207 | 10 +++--- tests/qemu-iotests/207.out | 4 ++-- 2 files changed,

[Qemu-devel] [PULL 57/71] iotests: Test json:{} filenames of internal BDSs

2019-02-25 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Message-id: 20190201192935.18394-32-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/224 | 139 + tests/qemu-iotests/224.out | 18 + tests/qemu-iotests/group | 1 + 3 files changed, 158

[Qemu-devel] [PULL 30/71] block: Add BDS.auto_backing_file

2019-02-25 Thread Kevin Wolf
From: Max Reitz If the backing file is overridden, this most probably does change the guest-visible data of a BDS. Therefore, we will need to consider this in bdrv_refresh_filename(). To see whether it has been overridden, we might want to compare bs->backing_file and

[Qemu-devel] [PULL 59/71] iotests: Fix 237 for Python 2.x

2019-02-25 Thread Kevin Wolf
From: 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

[Qemu-devel] [PULL 31/71] block: Respect backing bs in bdrv_refresh_filename

2019-02-25 Thread Kevin Wolf
From: Max Reitz Basically, bdrv_refresh_filename() should respect all children of a BlockDriverState. However, generally those children are driver-specific, so this function cannot handle the general case. On the other hand, there are only few drivers which use other children than @file and

[Qemu-devel] [PULL 47/71] block: Add strong_runtime_opts to BlockDriver

2019-02-25 Thread Kevin Wolf
From: Max Reitz This new field can be set by block drivers to list the runtime options they accept that may influence the contents of the respective BDS. As of a follow-up patch, this list will be used by the common bdrv_refresh_filename() implementation to decide which options to put into

[Qemu-devel] [PULL 49/71] block: Generically refresh runtime options

2019-02-25 Thread Kevin Wolf
From: Max Reitz Instead of having every block driver which implements bdrv_refresh_filename() copy all of the strong runtime options over to bs->full_open_options, implement this process generically in bdrv_refresh_filename(). This patch only adds this new generic implementation, it does not

[Qemu-devel] [PULL 58/71] iotests: Re-add filename filters

2019-02-25 Thread Kevin Wolf
From: 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

[Qemu-devel] [PULL 45/71] block: Use bdrv_dirname() for relative filenames

2019-02-25 Thread Kevin Wolf
From: Max Reitz bdrv_get_full_backing_filename_from_filename() breaks down when it comes to JSON filenames. Using bdrv_dirname() as the basis is better because since we have BDS, we can descend through the BDS tree to the protocol layer, which gives us a greater probability of finding a non-JSON

[Qemu-devel] [PULL 42/71] quorum: Make bdrv_dirname() return NULL

2019-02-25 Thread Kevin Wolf
From: Max Reitz While the common implementation for bdrv_dirname() should return NULL for quorum BDSs already (because they do not have a file node and their exact_filename field should be empty), there is no reason not to make that explicit. Signed-off-by: Max Reitz Reviewed-by: Eric Blake

[Qemu-devel] [PULL 34/71] iotests: Add test for backing file overrides

2019-02-25 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Message-id: 20190201192935.18394-9-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/228 | 242 + tests/qemu-iotests/228.out | 84 + tests/qemu-iotests/group | 1 + 3 files

[Qemu-devel] [PULL 56/71] block: BDS options may lack the "driver" option

2019-02-25 Thread Kevin Wolf
From: Max Reitz When BDSs are created by qemu itself (e.g. as filters in block jobs), they may not have a "driver" option in their options QDict. When generating a json:{} filename, however, it must always be present. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Message-id:

[Qemu-devel] [PULL 43/71] block/nbd: Make bdrv_dirname() return NULL

2019-02-25 Thread Kevin Wolf
From: Max Reitz The generic bdrv_dirname() implementation would be able to generate some form of directory name for many NBD nodes, but it would be always wrong. Therefore, we have to explicitly make it an error (until NBD has some form of specification for export paths, if it ever will).

[Qemu-devel] [PULL 28/71] block: Use children list in bdrv_refresh_filename

2019-02-25 Thread Kevin Wolf
From: Max Reitz bdrv_refresh_filename() should invoke itself recursively on all children, not just on file. With that change, we can remove the manual invocations in blkverify, quorum, commit, mirror, and blklogwrites. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto

[Qemu-devel] [PULL 27/71] block: Use bdrv_refresh_filename() to pull

2019-02-25 Thread Kevin Wolf
From: Max Reitz Before this patch, bdrv_refresh_filename() is used in a pushing manner: Whenever the BDS graph is modified, the parents of the modified edges are supposed to be updated (recursively upwards). However, that is nonviable, considering that we want child changes not to concern

[Qemu-devel] [PULL 51/71] block: Do not copy exact_filename from format file

2019-02-25 Thread Kevin Wolf
From: Max Reitz If a format BDS's file BDS is in turn a format BDS, we cannot simply use the same filename, because when opening a BDS tree based on a filename alone, qemu will create only one format node on top of one protocol node (disregarding a potential backing file). Signed-off-by: Max

[Qemu-devel] [PULL 38/71] block: Add bdrv_make_absolute_filename()

2019-02-25 Thread Kevin Wolf
From: Max Reitz This is a general function for making a filename that is relative to a certain BDS absolute. It calls bdrv_get_full_backing_filename_from_filename() for now, but that will be changed in a follow-up patch. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Message-id:

[Qemu-devel] [PULL 39/71] block: Fix bdrv_find_backing_image()

2019-02-25 Thread Kevin Wolf
From: Max Reitz bdrv_find_backing_image() should use bdrv_get_full_backing_filename() or bdrv_make_absolute_filename() instead of trying to do what those functions do by itself. path_combine_deprecated() can now be dropped, so let's do that. Signed-off-by: Max Reitz Reviewed-by: Alberto

[Qemu-devel] [PULL 23/71] block: fix bdrv_check_perm for non-tree subgraph

2019-02-25 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy bdrv_check_perm in it's recursion checks each node in context of new permissions for one parent, because of nature of DFS. It works well, while children subgraph of top-most updated node is a tree, i.e. it doesn't have any kind of loops. But if we have a loop

[Qemu-devel] [PULL 52/71] block/nvme: Fix bdrv_refresh_filename()

2019-02-25 Thread Kevin Wolf
From: Max Reitz Currently, nvme's bdrv_refresh_filename() is an exact copy of null's implementation. However, for null, "null-co://" and "null-aio://" are indeed valid filenames -- for nvme, they are not, as a device address is still required. The correct implementation should generate a

[Qemu-devel] [PULL 37/71] block: bdrv_get_full_backing_filename's ret. val.

2019-02-25 Thread Kevin Wolf
From: Max Reitz Make bdrv_get_full_backing_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Message-id: 20190201192935.18394-12-mre...@redhat.com Signed-off-by: Max Reitz ---

[Qemu-devel] [PULL 32/71] iotests.py: Add filter_imgfmt()

2019-02-25 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Message-id: 20190201192935.18394-7-mre...@redhat.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/qemu-iotests/iotests.py

[Qemu-devel] [PULL 21/71] aio-posix: Assert that aio_poll() is always called in home thread

2019-02-25 Thread Kevin Wolf
aio_poll() has an existing assertion that the function is only called from the AioContext's home thread if blocking is allowed. This is not enough, some handlers make assumptions about the thread they run in. Extend the assertion to non-blocking calls, too. Signed-off-by: Kevin Wolf

[Qemu-devel] [PULL 44/71] block/nfs: Implement bdrv_dirname()

2019-02-25 Thread Kevin Wolf
From: Max Reitz While the basic idea is obvious and could be handled by the default bdrv_dirname() implementation, we cannot generate a directory name if the gid or uid are set, so we have to explicitly return NULL in those cases. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia

[Qemu-devel] [PULL 26/71] block/nvme: Remove QEMU_PACKED from naturally aligned NVMeRegs struct

2019-02-25 Thread Kevin Wolf
From: Thomas Huth The QEMU_PACKED is causing a compiler warning/error with GCC 9: CC block/nvme.o block/nvme.c: In function ‘nvme_create_queue_pair’: block/nvme.c:209:22: error: taking address of packed member of ‘struct ’ may result in an unaligned pointer value

[Qemu-devel] [PULL 17/71] block: Don't poll in bdrv_set_aio_context()

2019-02-25 Thread Kevin Wolf
The explicit aio_poll() call in bdrv_set_aio_context() was added in commit c2b6428d388 as a workaround for bdrv_drain() failing to achieve to actually quiesce everything (specifically the NBD client code to switch AioContext). Now that the NBD client has been fixed to complete this operation

[Qemu-devel] [PULL 25/71] qcow2: Assert that L2 table offsets fit in the L1 table

2019-02-25 Thread Kevin Wolf
From: Alberto Garcia L1 table entries have a field to store the offset of an L2 table. The rest of the bits of the entry are currently reserved except from bit 63, which stores the COPIED flag. The offset is always taken from the entry using L1E_OFFSET_MASK to ensure that we only use the bits

[Qemu-devel] [PULL 35/71] block: Make path_combine() return the path

2019-02-25 Thread Kevin Wolf
From: Max Reitz Besides being safe for arbitrary path lengths, after some follow-up patches all callers will want a freshly allocated buffer anyway. In the meantime, path_combine_deprecated() is added which has the same interface as path_combine() had before this patch. All callers to that

[Qemu-devel] [PULL 36/71] block: bdrv_get_full_backing_filename_from_...'s ret. val.

2019-02-25 Thread Kevin Wolf
From: Max Reitz Make bdrv_get_full_backing_filename_from_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz Message-id: 20190201192935.18394-11-mre...@redhat.com Signed-off-by: Max Reitz --- include/block/block.h | 7

[Qemu-devel] [PULL 22/71] block: improve should_update_child

2019-02-25 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy As it already said in the comment, we don't want to create loops in parent->child relations. So, when we try to append @to to @c, we should check that @c is not in @to children subtree, and we should check it recursively, not only the first level. The patch

[Qemu-devel] [PULL 10/71] virtio-blk: Increase in_flight for request restart BH

2019-02-25 Thread Kevin Wolf
virtio_blk_dma_restart_bh() submits new requests, so in order to make sure that these requests are not started inside a drained section of the attached BlockBackend, we need to make sure that draining the BlockBackend waits for the BH to be executed. This BH is still questionable because its

[Qemu-devel] [PULL 40/71] block: Add bdrv_dirname()

2019-02-25 Thread Kevin Wolf
From: Max Reitz This function may be implemented by block drivers to derive a directory name from a BDS. Concatenating this g_free()-able string with a relative filename must result in a valid (not necessarily existing) filename, so this is a function that should generally be not implemented by

[Qemu-devel] [PULL 41/71] blkverify: Make bdrv_dirname() return NULL

2019-02-25 Thread Kevin Wolf
From: Max Reitz blkverify's BDSs have a file BDS, but we do not want this to be preferred over the raw node. There is no way to decide between the two (and not really a reason to, either), so just return NULL in blkverify's implementation of bdrv_dirname(). Signed-off-by: Max Reitz

[Qemu-devel] [PULL 15/71] nbd: Use low-level QIOChannel API in nbd_read_eof()

2019-02-25 Thread Kevin Wolf
Instead of using the convenience wrapper qio_channel_read_all_eof(), use the lower level QIOChannel API. This means duplicating some code, but we'll need this because this coroutine yield is special: We want it to be interruptible so that nbd_client_attach_aio_context() can correctly reenter the

[Qemu-devel] [PULL 09/71] block-backend: Make blk_inc/dec_in_flight public

2019-02-25 Thread Kevin Wolf
For some users of BlockBackends, just increasing the in_flight counter is easier than implementing separate handlers in BlockDevOps. Make the helper functions for this public. Signed-off-by: Kevin Wolf --- include/sysemu/block-backend.h | 2 ++ block/block-backend.c | 4 ++-- 2 files

[Qemu-devel] [PULL 33/71] iotests.py: Add node_info()

2019-02-25 Thread Kevin Wolf
From: Max Reitz This function queries a node; since we cannot do that right now, it executes query-named-block-nodes and returns the matching node's object. Signed-off-by: Max Reitz Reviewed-by: John Snow Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Message-id:

[Qemu-devel] [PULL 29/71] block: Skip implicit nodes for filename info

2019-02-25 Thread Kevin Wolf
From: Max Reitz bdrv_refresh_filename() should simply skip all implicit nodes. They are supposed to be invisible to the user, so they should not appear in filename information. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Message-id:

[Qemu-devel] [PULL 20/71] block: Use normal drain for bdrv_set_aio_context()

2019-02-25 Thread Kevin Wolf
Now that bdrv_set_aio_context() works inside drained sections, it can also use the real drain function instead of open coding something similar. Signed-off-by: Kevin Wolf --- block.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PULL 08/71] qemu-img: fix error reporting for -object

2019-02-25 Thread Kevin Wolf
From: Daniel P. Berrangé Error reporting for user_creatable_add_opts_foreach was changed so that it no longer called 'error_report_err' in: commit 7e1e0c11127bde81cff260fc6859690435c509d6 Author: Markus Armbruster Date: Wed Oct 17 10:26:43 2018 +0200 qom: Clean up error reporting

[Qemu-devel] [PULL 24/71] tests: add test-bdrv-graph-mod

2019-02-25 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Add two tests of node graph modification. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- tests/test-bdrv-graph-mod.c | 198 tests/Makefile.include | 2 + 2 files changed, 200

[Qemu-devel] [PULL 19/71] test-bdrv-drain: AioContext switch in drained section

2019-02-25 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- tests/test-bdrv-drain.c | 32 1 file changed, 32 insertions(+) diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index ee1740ff06..1b1f6c17a5 100644 --- a/tests/test-bdrv-drain.c +++

[Qemu-devel] [PULL 18/71] block: Fix AioContext switch for drained node

2019-02-25 Thread Kevin Wolf
When a drained node changes its AioContext, we need to move its aio_disable_external() to the new context, too. Without this fix, drain_end will try to reenable the new context, which has never been disabled, so an assertion failure is triggered. Signed-off-by: Kevin Wolf Reviewed-by: Eric

[Qemu-devel] [PULL 05/71] qcow2-snapshot: remove redundant find_snapshot_by_id_and_name call

2019-02-25 Thread Kevin Wolf
From: Daniel Henrique Barboza In qcow2_snapshot_create there is the following code block: /* Generate an ID */ find_new_snapshot_id(bs, sn_info->id_str, sizeof(sn_info->id_str)); /* Check that the ID is unique */ if (find_snapshot_by_id_and_name(bs, sn_info->id_str, NULL) >= 0)

[Qemu-devel] [PULL 16/71] nbd: Increase bs->in_flight during AioContext switch

2019-02-25 Thread Kevin Wolf
bdrv_drain() must not leave connection_co scheduled, so bs->in_flight needs to be increased while the coroutine is waiting to be scheduled in the new AioContext after nbd_client_attach_aio_context(). Signed-off-by: Kevin Wolf --- block/nbd-client.c | 20 ++-- 1 file changed, 18

[Qemu-devel] [PULL 14/71] nbd: Move nbd_read_eof() to nbd/client.c

2019-02-25 Thread Kevin Wolf
The only caller of nbd_read_eof() is nbd_receive_reply(), so it doesn't have to live in the header file, but can move next to its caller. Also add the missing coroutine_fn to the function and its caller. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/block/nbd.h | 3 ++-

[Qemu-devel] [PULL 12/71] io: Make qio_channel_yield() interruptible

2019-02-25 Thread Kevin Wolf
Similar to how qemu_co_sleep_ns() allows preemption from an external coroutine entry, allow reentering qio_channel_yield() early. Signed-off-by: Kevin Wolf --- include/io/channel.h | 9 ++--- io/channel.c | 10 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PULL 03/71] block/snapshot.c: eliminate use of ID input in snapshot operations

2019-02-25 Thread Kevin Wolf
From: Daniel Henrique Barboza At this moment, QEMU attempts to create/load/delete snapshots by using either an ID (id_str) or a name. The problem is that the code isn't consistent of whether the entered argument is an ID or a name, causing unexpected behaviors. For example, when creating

[Qemu-devel] [PULL 13/71] io: Remove redundant read/write_coroutine assignments

2019-02-25 Thread Kevin Wolf
qio_channel_yield() now updates ioc->read_write/coroutine and calls qio_channel_set_aio_fd_handlers(), so the code in the handlers has become redundant and can be removed. This does not make a difference in intermediate states because aio_co_wake() really enters the coroutine immediately here:

[Qemu-devel] [PULL 11/71] nbd: Restrict connection_co reentrance

2019-02-25 Thread Kevin Wolf
nbd_client_attach_aio_context() schedules connection_co in the new AioContext and this way reenters it in any arbitrary place that has yielded. We can restrict this a bit to the function call where the coroutine actually sits waiting when it's idle. This doesn't solve any bug yet, but it shows

[Qemu-devel] [PULL 00/71] Block layer patches

2019-02-25 Thread Kevin Wolf
The following changes since commit 59a568b57848b10e8a44518a889323f12ccdd8f4: Merge remote-tracking branch 'remotes/kraxel/tags/vga-20190222-pull-request' into staging (2019-02-25 12:49:07 +) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for

[Qemu-devel] [PULL 04/71] block/snapshot: remove bdrv_snapshot_delete_by_id_or_name

2019-02-25 Thread Kevin Wolf
From: Daniel Henrique Barboza After the previous patch, the only instance of this function left is inside qemu-img.c. qemu-img is using it inside the 'img_snapshot' function to delete snapshots in the SNAPSHOT_DELETE case, based on a "snapshot_name" string that refers to the tag, not ID, of the

[Qemu-devel] [PULL 06/71] block: don't set the same context

2019-02-25 Thread Kevin Wolf
From: Denis Plotnikov Adds a fast path on aio context setting preventing unnecessary context setting routine. Also, it prevents issues with cyclic walk of child bds-es appeared because of registering aio walking notifiers: Call stack: 0 __GI_raise 1 __GI_abort 2 __assert_fail_base 3

[Qemu-devel] [PULL 07/71] commit: Replace commit_top_bs on failure after deleting the block job

2019-02-25 Thread Kevin Wolf
From: Alberto Garcia If there's an error in commit_start() then the block job must be deleted before replacing commit_top_bs, otherwise it will fail because of lack of permissions. This happens since the permission system was introduced in 8dfba2797761d8a43744e4e6571c8175e448a478. Fortunately

[Qemu-devel] [PULL 3/3] iotests: avoid broken pipe with certtool

2019-02-25 Thread Eric Blake
From: Daniel P. Berrangé When we run "certtool 2>&1 | head -1" the latter command is likely to complete and exit before certtool has written everything it wants to stderr. In at least the RHEL-7 gnutls 3.3.29 this causes certtool to quit with broken pipe before it has finished writing the

[Qemu-devel] [PULL 02/71] MAINTAINERS: Remove myself as block maintainer

2019-02-25 Thread Kevin Wolf
From: Jeff Cody I'll not be involved in day-to-day qemu development. Remove myself as maintainer from the remainder of the network block drivers, and revert them to the general block layer maintainership. Move 'sheepdog' to the 'Odd Fixes' support level. For VHDX, added my personal email

[Qemu-devel] [PULL 01/71] MAINTAINERS: Replace myself with John Snow for block jobs

2019-02-25 Thread Kevin Wolf
From: Jeff Cody I'll not be involved with day-to-day qemu development, and John Snow is a block jobs wizard. Have him take over block job maintainership duties. Signed-off-by: Jeff Cody Acked-by: John Snow Message-Id: Signed-off-by: Kevin Wolf --- MAINTAINERS | 4 ++-- 1 file changed, 2

[Qemu-devel] [PULL 1/3] iotests: handle TypeError for Python3 in test 242

2019-02-25 Thread Eric Blake
From: Andrey Shinkevich The data type for bytes in Python3 differs from the one in Python2. Those cases should be managed separately. Signed-off-by: Andrey Shinkevich Reported-by: Kevin Wolf Message-Id: <1550834773-873512-1-git-send-email-andrey.shinkev...@virtuozzo.com> Reviewed-by: Eric

[Qemu-devel] [PULL 2/3] iotests: ensure we print nbd server log on error

2019-02-25 Thread Eric Blake
From: Daniel P. Berrangé If we abort the iotest early the server.log file might contain useful information for diagnosing the problem. Ensure its contents are displayed in this case. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé Message-Id:

[Qemu-devel] [PULL 0/3] NBD patches for 2019-02-25

2019-02-25 Thread Eric Blake
The following changes since commit 59a568b57848b10e8a44518a889323f12ccdd8f4: Merge remote-tracking branch 'remotes/kraxel/tags/vga-20190222-pull-request' into staging (2019-02-25 12:49:07 +) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git

[Qemu-devel] [PULL v2 resend 00/26] pci, pc, virtio: fixes, cleanups, tests

2019-02-25 Thread Michael S. Tsirkin
The following changes since commit fc3dbb90f2eb069801bfb4cfe9cbc83cf9c5f4a9: Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging (2019-02-21 13:09:33 +) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

Re: [Qemu-devel] [PATCH v2 2/4] block/dirty-bitmap: add inconsistent status

2019-02-25 Thread Eric Blake
On 2/22/19 6:22 PM, John Snow wrote: > Even though the status field is deprecated, we still have to support > it for a few more releases. Since this is a very new kind of bitmap > state, it makes sense for it to have its own status field. > > Signed-off-by: John Snow > --- >

Re: [Qemu-devel] [PATCH v2 3/4] block/dirty-bitmaps: add block_dirty_bitmap_check function

2019-02-25 Thread Vladimir Sementsov-Ogievskiy
25.02.2019 18:07, Eric Blake wrote: > On 2/25/19 8:59 AM, Vladimir Sementsov-Ogievskiy wrote: > >> >> And one more important question: we now creating new qapi bitmap status, >> consisting of several bool fields. >> Shouldn't we instead implement it as an array of flags? > > Parsing: > > {

Re: [Qemu-devel] [PATCH v3 01/10] block/dirty-bitmap: add recording and busy properties

2019-02-25 Thread Eric Blake
On 2/25/19 9:01 AM, Vladimir Sementsov-Ogievskiy wrote: > 23.02.2019 3:06, John Snow wrote: >> The current API allows us to report a single status, which we've defined as: >> >> Frozen: has a successor, treated as qmp_locked, may or may not be enabled. >> Locked: no successor, qmp_locked. may or

Re: [Qemu-devel] [PATCH v2 3/4] block/dirty-bitmaps: add block_dirty_bitmap_check function

2019-02-25 Thread Eric Blake
On 2/25/19 8:59 AM, Vladimir Sementsov-Ogievskiy wrote: > > And one more important question: we now creating new qapi bitmap status, > consisting of several bool fields. > Shouldn't we instead implement it as an array of flags? Parsing: { "busy": false, "persistent": false, "recording": true

Re: [Qemu-devel] [PATCH 2/2] ppc/pnv: add INITRD_MAX_SIZE constant

2019-02-25 Thread Eric Blake
On 2/25/19 8:24 AM, Murilo Opsfelder Araujo wrote: > The current 0x1000 value is actually 256MiB, not 128MB as the comment > suggests. Move it to a constant and fix the comment (no change in the size > value). > > Signed-off-by: Murilo Opsfelder Araujo > --- > hw/ppc/pnv.c | 3 ++- > 1 file

Re: [Qemu-devel] [PATCH v3 01/10] block/dirty-bitmap: add recording and busy properties

2019-02-25 Thread Vladimir Sementsov-Ogievskiy
23.02.2019 3:06, John Snow wrote: > The current API allows us to report a single status, which we've defined as: > > Frozen: has a successor, treated as qmp_locked, may or may not be enabled. > Locked: no successor, qmp_locked. may or may not be enabled. > Disabled: Not frozen or locked,

Re: [Qemu-devel] [PATCH v2 3/4] block/dirty-bitmaps: add block_dirty_bitmap_check function

2019-02-25 Thread Vladimir Sementsov-Ogievskiy
25.02.2019 16:37, Vladimir Sementsov-Ogievskiy wrote: > 23.02.2019 3:22, John Snow wrote: >> Instead of checking against busy, inconsistent, or read only directly, >> use a check function with permissions bits that let us streamline the >> checks without reproducing them in many places. >> >> As a

[Qemu-devel] [PATCH 2/2] ppc/pnv: add INITRD_MAX_SIZE constant

2019-02-25 Thread Murilo Opsfelder Araujo
The current 0x1000 value is actually 256MiB, not 128MB as the comment suggests. Move it to a constant and fix the comment (no change in the size value). Signed-off-by: Murilo Opsfelder Araujo --- hw/ppc/pnv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pnv.c

[Qemu-devel] [PATCH 1/2] ppc/pnv: increase kernel size limit to 256MiB

2019-02-25 Thread Murilo Opsfelder Araujo
Building kernel with CONFIG_DEBUG_INFO_REDUCED can generate a ~90MB image and building with CONFIG_DEBUG_INFO can generate a ~225M one, both exceeds the current limit of 32MiB. Increasing kernel size limit to 256MiB should fit for now. Signed-off-by: Murilo Opsfelder Araujo --- hw/ppc/pnv.c |

[Qemu-devel] [PATCH 0/2] ppc/pnv: increase kernel size limit to 256MiB

2019-02-25 Thread Murilo Opsfelder Araujo
First patch increases kernel size limit to 256MiB to fit images generated with CONFIG_DEBUG_INFO. Second patch just fixes a misleading comment regarding initrd size limit. Murilo Opsfelder Araujo (2): ppc/pnv: increase kernel size limit to 256MiB ppc/pnv: add INITRD_MAX_SIZE constant

Re: [Qemu-devel] [RFC v2 31/38] target/xtensa: fetch code with translator_ld

2019-02-25 Thread Alex Bennée
Emilio G. Cota writes: > Signed-off-by: Emilio G. Cota > --- > target/xtensa/translate.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c > index 46e1338448..c140742562 100644 > --- a/target/xtensa/translate.c

Re: [Qemu-devel] [PATCH v5 3/3] tpm_tis: convert tpm_tis_show_buffer() to use trace event

2019-02-25 Thread Stefan Berger
On 2/15/19 8:35 AM, Liam Merwick wrote: cppcheck reports: [hw/tpm/tpm_tis.c:113]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int' Rather than just converting the format specifier to use '%u", the tpm_tis_show_buffer() function is converted to use

Re: [Qemu-devel] [PULL 08/11] authz: add QAuthZList object type for an access control list

2019-02-25 Thread Eric Blake
I missed reviewing this before the pull request, so comments here are best for a followup patch: On 2/25/19 6:31 AM, Daniel P. Berrangé wrote: > From: "Daniel P. Berrange" > > Add a QAuthZList object type that implements the QAuthZ interface. This > built-in implementation maintains a trivial

Re: [Qemu-devel] [PATCH] block/nvme: Remove QEMU_PACKED from naturally aligned NVMeRegs struct

2019-02-25 Thread Peter Maydell
On Mon, 25 Feb 2019 at 14:09, Kevin Wolf wrote: > Though I'm not sure why a compiler should warn if packed and non-packed > result in the exact same layout anyway... Packed implies "and any time you see a pointer to this struct it might not be aligned". Non-packed implies "you can assume that

Re: [Qemu-devel] [PATCH v2 1/4] block/dirty-bitmaps: add inconsistent bit

2019-02-25 Thread Vladimir Sementsov-Ogievskiy
23.02.2019 3:22, John Snow wrote: > Add an inconsistent bit to dirty-bitmaps that allows us to report a bitmap as > persistent but potentially inconsistent, i.e. if we find bitmaps on a qcow2 > that have been marked as "in use". > > Signed-off-by: John Snow > --- > block/dirty-bitmap.c

Re: [Qemu-devel] [PATCH] riscv: Add proper alignment check and pending 'C' extension upon misa writes

2019-02-25 Thread Eric Blake
On 2/24/19 2:07 AM, Amed Magdy wrote: > Thank you so much, Eric. > > Sorry about this unclear description. > I forgot to fix user name in git configuration before submitting the patch. > > Sorry about any inconvenience. Don't worry about it. We were all once first-time contributors, and it can

Re: [Qemu-devel] Build error with git commit 8eb29f1bf5a974dc4c11d2d1f5e7c7f7a62be116 on x86_64

2019-02-25 Thread Eric Blake
Adding people in cc based on 'scripts/get-maintainer.pl -f qobject/block-qdict.c' On 2/22/19 6:35 PM, Andrew Randrianasulu wrote: > Hello! > > I just pulled latest git > > up to > commit 8eb29f1bf5a974dc4c11d2d1f5e7c7f7a62be116 (HEAD -> master, > origin/master, > origin/HEAD) > Merge:

Re: [Qemu-devel] [PATCH v2 0/2] block/ssh: Implement .bdrv_refresh_filename()

2019-02-25 Thread Max Reitz
On 25.02.19 14:39, Max Reitz wrote: > On 06.02.19 16:29, Max Reitz wrote: >> This series implements .bdrv_refresh_filename() for the ssh block >> driver, along with an appropriate .bdrv_dirname() so we don't chop off >> query strings for backing files with relative filenames. >> >> This series

Re: [Qemu-devel] [PATCH] block/nvme: Remove QEMU_PACKED from naturally aligned NVMeRegs struct

2019-02-25 Thread Kevin Wolf
Am 25.02.2019 um 12:59 hat Thomas Huth geschrieben: > The QEMU_PACKED is causing a compiler warning/error with GCC 9: > > CC block/nvme.o > block/nvme.c: In function ‘nvme_create_queue_pair’: > block/nvme.c:209:22: error: taking address of packed member of > ‘struct ’ may result in an

Re: [Qemu-devel] [PATCH] qcow2: Assert that L2 table offsets fit in the L1 table

2019-02-25 Thread Kevin Wolf
Am 08.02.2019 um 16:44 hat Alberto Garcia geschrieben: > L1 table entries have a field to store the offset of an L2 table. > The rest of the bits of the entry are currently reserved except from > bit 63, which stores the COPIED flag. > > The offset is always taken from the entry using

[Qemu-devel] Questions about EDID

2019-02-25 Thread G 3
Hi Gerd, I was wondering if you have made any documentation for your EDID patches. If you have could you provide a link please? Also could a feature be added that allows the user to specify resolutions to be made available to the guest? Maybe it could work like this: -device

Re: [Qemu-devel] [PULL 0/5] Vga 20190222 patches

2019-02-25 Thread Peter Maydell
On Fri, 22 Feb 2019 at 08:26, Gerd Hoffmann wrote: > > The following changes since commit 2e68b8620637a4ee8c79b5724144b726af1e261b: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.0-20190219' > into staging (2019-02-18 16:20:13 +) > > are available in the git repository

<    1   2   3   4   >