[PULL 01/34] block/accounting: Use lock guard macros

2020-12-11 Thread Kevin Wolf
From: Gan Qixin Replace manual lock()/unlock() calls with lock guard macros (QEMU_LOCK_GUARD/WITH_QEMU_LOCK_GUARD) in block/accounting. Signed-off-by: Gan Qixin Reviewed-by: Paolo Bonzini Message-Id: <20201203075055.127773-2-ganqi...@huawei.com> Signed-off-by: Kevin Wolf --- block/accounting

[PULL 03/34] block/throttle-groups: Use lock guard macros

2020-12-11 Thread Kevin Wolf
From: Gan Qixin Replace manual lock()/unlock() calls with lock guard macros (QEMU_LOCK_GUARD/WITH_QEMU_LOCK_GUARD) in block/throttle-groups. Signed-off-by: Gan Qixin Message-Id: <20201203075055.127773-4-ganqi...@huawei.com> Signed-off-by: Kevin Wolf --- block/throttle-groups.c | 48 ++

[PULL 05/34] meson: Detect libfuse

2020-12-11 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Message-Id: <20201027190600.192171-2-mre...@redhat.com> Signed-off-by: Kevin Wolf --- meson_options.txt | 2 ++ configure | 7 +++ meson.build | 6 ++ 3 files changed, 15 insertions(+) diff --git a/meson_options.txt b/meson_option

Re: [PATCH v3 1/5] gitlab-ci: Document 'build-tcg-disabled' is a KVM X86 job

2020-12-11 Thread Wainer dos Santos Moschetta
Hi, On 12/7/20 10:14 AM, Philippe Mathieu-Daudé wrote: Document what this job cover (build X86 targets with KVM being the single accelerator available). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.yml | 5 + 1 file changed, 5 insertions(+) Reviewed-b

[PULL 21/34] iotests: Give access to the qemu-storage-daemon

2020-12-11 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Message-Id: <20201027190600.192171-18-mre...@redhat.com> Signed-off-by: Kevin Wolf --- tests/qemu-iotests/check | 11 +++ tests/qemu-iotests/common.rc | 17 + 2 files changed, 28 insertions(+) diff --git a/tests/qemu-iotests

[PULL 07/34] fuse: Implement standard FUSE operations

2020-12-11 Thread Kevin Wolf
From: Max Reitz This makes the export actually useful instead of only producing errors whenever it is accessed. Signed-off-by: Max Reitz Message-Id: <20201027190600.192171-4-mre...@redhat.com> Signed-off-by: Kevin Wolf --- block/export/fuse.c | 242

[PULL 12/34] iotests: Do not pipe _make_test_img

2020-12-11 Thread Kevin Wolf
From: Max Reitz Executing _make_test_img as part of a pipe will undo all variable changes it has done. As such, this could not work with FUSE (because we want to remember all of our exports and their qemu instances). Replace the pipe by a temporary file in 071 and 174 (the two tests that can ru

[PULL 23/34] iotests: Enable fuse for many tests

2020-12-11 Thread Kevin Wolf
From: Max Reitz Many tests (that do not support generic protocols) can run just fine with FUSE-exported images, so allow them to. Note that this is no attempt at being definitely complete. There are some tests that might be modified to run on FUSE, but this patch still skips them. This patch o

[PULL 08/34] fuse: Allow growable exports

2020-12-11 Thread Kevin Wolf
From: Max Reitz These will behave more like normal files in that writes beyond the EOF will automatically grow the export size. As an optimization, keep the RESIZE permission for growable exports so we do not have to take it for every post-EOF write. (This permission is not released when the ex

[PULL 04/34] block/iscsi: Use lock guard macros

2020-12-11 Thread Kevin Wolf
From: Gan Qixin Replace manual lock()/unlock() calls with lock guard macros (QEMU_LOCK_GUARD/WITH_QEMU_LOCK_GUARD) in block/iscsi. Signed-off-by: Gan Qixin Message-Id: <20201203075055.127773-5-ganqi...@huawei.com> Signed-off-by: Kevin Wolf --- block/iscsi.c | 50 --

[PULL 33/34] block: Fix locking in qmp_block_resize()

2020-12-11 Thread Kevin Wolf
The drain functions assume that we hold the AioContext lock of the drained block node. Make sure to actually take the lock. Cc: qemu-sta...@nongnu.org Fixes: eb94b81a94bce112e6b206df846c1551aaf6cab6 Signed-off-by: Kevin Wolf Message-Id: <20201203172311.68232-3-kw...@redhat.com> Reviewed-by: Vladi

[PULL 20/34] storage-daemon: Call bdrv_close_all() on exit

2020-12-11 Thread Kevin Wolf
From: Max Reitz Otherwise, exports and block devices are not properly shut down and closed, unless the users explicitly issues blockdev-del and block-export-del commands for each of them. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Message-Id: <20201027190600.192171-17-mre...@redhat.com>

[PULL 10/34] fuse: Implement hole detection through lseek

2020-12-11 Thread Kevin Wolf
From: Max Reitz This is a relatively new feature in libfuse (available since 3.8.0, which was released in November 2019), so we have to add a dedicated check whether it is available before making use of it. Signed-off-by: Max Reitz Message-Id: <20201027190600.192171-7-mre...@redhat.com> Signed-

[PULL 19/34] iotests/287: Clean up subshell test image

2020-12-11 Thread Kevin Wolf
From: Max Reitz 287 creates an image in a subshell (thanks to the pipe) to see whether that is possible with compression_type=zstd. If _make_test_img were to modify any global state, this global state would then be lost before we could cleanup the image. When using FUSE as the test protocol, th

[PULL 06/34] fuse: Allow exporting BDSs via FUSE

2020-12-11 Thread Kevin Wolf
From: Max Reitz block-export-add type=fuse allows mounting block graph nodes via FUSE on some existing regular file. That file should then appears like a raw disk image, and accesses to it result in accesses to the exported BDS. Right now, we only implement the necessary block export functions

[PULL 34/34] block: Fix deadlock in bdrv_co_yield_to_drain()

2020-12-11 Thread Kevin Wolf
If bdrv_co_yield_to_drain() is called for draining a block node that runs in a different AioContext, it keeps that AioContext locked while it yields and schedules a BH in the AioContext to do the actual drain. As long as executing the BH is the very next thing that the event loop of the node's Aio

[PULL 13/34] iotests: Use convert -n in some cases

2020-12-11 Thread Kevin Wolf
From: Max Reitz qemu-img convert (without -n) can often be replaced by a combination of _make_test_img + qemu-img convert -n. Doing so allows converting to protocols that do not allow direct file creation, such as FUSE exports. The only problem is that for formats other than qcow2 and qed (qcow1

[PULL 22/34] iotests: Allow testing FUSE exports

2020-12-11 Thread Kevin Wolf
From: Max Reitz This pretends FUSE exports are a kind of protocol. As such, they are always tested under the format node. This is probably the best way to test them, actually, because this will generate more I/O load and more varied patterns. Signed-off-by: Max Reitz Message-Id: <202010271906

[PULL 09/34] fuse: (Partially) implement fallocate()

2020-12-11 Thread Kevin Wolf
From: Max Reitz This allows allocating areas after the (old) EOF as part of a growing resize, writing zeroes, and discarding. Signed-off-by: Max Reitz Message-Id: <20201027190600.192171-6-mre...@redhat.com> Signed-off-by: Kevin Wolf --- block/export/fuse.c | 84 +++

[PULL 14/34] iotests/046: Avoid renaming images

2020-12-11 Thread Kevin Wolf
From: Max Reitz This generally does not work on non-file protocols. It is better to create the image with the final name from the start, and most tests do this already. Let 046 follow suit. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Message-Id: <20201027190600.192171-11-mre...@redhat.c

[PULL 25/34] file-posix: check the use_lock before setting the file lock

2020-12-11 Thread Kevin Wolf
From: Li Feng The scenario is that when accessing a volume on an NFS filesystem without supporting the file lock, Qemu will complain "Failed to lock byte 100", even when setting the file.locking = off. We should do file lock related operations only when the file.locking is enabled, otherwise, t

Re: [PATCH v11 18/25] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-11 Thread Claudio Fontana
On 12/11/20 6:10 PM, Claudio Fontana wrote: > On 12/11/20 6:05 PM, Richard Henderson wrote: >> On 12/11/20 2:31 AM, Claudio Fontana wrote: >>> From: Eduardo Habkost >>> >>> Signed-off-by: Eduardo Habkost >>> [claudio: wrapped in CONFIG_TCG] >>> Signed-off-by: Claudio Fontana >>> Reviewed-by: Phi

[PULL 11/34] iotests: Do not needlessly filter _make_test_img

2020-12-11 Thread Kevin Wolf
From: Max Reitz In most cases, _make_test_img does not need a _filter_imgfmt on top. It does that by itself. (The exception is when IMGFMT has been overwritten but TEST_IMG has not. In such cases, we do need a _filter_imgfmt on top to filter the test's original IMGFMT from TEST_IMG.) Signed-of

[PULL 16/34] iotests/091: Use _cleanup_qemu instad of "wait"

2020-12-11 Thread Kevin Wolf
From: Max Reitz If the test environment has some other child processes running (like a storage daemon that provides a FUSE export), then "wait" will never finish. Use wait=yes _cleanup_qemu instead. (We need to discard the output so there is no change to the reference output.) Signed-off-by: M

[PATCH 05/20] qobject: Change qobject_to_json()'s value to GString

2020-12-11 Thread Markus Armbruster
qobject_to_json() and qobject_to_json_pretty() build a GString, then covert it to QString. Just one of the callers actually needs a QString: qemu_rbd_parse_filename(). A few others need a string they can modify: qmp_send_response(), qga's send_response(), to_json_str(), and qmp_fd_vsend_fds(). T

[PULL 15/34] iotests: Derive image names from $TEST_IMG

2020-12-11 Thread Kevin Wolf
From: Max Reitz Avoid creating images with custom filenames in $TEST_DIR, because non-file protocols may want to keep $TEST_IMG (and all other test images) in some other directory. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Message-Id: <20201027190600.192171-12-mre...@redhat.com> Signed-

[PULL 26/34] iotests/221: Discard image before qemu-img map

2020-12-11 Thread Kevin Wolf
From: Max Reitz See the new comment for why this should be done. I do not have a reproducer on master, but when using FUSE block exports, this test breaks depending on the underlying filesystem (for me, it works on tmpfs, but fails on xfs, because the block allocated by file-posix has 16 kB ther

[PATCH 11/20] Revert "qobject: let object_property_get_str() use new API"

2020-12-11 Thread Markus Armbruster
Commit aafb21a0b9 "qobject: let object_property_get_str() use new API" isn't much of a simplification. Not worth having object_property_get_str() differ from the other object_property_get_FOO(). Revert. This reverts commit aafb21a0b9cea5fa0fe52e68111bb6bd13837a02. Cc: Paolo Bonzini Cc: Daniel

[PULL 17/34] iotests: Restrict some Python tests to file

2020-12-11 Thread Kevin Wolf
From: Max Reitz Most Python tests are restricted to the file protocol (without explicitly saying so), but these are the ones that would break ./check -fuse -qcow2. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Message-Id: <20201027190600.192171-14-mre...@redhat.com> Signed-off-by: Kevin Wol

[PULL 18/34] iotests: Let _make_test_img guess $TEST_IMG_FILE

2020-12-11 Thread Kevin Wolf
From: Max Reitz When most iotests want to create a test image that is named differently from the default $TEST_IMG, they do something like this: TEST_IMG="$TEST_IMG.base" _make_test_img $options This works fine with the "file" protocol, but not so much for anything else: _make_test_img trie

[PULL 27/34] can-host: Fix crash when 'canbus' property is not set

2020-12-11 Thread Kevin Wolf
Providing the 'if' property, but not 'canbus' segfaults like this: #0 0x55b0f14d in can_bus_insert_client (bus=0x0, client=0x56aa9af0) at ../net/can/can_core.c:88 #1 0x559c3803 in can_host_connect (ch=0x56aa9ac0, errp=0x7fffd568) at ../net/can/can_host.c:62 #2 0

[RFC PATCH 1/2] gitlab-ci: Step in to maintain the fedora-i386-cross runner

2020-12-11 Thread Philippe Mathieu-Daudé
As I am interested in using the runner based on the fedora-i386-cross docker image, add a smoke test job to be sure this image is usable, and set the JOB_MAINTAINER_NAME/JOB_MAINTAINER_EMAIL variables so other developers can contact me in case there is a problem with the public runner based on this

[PULL 24/34] iotests/308: Add test for FUSE exports

2020-12-11 Thread Kevin Wolf
From: Max Reitz We have good coverage of the normal I/O paths now, but what remains is a test that tests some more special cases: Exporting an image on itself (thus turning a formatted image into a raw one), some error cases, and non-writable and non-growable exports. Signed-off-by: Max Reitz R

[PULL 30/34] block/io: bdrv_check_byte_request(): drop bdrv_is_inserted()

2020-12-11 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Move bdrv_is_inserted() calls into callers. We are going to make bdrv_check_byte_request() a clean thing. bdrv_is_inserted() is not about checking the request, it's about checking the bs. So, it should be separate. With this patch we probably change error path

[PULL 31/34] block: introduce BDRV_MAX_LENGTH

2020-12-11 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We are going to modify block layer to work with 64bit requests. And first step is moving to int64_t type for both offset and bytes arguments in all block request related functions. It's mostly safe (when widening signed or unsigned int to int64_t), but switchin

Re: [PATCH v11 09/25] i386: move cpu dump out of helper.c into cpu-dump.c

2020-12-11 Thread Claudio Fontana
On 12/11/20 5:13 PM, Richard Henderson wrote: > On 12/11/20 2:31 AM, Claudio Fontana wrote: >> Signed-off-by: Claudio Fontana >> Reviewed-by: Alex Bennée >> --- >> target/i386/cpu.h | 1 + >> target/i386/cpu-dump.c | 537 >> target/i386/helper.c

[PATCH 08/20] qobject: Move internals to qobject-internal.h

2020-12-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/qmp/qbool.h | 2 -- include/qapi/qmp/qdict.h | 2 -- include/qapi/qmp/qlist.h | 2 -- include/qapi/qmp/qnull.h | 2 -- include/qapi/qmp/qnum.h| 3 --- include/qapi/qmp/qobject.h | 9 + include/qapi/qmp/qstring.h | 2 --

[PULL 28/34] block/file-posix: fix workaround in raw_do_pwrite_zeroes()

2020-12-11 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We should not set overlap_bytes: 1. Don't worry: it is calculated by bdrv_mark_request_serialising() and will be equal to or greater than bytes anyway. 2. If the request was already aligned up to some greater alignment, than we may break things: we reduc

Re: [PATCH v14 10/13] qapi: block-stream: add "bottom" argument

2020-12-11 Thread Max Reitz
On 11.12.20 17:50, Vladimir Sementsov-Ogievskiy wrote: 11.12.2020 19:05, Max Reitz wrote: On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: The code already don't freeze base node and we try to make it prepared for the situation when base node is changed during the operation. In other word

Re: [PATCH v11 18/25] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-11 Thread Claudio Fontana
On 12/11/20 6:05 PM, Richard Henderson wrote: > On 12/11/20 2:31 AM, Claudio Fontana wrote: >> From: Eduardo Habkost >> >> Signed-off-by: Eduardo Habkost >> [claudio: wrapped in CONFIG_TCG] >> Signed-off-by: Claudio Fontana >> Reviewed-by: Philippe Mathieu-Daudé >> Reviewed-by: Alex Bennée >>

[PATCH 06/20] Revert "qstring: add qstring_free()"

2020-12-11 Thread Markus Armbruster
This reverts commit 164c374b75f87c6765a705c4418ab7005a2d356f. A free function for a reference-counted object is in bad taste. Fortunately, this one is now also unused. Drop it. Signed-off-by: Markus Armbruster --- include/qapi/qmp/qstring.h | 1 - qobject/qstring.c | 27 +

[PULL 29/34] block/io: bdrv_refresh_limits(): use ERRP_GUARD

2020-12-11 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy This simplifies following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201203222713.13507-3-vsement...@virtuozzo.com> Reviewed-by: Alberto Garcia Signed-off-by: Kevin Wolf --- block/io.c | 7 +++ 1 file changed, 3 insertions(+), 4

Re: [PATCH v11 18/25] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-11 Thread Richard Henderson
On 12/11/20 11:10 AM, Claudio Fontana wrote: > On 12/11/20 6:05 PM, Richard Henderson wrote: >> On 12/11/20 2:31 AM, Claudio Fontana wrote: >>> From: Eduardo Habkost >>> >>> Signed-off-by: Eduardo Habkost >>> [claudio: wrapped in CONFIG_TCG] >>> Signed-off-by: Claudio Fontana >>> Reviewed-by: Ph

[PATCH 14/20] qobject: Factor quoted_str() out of to_json()

2020-12-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qobject/qjson.c | 110 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/qobject/qjson.c b/qobject/qjson.c index 2f690c1816..962214f5a7 100644 --- a/qobject/qjson.c +++ b/qobject/qjson.c @@ -156,6

[PATCH 12/20] qobject: Drop qobject_get_try_str()

2020-12-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/qmp/qstring.h | 1 - qobject/qstring.c | 11 --- 2 files changed, 12 deletions(-) diff --git a/include/qapi/qmp/qstring.h b/include/qapi/qmp/qstring.h index e4ac761a22..56034dae54 100644 --- a/include/qapi/qmp/qstring.h +++ b/in

[PULL 32/34] block: Simplify qmp_block_resize() error paths

2020-12-11 Thread Kevin Wolf
The only thing that happens after the 'out:' label is blk_unref(blk). However, blk = NULL in all of the error cases, so instead of jumping to 'out:', we can just return directly. Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf Message-Id: <20201203172311.68232-2-kw...@redhat.com> Reviewed-by

Re: [PATCH v14 10/13] qapi: block-stream: add "bottom" argument

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
11.12.2020 20:24, Max Reitz wrote: On 11.12.20 17:50, Vladimir Sementsov-Ogievskiy wrote: 11.12.2020 19:05, Max Reitz wrote: On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: The code already don't freeze base node and we try to make it prepared for the situation when base node is changed

[PATCH 03/20] qobject: Make qobject_to_json_pretty() take a pretty argument

2020-12-11 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/qmp/qjson.h | 2 +- monitor/qmp.c| 2 +- qemu-img.c | 8 qobject/qjson.c | 28 +++- qom/qom-hmp-cmds.c | 2 +- tests/qtest/libqtest.c | 2 +- 6 files changed, 19 inse

[PATCH 10/20] block: Avoid qobject_get_try_str()

2020-12-11 Thread Markus Armbruster
I'm about to remove qobject_get_try_str(). Use qstring_get_str() instead. Safe because the argument is known to be a QString here. Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-bl...@nongnu.org Signed-off-by: Markus Armbruster --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 02/20] monitor: Use GString instead of QString for output buffer

2020-12-11 Thread Markus Armbruster
GString has a richer set of string operations than QString. It should be preferred to QString except where we need a QObject or reference counting. We don't here. Switch to GString, and put its richer interface to use. Cc: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster --- monitor/m

Re: [PATCH v11 22/25] target/arm: do not use cc->do_interrupt for KVM directly

2020-12-11 Thread Richard Henderson
On 12/11/20 2:31 AM, Claudio Fontana wrote: > cc->do_interrupt is in theory a TCG callback used in accel/tcg only, > to prepare the emulated architecture to take an interrupt as defined > in the hardware specifications, > > but in reality the _do_interrupt style of functions in targets are > also

[PATCH 17/20] json: Use GString instead of QString to accumulate strings

2020-12-11 Thread Markus Armbruster
QString supports modifying its string, but it's quite limited: you can only append. The remaining callers use it for building an initial string, never for modifying it later. Change parse_string() to do build the initial string with GString. This is another step towards making QString immutable.

[PATCH 19/20] block: Use GString instead of QString to build filenames

2020-12-11 Thread Markus Armbruster
QString supports modifying its string, but it's quite limited: you can only append. Just one caller remains: bdrv_parse_filename_strip_prefix() uses it just for building an initial string. Change it to do build the initial string with GString. This is another step towards making QString immutabl

[PATCH 04/20] qobject: Use GString instead of QString to accumulate JSON

2020-12-11 Thread Markus Armbruster
QString supports modifying its string, but it's quite limited: you can only append. The remaining callers use it for building an initial string, never for modifying it later. Use of GString for building the initial string is actually more convenient here. Change qobject_to_json() & friends to do

[PATCH 18/20] keyval: Use GString to accumulate value strings

2020-12-11 Thread Markus Armbruster
QString supports modifying its string, but it's quite limited: you can only append. The remaining callers use it for building an initial string, never for modifying it later. Change keyval_parse_one() to do build the initial string with GString. This is another step towards making QString immutab

[PATCH 07/20] hw/rdma: Replace QList by GQueue

2020-12-11 Thread Markus Armbruster
RdmaProtectedQList provides a thread-safe queue of int64_t on top of a QList. rdma_protected_qlist_destroy() calls qlist_destroy_obj() directly. qlist_destroy_obj() is actually for use by qobject_destroy() only. The next commit will make that obvious. The minimal fix would be calling qobject_unre

[PATCH 01/20] hmp: Simplify how qmp_human_monitor_command() gets output

2020-12-11 Thread Markus Armbruster
Commit 48c043d0d1 "hmp: human-monitor-command: stop using the Memory chardev driver" left us "if string is non-empty, duplicate it, else duplicate the empty string". Meh. Duplicate it unconditionally. Cc: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster --- monitor/misc.c | 6 +- 1

[PATCH 20/20] qobject: Make QString immutable

2020-12-11 Thread Markus Armbruster
The functions to modify a QString's string are all unused now. Drop them, and make the string immutable. Saves 16 bytes per QString on my system. Signed-off-by: Markus Armbruster --- include/qapi/qmp/qstring.h | 8 + qobject/qstring.c | 65 ++

[PATCH 15/20] qobject: Factor JSON writer out of qobject_to_json()

2020-12-11 Thread Markus Armbruster
We have two JSON writers written in C: qobject/qjson.c provides qobject_to_json(), and migration/qjson.c provides a more low level imperative interface. They don't share code. The latter tacitly limits numbers to int64_t, and strings contents to characters that don't need escaping. Factor out qo

[PATCH 00/20] Immutable QString, and also one JSON writer less

2020-12-11 Thread Markus Armbruster
Based-on: <20201210161452.2813491-1-arm...@redhat.com> Cc: Daniel P. Berrangé Cc: Dr. David Alan Gilbert Cc: Eduardo Habkost Cc: Juan Quintela Cc: Kevin Wolf Cc: Marcel Apfelbaum Cc: Max Reitz Cc: Paolo Bonzini Cc: Yuval Shaia Cc: qemu-bl...@nongnu.org Markus Armbruster (20): hmp: Simp

[PATCH 13/20] qobject: Drop qstring_get_try_str()

2020-12-11 Thread Markus Armbruster
No users left outside tests/, and the ones in tests/ can just as well use qstring_get_str(). Do that, and drop the function. Signed-off-by: Markus Armbruster --- include/qapi/qmp/qstring.h | 1 - qobject/qstring.c | 10 -- tests/check-qjson.c| 11 +-- 3 files c

[PATCH 09/20] qmp: Fix tracing of non-string command IDs

2020-12-11 Thread Markus Armbruster
Tracepoints monitor_qmp_cmd_in_band and monitor_qmp_cmd_out_of_band (commit cf869d5317 "qmp: support out-of-band (oob) execution") treat non-string "id" like absent "id". Fix that. Signed-off-by: Markus Armbruster --- monitor/qmp.c | 30 ++ 1 file changed, 18 insertio

[PATCH 16/20] migration: Replace migration's JSON writer by the general one

2020-12-11 Thread Markus Armbruster
Commit 8118f0950f "migration: Append JSON description of migration stream" needs a JSON writer. The existing qobject_to_json() wasn't a good fit, because it requires building a QObject to convert. Instead, migration got its very own JSON writer, in commit 190c882ce2 "QJSON: Add JSON writer". It

Re: [PATCH v11 16/25] target/riscv: remove CONFIG_TCG, as it is always TCG

2020-12-11 Thread Claudio Fontana
On 12/11/20 5:56 PM, Richard Henderson wrote: > On 12/11/20 2:31 AM, Claudio Fontana wrote: >> for now only TCG is allowed as an accelerator for riscv, >> so remove the CONFIG_TCG use. >> >> Signed-off-by: Claudio Fontana >> Reviewed-by: Alistair Francis >> --- >> target/riscv/cpu.c | 3 +-- >>

Re: [PATCH v14 13/13] block: apply COR-filter to block-stream jobs

2020-12-11 Thread Max Reitz
On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich This patch completes the series with the COR-filter applied to block-stream operations. Adding the filter makes it possible in future implement discarding copied regions in backing files during the block-stream job,

[PATCH 2/3] tests/acceptance/machine_s390_ccw_virtio: Test virtio-rng via /dev/hwrng

2020-12-11 Thread Thomas Huth
/dev/hwrng is only functional if virtio-rng is working right, so let's add a sanity check for this device node. Signed-off-by: Thomas Huth --- tests/acceptance/machine_s390_ccw_virtio.py | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/machi

Re: [PATCH v11 10/25] i386: move TCG cpu class initialization out of helper.c

2020-12-11 Thread Claudio Fontana
On 12/11/20 5:44 PM, Richard Henderson wrote: > On 12/11/20 2:31 AM, Claudio Fontana wrote: >> Signed-off-by: Claudio Fontana >> --- >> target/i386/cpu.h | 97 ++--- >> target/i386/tcg/helper-tcg.h | 112 ++ >> target/i386/tcg/

[RFC PATCH 0/2] gitlab-ci: Maintain a public runner, allow manual pipeline

2020-12-11 Thread Philippe Mathieu-Daudé
Yet another attempt to make GitLab-CI inclusive to the all users from the QEMU community. We allow manual pipeline for some users, letting default to all jobs started. Also I step in to maintain in my work time the public runner based on Fedora that we use for the X86 32-bit builds, because I don

[PATCH 3/3] tests/acceptance/machine_s390_ccw_virtio: Test the virtio-balloon device

2020-12-11 Thread Thomas Huth
Inflate the balloon and check whether the size of the memory changes. Signed-off-by: Thomas Huth --- tests/acceptance/machine_s390_ccw_virtio.py | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/machine_s390_ccw_virtio.py b/tests/acceptance/machin

[PATCH 1/3] tests/acceptance: Extract the code to clear dmesg and wait for CRW reports

2020-12-11 Thread Thomas Huth
We will use this in more spots soon, so it's easier to put this into a separate function. Signed-off-by: Thomas Huth --- tests/acceptance/machine_s390_ccw_virtio.py | 30 - 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/tests/acceptance/machine_s390_ccw_virti

[RFC PATCH 2/2] gitlab-ci: Introduce allow_skipping_job_template

2020-12-11 Thread Philippe Mathieu-Daudé
It might be overkill (and frustrating) to rerun all the jobs when iterating over a single code unit. As some users are interested in only rerunning a specific set of jobs, allow them to use a "manual" profile, when jobs are created in the pipeline but not started. It is up to the user to manually s

Re: [PATCH v11 18/25] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-11 Thread Claudio Fontana
On 12/11/20 6:47 PM, Claudio Fontana wrote: > On 12/11/20 6:28 PM, Richard Henderson wrote: >> On 12/11/20 11:10 AM, Claudio Fontana wrote: >>> On 12/11/20 6:05 PM, Richard Henderson wrote: On 12/11/20 2:31 AM, Claudio Fontana wrote: > From: Eduardo Habkost > > Signed-off-by: Edua

Re: [PATCH v11 19/25] cpu: Move cpu_exec_* to tcg_ops

2020-12-11 Thread Richard Henderson
On 12/11/20 2:31 AM, Claudio Fontana wrote: > From: Eduardo Habkost > > Signed-off-by: Eduardo Habkost > [claudio: wrapped in CONFIG_TCG] > Signed-off-by: Claudio Fontana > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Alex Bennée > --- > include/hw/core/cpu.h | 6 -- > i

Re: [PATCH v14 13/13] block: apply COR-filter to block-stream jobs

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
11.12.2020 20:21, Max Reitz wrote: On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: From: Andrey Shinkevich This patch completes the series with the COR-filter applied to block-stream operations. Adding the filter makes it possible in future implement discarding copied regions in backin

Re: [PATCH v11 20/25] cpu: Move tlb_fill to tcg_ops

2020-12-11 Thread Richard Henderson
On 12/11/20 2:31 AM, Claudio Fontana wrote: > From: Eduardo Habkost > > Signed-off-by: Eduardo Habkost > [claudio: wrapped in CONFIG_TCG] > Signed-off-by: Claudio Fontana > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Alex Bennée > --- > include/hw/core/cpu.h | 9 - >

Recall: [PATCH v15 0/4] Add Versal usb model

2020-12-11 Thread Sai Pavan Boddu
Sai Pavan Boddu would like to recall the message, "[PATCH v15 0/4] Add Versal usb model".

[PATCH 0/3] tests/acceptance: Test virtio-rng and -balloon on s390x

2020-12-11 Thread Thomas Huth
Add two more simple tests to check that virtio-rng and virtio-balloon are at least (very) basically working on s390x. Based-on: 20201204121450.120730-1-coh...@redhat.com Thomas Huth (3): tests/acceptance: Extract the code to clear dmesg and wait for CRW reports tests/acceptance/machine_s3

Recall: [PATCH v15 0/4] Add Versal usb model

2020-12-11 Thread Sai Pavan Boddu
Sai Pavan Boddu would like to recall the message, "[PATCH v15 0/4] Add Versal usb model".

Re: [PATCH v11 24/25] cpu: move cc->transaction_failed to tcg_ops

2020-12-11 Thread Richard Henderson
On 12/11/20 2:31 AM, Claudio Fontana wrote: > @@ -848,7 +842,7 @@ static inline void cpu_unaligned_access(CPUState *cpu, > vaddr addr, > > cc->do_unaligned_access(cpu, addr, access_type, mmu_idx, retaddr); > } > - > +#ifdef CONFIG_TCG > static inline void cpu_transaction_failed(CPUState *

Re: [PATCH v11 21/25] cpu: Move debug_excp_handler to tcg_ops

2020-12-11 Thread Richard Henderson
On 12/11/20 2:31 AM, Claudio Fontana wrote: > From: Eduardo Habkost > > Signed-off-by: Eduardo Habkost > Signed-off-by: Claudio Fontana > Reviewed-by: Alex Bennée > --- > include/hw/core/cpu.h | 2 -- > include/hw/core/tcg-cpu-ops.h | 2 ++ > accel/tcg/cpu-exec.c | 4 ++-- >

Re: [PATCH v11 25/25] cpu: move do_unaligned_access to tcg_ops

2020-12-11 Thread Richard Henderson
On 12/11/20 2:31 AM, Claudio Fontana wrote: > +++ b/include/hw/core/tcg-cpu-ops.h > @@ -66,6 +66,13 @@ typedef struct TcgCpuOperations { >unsigned size, MMUAccessType access_type, >int mmu_idx, MemTxAttrs attrs, >

Re: [PATCH v11 18/25] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-11 Thread Claudio Fontana
On 12/11/20 6:28 PM, Richard Henderson wrote: > On 12/11/20 11:10 AM, Claudio Fontana wrote: >> On 12/11/20 6:05 PM, Richard Henderson wrote: >>> On 12/11/20 2:31 AM, Claudio Fontana wrote: From: Eduardo Habkost Signed-off-by: Eduardo Habkost [claudio: wrapped in CONFIG_TCG] >

Re: [PATCH v11 18/25] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-11 Thread Richard Henderson
On 12/11/20 11:47 AM, Claudio Fontana wrote: >> What is it that you thought you needed from core/cpu.h anyway? ... Are you sure that splitting out hw/core/tcg-cpu-ops.h from hw/core/cpu.h in patch 15 is even useful? >>> >>> it avoids a huge #ifdef CONFIG_TCG >> >> So? The question should

Re: [PATCH v14 10/13] qapi: block-stream: add "bottom" argument

2020-12-11 Thread Max Reitz
On 11.12.20 18:42, Vladimir Sementsov-Ogievskiy wrote: 11.12.2020 20:24, Max Reitz wrote: On 11.12.20 17:50, Vladimir Sementsov-Ogievskiy wrote: 11.12.2020 19:05, Max Reitz wrote: On 04.12.20 23:07, Vladimir Sementsov-Ogievskiy wrote: The code already don't freeze base node and we try to make

Re: [PATCH v11 23/25] cpu: move cc->do_interrupt to tcg_ops

2020-12-11 Thread Richard Henderson
On 12/11/20 2:31 AM, Claudio Fontana wrote: > Signed-off-by: Claudio Fontana > Reviewed-by: Alex Bennée > --- > include/hw/core/cpu.h | 2 -- > include/hw/core/tcg-cpu-ops.h | 3 +++ > accel/tcg/cpu-exec.c| 4 ++-- > target/alpha/cpu.c | 2 +- > target/ar

Re: [PATCH v11 18/25] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-11 Thread Richard Henderson
On 12/11/20 12:15 PM, Claudio Fontana wrote: > Should I return this file to the original state (without the extra #includes > that pretend it to be a standalone header file, > and call it > > tcg-cpu-ops.h.inc > > ? If this header can work with qemu/typedefs.h, then no, because the circularity

Re: Some performance numbers for virtiofs, DAX and virtio-9p

2020-12-11 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > On Thu, Dec 10, 2020 at 08:29:21PM +0100, Miklos Szeredi wrote: > > On Thu, Dec 10, 2020 at 5:11 PM Vivek Goyal wrote: > > > > > Conclusion > > > --- > > > - virtiofs DAX seems to help a lot in many workloads. > > > > > > Note, DAX performance

[PATCH v4 00/16] 64bit block-layer: part I

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
Hi all! We want 64bit write-zeroes, and for this, convert all io functions to 64bit. We chose signed type, to be consistent with off_t (which is signed) and with possibility for signed return type (where negative value means error). Please refer to initial cover-letter https://lists.gnu.org/ar

[PATCH 1/3] tests/acceptance: Bump avocado requirements to 83.0

2020-12-11 Thread Wainer dos Santos Moschetta
To use Avocado's testlogs plug-in on CI it is required to use its 83.0 or greater version. Signed-off-by: Wainer dos Santos Moschetta --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index a1c631fa59..6

[PATCH 2/3] gitlab-ci: Refactor code that show logs of failed acceptances

2020-12-11 Thread Wainer dos Santos Moschetta
Replace the code (python) on after_script of the acceptance jobs that is currently used to show the logs of failed tests. Instead it is used the Avocado's testlogs plug-in which works likewise. Signed-off-by: Wainer dos Santos Moschetta --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+)

[PATCH v4 01/16] block: refactor bdrv_check_request: add errp

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
It's better to pass &error_abort than just assert that result is 0: on crash, we'll immediately see the reason in the backtrace. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block_int.h| 2 +- block/file-posix.c | 2 +- block/io.c | 29 +

Re: [PATCH v11 18/25] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-11 Thread Philippe Mathieu-Daudé
On 12/11/20 7:22 PM, Richard Henderson wrote: > On 12/11/20 12:15 PM, Claudio Fontana wrote: >> Should I return this file to the original state (without the extra #includes >> that pretend it to be a standalone header file, >> and call it >> >> tcg-cpu-ops.h.inc >> >> ? > > If this header can wor

[PATCH v4 02/16] util/iov: make qemu_iovec_init_extended() honest

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
Actually, we can't extend the io vector in all cases. Handle possible MAX_IOV and size_t overflows. For now add assertion to callers (actually they rely on success anyway) and fix them in the following patch. Add also some additional good assertions to qemu_iovec_init_slice() while being here. S

[PATCH 3/3] gitlab-ci: Archive logs of acceptance tests

2020-12-11 Thread Wainer dos Santos Moschetta
Keep the logs of acceptance tests for two days on GitLab. If you want to make it available for more time, click on the 'Keep' button on the Job page at web UI. By default GitLab will archive artifacts only if the job succeed. Instead let's keep it on both success and failure, so it gives the oppor

Re: [PATCH 10/20] block: Avoid qobject_get_try_str()

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
11.12.2020 20:11, Markus Armbruster wrote: I'm about to remove qobject_get_try_str(). Use qstring_get_str() instead. Safe because the argument is known to be a QString here. Cc: Kevin Wolf Cc: Max Reitz Cc:qemu-bl...@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Vladimir Sementsov

[PATCH v4 03/16] block: fix theoretical overflow in bdrv_init_padding()

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
Calculation of sum may theoretically overflow, so use 64bit type and add some good assertions. Use int64_t constantly. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index 21e8a50725.

[PATCH v4 05/16] block/io: bdrv_pad_request(): support qemu_iovec_init_extended failure

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
Make bdrv_pad_request() honest: return error if qemu_iovec_init_extended() failed. Update also bdrv_padding_destroy() to clean the structure for safety. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 45 +++-- 1 file changed, 31 insertions(+

[PATCH v4 15/16] block/io: support int64_t bytes in read/write wrappers

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the whole disk. We chose signed type, to be consistent with off_t (which is signed) and with possibili

FW: [PATCH v15 0/4] Add Versal usb model

2020-12-11 Thread Sai Pavan Boddu
Hi, Finally, usb series got accepted. I thank Vikram and Edgar for the great support. Regards, Sai Pavan -Original Message- From: Peter Maydell Sent: Friday, December 11, 2020 9:40 PM To: Sai Pavan Boddu Cc: Markus Armbruster ; Marc-André Lureau ; Paolo Bonzini ; Gerd Hoffmann ; Ed

[PATCH v4 04/16] block/io: refactor bdrv_pad_request(): move bdrv_pad_request() up

2020-12-11 Thread Vladimir Sementsov-Ogievskiy
Prepare to the following patch when bdrv_pad_request() will be able to fail. Update the comments. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/block/io.c b/block/io.c index d9bc67f1b0..dc

<    1   2   3   4   5   >