Re: [PATCH 02/11] qapi/misc-target: Group SEV QAPI definitions

2021-06-10 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 6/10/21 11:39 AM, Markus Armbruster wrote: >> Just code motion, so >> >> Acked-by: Markus Armbruster >> >> Opportunity to wrap the long doc comment lines. Should be kept under 70 >> or so. > > Hmm is that a QAPI specific requirement? It is not enforced by

Re: [PATCH v2 17/18] modules: check arch and block load on mismatch

2021-06-10 Thread Daniel P . Berrangé
On Thu, Jun 10, 2021 at 07:57:54AM +0200, Gerd Hoffmann wrote: > Add module_allow_arch() to set the target architecture. > In case a module is limited to some arch verify arches > match and ignore the module if not. > > Signed-off-by: Gerd Hoffmann > --- > include/qemu/module.h | 1 + >

R: [RFC PATCH 0/5] ppc/Pegasos2 VOF

2021-06-10 Thread luigi burdo
Hi Zoltan, i dont know if you know and if in the docs is described the pegasos II can support smp dual G4 cpu. Here some hystorical info about this great machine from the past Phase 5 A\BOX (kosmoplovci.net). i remember really good that

Re: [PATCH v2] semihosting/arm-compat: remove heuristic softmmu SYS_HEAPINFO

2021-06-10 Thread Peter Maydell
On Thu, 10 Jun 2021 at 11:26, Alex Bennée wrote: > > The previous numbers were a guess at best. While we could extract the > information from a loaded ELF file via -kernel we could still get > tripped up by self decompressing or relocating code. Besides sane > library code like newlib will fall

Re: [PATCH 2/2] nbd: Add new qemu:joint-allocation metadata context

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
10.06.2021 02:52, Nir Soffer wrote: On Wed, Jun 9, 2021 at 9:01 PM Eric Blake wrote: When trying to reconstruct a qcow2 chain using information provided over NBD, ovirt had been relying on an unsafe assumption that any portion of the qcow2 file advertised as sparse would defer to the backing

Re: [PATCH 0/4] modules: add support for target-specific modules.

2021-06-10 Thread Gerd Hoffmann
On Thu, Jun 10, 2021 at 12:34:14PM +0200, Claudio Fontana wrote: > On 6/10/21 12:15 PM, Gerd Hoffmann wrote: > > Based on the "modules: add metadata database" patch series sent > > earlier today. Adds support for target-specific modules to the > > module code and build infrastructure. Builds one

Re: [PATCH 1/2] iotests: Improve and rename test 309 to nbd-qemu-allocation

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
09.06.2021 21:01, Eric Blake wrote: Enhance the test to inspect what qemu-nbd is advertising during handshake, and rename it now that we support useful iotest names. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH v6 9/9] iotests: Test replacing files with x-blockdev-reopen

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
From: Alberto Garcia This patch adds new tests in which we use x-blockdev-reopen to change bs->file Signed-off-by: Alberto Garcia --- tests/qemu-iotests/245 | 109 - tests/qemu-iotests/245.out | 11 +++- 2 files changed, 117 insertions(+), 3

[PATCH v6 7/9] block: BDRVReopenState: drop replace_backing_bs field

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
It's used only in bdrv_reopen_commit(). "backing" is covered by the loop through all children except for case when we removed backing child during reopen. Make it more obvious and drop extra boolean field: qdict_del will not fail if there is no such entry. Signed-off-by: Vladimir

Re: [PATCH v4 0/6] Allow changing bs->file on reopen

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
09.06.2021 19:40, Vladimir Sementsov-Ogievskiy wrote: 09.06.2021 18:53, Kevin Wolf wrote: Am 14.05.2021 um 17:53 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi Alberto! What are your plans for v5? I'm now finishing a new series which makes backup-top filter public, and I want to base it on

[PATCH v6 3/9] block: bdrv_reopen_parse_backing(): don't check aio context

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We don't need this check: bdrv_set_backing_noperm() will do it anyway (actually in bdrv_attach_child_common()). Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 33 - 1 file changed, 33 deletions(-) diff --git a/block.c b/block.c index

[PATCH v6 8/9] block: Allow changing bs->file on reopen

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
From: Alberto Garcia When the x-blockdev-reopen was added it allowed reconfiguring the graph by replacing backing files, but changing the 'file' option was forbidden. Because of this restriction some operations are not possible, notably inserting and removing block filters. This patch adds

[PATCH v6 6/9] block: move supports_backing check to bdrv_set_file_or_backing_noperm()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Move supports_backing check of bdrv_reopen_parse_backing to called (through bdrv_set_backing_noperm()) bdrv_set_file_or_backing_noperm() function. The check applies to general case, so it's appropriate for bdrv_set_file_or_backing_noperm(). We have to declare backing support for two test drivers,

[PATCH v6 1/9] block: introduce bdrv_remove_file_or_backing_child()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
To be used for reopen in future commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/block.c b/block.c index 98673e788a..d21c9e4316 100644 --- a/block.c +++ b/block.c @@ -4795,17 +4795,16 @@

[PATCH v6 4/9] block: bdrv_reopen_parse_backing(): don't check frozen child

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
bdrv_set_backing_noperm() takes care of it (actual check is in bdrv_set_file_or_backing_noperm()), so we don't need to check it here. While being here, improve error message a bit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c| 14 +-

[PATCH v6 2/9] block: introduce bdrv_set_file_or_backing_noperm()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
To be used for reopen in future commit. Notes: - It seems OK to update inherits_from if new bs is recursively inherits from parent bs. Let's just not check for backing_chain_contains, to support file child of non-filters. - Simply check child->frozen instead of

[PATCH v6 5/9] block: bdrv_reopen_parse_backing(): simplify handling implicit filters

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
The logic around finding overlay here is not obvious. Actually it does two simple things: 1. If new bs is already in backing chain, split from parent bs by several implicit filters we are done, do nothing. 2. Otherwise, don't try to replace implicit filter. Let's rewrite this in more obvious

[PATCH v6 0/9] Allow changing bs->file on reopen

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Note that this is only "subject" part of original Alberto's "[PATCH v4 0/6] Allow changing bs->file on reopen" which also included multiple reopen and dropping x- prefix of reopen together with some refactoring. v6: rebased 08: changed error message in test 09: somehow, now '.' are spread in test

[PATCH v5 33/35] iotests/image-fleecing: rename tgt_node

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Actually target of backup(sync=None) is not a final backup target: image fleecing is intended to be used with external tool, which will copy data from fleecing node to some real backup target. Also, we are going to add a test case for "push backup with fleecing", where instead of exporting

[PATCH v5 35/35] iotests/image-fleecing: add test-case for copy-before-write filter

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
New fleecing method becomes available: copy-before-write filter. Actually we don't need backup job to setup image fleecing. Add test for new recommended way of image fleecing. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/tests/image-fleecing |

[PATCH v5 29/35] iotests/222: constantly use single quotes for strings

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
The file use both single and double quotes for strings. Let's be consistent. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/222 | 68 +- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git

[PATCH v5 30/35] iotests: move 222 to tests/image-fleecing

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Give a good name to test file. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/{222 => tests/image-fleecing} | 0 tests/qemu-iotests/{222.out => tests/image-fleecing.out} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename

[PATCH v5 32/35] iotests/image-fleecing: proper source device

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Define scsi device to operate with it by qom-set in further patch. Give a new node-name to source block node, to not look like device name. Job now don't want to work without giving explicit id, so, let's call it "fleecing". Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PATCH v5 31/35] iotests.py: hmp_qemu_io: support qdev

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 025e288ddd..9d0031a0e8 100644 ---

[PATCH v5 22/35] block/block-copy: make setting progress optional

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Now block-copy will crash if user don't set progress meter by block_copy_set_progress_meter(). copy-before-write filter will be used in separate of backup job, and it doesn't want any progress meter (for now). So, allow not setting it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max

[PATCH v5 34/35] iotests/image-fleecing: prepare for adding new test-case

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We are going to add a test-case with some behavior modifications. So, let's prepare a function to be reused. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/tests/image-fleecing | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-)

[PATCH v5 26/35] python/qemu/machine: QEMUMachine: improve qmp() method

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We often call qmp() with unpacking dict, like qmp('foo', **{...}). mypy don't really like it, it thinks that passed unpacked dict is a positional argument and complains that it type should be bool (because second argument of qmp() is conv_keys: bool). Allow passing dict directly, simplifying

[PATCH v5 28/35] iotests/222: fix pylint and mypy complains

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Here: - long line - move to new interface of vm.qmp() (direct passing dict), to avoid mypy false-positive, as it thinks that unpacked dict is a positional argument. - extra parenthesis - handle event_wait possible None value Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max

[PATCH v5 25/35] python/qemu/machine.py: refactor _qemu_args()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
- use shorter construction - don't create new dict if not needed - drop extra unpacking key-val arguments - drop extra default values Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Reviewed-by: John Snow --- python/qemu/machine/machine.py | 18 -- 1

[PATCH v5 16/35] block/copy-before-write: introduce cbw_init()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Move part of bdrv_cbw_append() to new function cbw_open(). It's an intermediate step for adding normal .bdrv_open() handler to the filter. With this commit no logic is changed, but we have a function which will be turned into .bdrv_open() handler in future commit. Signed-off-by: Vladimir

[PATCH v5 21/35] block/copy-before-write: initialize block-copy bitmap

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter to be used in separate of backup. Future step would support bitmap for the filter. But let's start from full set bitmap. We have to modify backup, as bitmap is first initialized by copy-before-write filter, and then backup modifies it.

[PATCH v5 27/35] iotests.py: VM: add own __enter__ method

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
In superclass __enter__ method is defined with return value type hint 'QEMUMachine'. So, mypy thinks that return value of VM.__enter__ is QEMUMachine. Let's redefine __enter__ in VM class, to give it correct type hint. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz ---

[PATCH v5 13/35] block/copy-before-write: drop extra bdrv_unref on failure path

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
bdrv_attach_child() do bdrv_unref() on failure, so we shouldn't do it by hand here. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/copy-before-write.c b/block/copy-before-write.c index

[PATCH v5 23/35] block/copy-before-write: make public block driver

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Finally, copy-before-write gets own .bdrv_open and .bdrv_close handlers, block_init() call and becomes available through bdrv_open(). To achieve this: - cbw_init gets unused flags argument and becomes cbw_open - block_copy_state_free() call moved to new cbw_close() - in bdrv_cbw_append: -

[PATCH v5 20/35] block/copy-before-write: cbw_init(): use options

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
One more step closer to .bdrv_open(): use options instead of plain arguments. Move to bdrv_open_child() calls, native for drive open handlers. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 29 +++-- 1 file changed, 15 insertions(+), 14

[PATCH v5 18/35] block/copy-before-write: cbw_init(): use file child after attaching

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
In the next commit we'll get rid of source argument of cbw_init(). Prepare to it now, to make next commit simpler: move the code block that uses source below attaching the child and use bs->file->bs instead of source variable. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PATCH v5 19/35] block/copy-before-write: bdrv_cbw_append(): drop unused compress arg

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.h | 1 - block/backup.c| 2 +- block/copy-before-write.c | 7 +++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/block/copy-before-write.h b/block/copy-before-write.h index

[PATCH v5 17/35] block/copy-before-write: cbw_init(): rename variables

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
One more step closer to real .bdrv_open() handler: use more usual names for bs being initialized and its state. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-)

[PATCH v5 24/35] qapi: publish copy-before-write filter

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- qapi/block-core.json | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 2ea294129e..6c1ce86235 100644 ---

[PATCH v5 15/35] block/copy-before-write: bdrv_cbw_append(): replace child at last

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Refactor the function to replace child at last. Thus we don't need to revert it and code is simplified. block-copy state initialization being done before replacing the child doesn't need any drained section. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz ---

[PATCH v5 14/35] block/copy-before-write: use file child instead of backing

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter, and there no public backing-child-based filter in Qemu. No reason to create a precedent, so let's refactor copy-before-write filter instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 39

[PATCH v5 10/35] block/backup: set copy_range and compress after filter insertion

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter, so it would be initialized through options. Still we don't want to publish compress and copy-range options, as 1. Modern way to enable compression is to use compress filter. 2. For copy-range it's unclean how to make proper interface: - it's has

[PATCH v5 09/35] block/block-copy: introduce block_copy_set_copy_opts()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We'll need a possibility to set compress and use_copy_range options after initialization of the state. So make corresponding part of block_copy_state_new() separate and public. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 2 ++ block/block-copy.c | 56

[PATCH v5 11/35] block/backup: move cluster size calculation to block-copy

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
The main consumer of cluster-size is block-copy. Let's calculate it here instead of passing through backup-top. We are going to publish copy-before-write filter soon, so it will be created through options. But we don't want for now to make explicit option for cluster-size, let's continue to

[PATCH v5 05/35] qdev-properties: PropertyInfo: add realized_set_allowed field

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Add field, so property can declare support for setting the property when device is realized. To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/hw/qdev-properties.h | 1 + hw/core/qdev-properties.c| 6 +++--- 2 files changed,

[PATCH v5 06/35] qdev: allow setting drive property for realized device

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We need an ability to insert filters above top block node, attached to block device. It can't be achieved with blockdev-reopen command. So, we want do it with help of qom-set. Intended usage: Assume there is a node A that is attached to some guest device. 1. blockdev-add to create a filter node

[PATCH v5 07/35] block: rename backup-top to copy-before-write

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We are going to convert backup_top to full featured public filter, which can be used in separate of backup job. Start from renaming from "how it used" to "what it does". While updating comments in 283 iotest, drop and rephrase also things about ".active", as this field is now dropped, and filter

[PATCH v5 12/35] block/copy-before-write: relax permission requirements when no parents

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We are going to publish copy-before-write filter. So, user should be able to create it with blockdev-add first, specifying both filtered and target children. And then do blockdev-reopen, to actually insert the filter where needed. Currently, filter unshares write permission unconditionally on

[PATCH v5 01/35] block: rename bdrv_replace_child to bdrv_replace_child_tran

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We have bdrv_replace_child() wrapper on bdrv_replace_child_noperm(). But bdrv_replace_child() doesn't update permissions. It's rather strange, as normally it's expected that foo() should call foo_noperm() and update permissions. Let's rename and add comment. Signed-off-by: Vladimir

[PATCH v5 00/35] block: publish backup-top filter

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Hi all! v5: rebase on master 25: fix pylint complain 'Unnecessary "else" after "return"' [John] 25-26: rebased on moved machine.py use Dict[str, object] typing instead of Dict[str, Any] [John] add John's r-b, keep Max's r-b Patches without r-b: 9, 10, 19, 20 v4: rebase on Kevin's

[PATCH v5 04/35] block: introduce blk_replace_bs

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Add function to change bs inside blk. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/sysemu/block-backend.h | 1 + block/block-backend.c | 8 2 files changed, 9 insertions(+) diff --git a/include/sysemu/block-backend.h

[PATCH v5 08/35] block-copy: always set BDRV_REQ_SERIALISING flag

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
It won't hurt in common case, so let's not bother with detecting image fleecing. Also, we want to simplify initialization interface of copy-before-write filter as we are going to make it public. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.h

[PATCH 3/6] tests/acceptance: add replay kernel test for openrisc

2021-06-10 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on openrisc platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk --- tests/acceptance/replay_kernel.py | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH 5/6] tests/acceptance: add replay kernel test for alpha

2021-06-10 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on alpha platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk --- tests/acceptance/replay_kernel.py | 17 + 1 file changed, 17 insertions(+) diff --git

[PATCH v5 03/35] block: introduce bdrv_replace_child_bs()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block.h | 2 ++ block.c | 31 +++ 2 files changed, 33 insertions(+) diff --git a/include/block/block.h

[PATCH v5 02/35] block: comment graph-modifying function not updating permissions

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block.c | 8 1 file changed, 8 insertions(+) diff --git a/block.c b/block.c index 34bfe4ffe8..98673e788a 100644 --- a/block.c +++ b/block.c @@ -2770,6 +2770,8 @@ static TransactionActionDrv

[PATCH 2/6] tests/acceptance: add replay kernel test for ppc64

2021-06-10 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on ppc64 platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk --- tests/acceptance/boot_linux_console.py | 12 1 file changed, 12 insertions(+) diff --git

[PATCH 4/6] tests/acceptance: add replay kernel test for nios2

2021-06-10 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on nios2 platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk --- tests/acceptance/replay_kernel.py | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH 6/6] tests/acceptance: Linux boot test for record/replay

2021-06-10 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch adds a test for record/replay, which boots Linux image from the disk and interacts with the network. The idea and code of this test is borrowed from boot_linux.py This test includes only x86_64 platform. Other platforms and machines will be added later after

[PATCH 1/6] tests/acceptance: add replay kernel test for s390

2021-06-10 Thread Pavel Dovgalyuk
This patch adds record/replay test which boots Linux kernel on s390x platform. The test uses kernel binaries taken from boot_linux_console test. Signed-off-by: Pavel Dovgalyuk --- tests/acceptance/replay_kernel.py | 16 1 file changed, 16 insertions(+) diff --git

[PATCH 0/6] More record/replay acceptance tests

2021-06-10 Thread Pavel Dovgalyuk
The following series adds new record/replay tests to the acceptance group. The provided tests perform kernel boot and disk image boot scenarios. For all of them recording and replaying phases are executed. Tests were borrowed from existing boot_linux*.py tests. New tests include kernel boot for

Re: [PATCH v3 2/5] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
10.06.2021 13:46, Emanuele Giuseppe Esposito wrote: On 10/06/2021 12:27, Vladimir Sementsov-Ogievskiy wrote: 10.06.2021 13:14, Emanuele Giuseppe Esposito wrote: On 09/06/2021 11:12, Vladimir Sementsov-Ogievskiy wrote: 08.06.2021 10:33, Emanuele Giuseppe Esposito wrote: As done in

Re: [RFC PATCH 0/5] ppc/Pegasos2 VOF

2021-06-10 Thread David Gibson
On Thu, Jun 10, 2021 at 12:04:59PM +0200, BALATON Zoltan wrote: > > > On Thu, 10 Jun 2021, David Gibson wrote: > > > On Thu, Jun 10, 2021 at 05:14:45PM +1000, Alexey Kardashevskiy wrote: > > > > > > > > > On 6/9/21 20:28, BALATON Zoltan wrote: > > > > On Wed, 9 Jun 2021, Alexey Kardashevskiy

Re: [RFC PATCH v2 1/2] qapi: Inline qmp_marshal_output() functions

2021-06-10 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 6/10/21 11:33 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On Wed, Jun 09, 2021 at 08:49:54PM +0200, Philippe Mathieu-Daudé wrote: In case we need to use QAPI types but no QAPI command / QAPI event actually use them, the generated

Re: [PATCH v2] semihosting/arm-compat: remove heuristic softmmu SYS_HEAPINFO

2021-06-10 Thread Peter Maydell
On Thu, 10 Jun 2021 at 11:26, Alex Bennée wrote: > > The previous numbers were a guess at best. While we could extract the > information from a loaded ELF file via -kernel we could still get > tripped up by self decompressing or relocating code. Besides sane > library code like newlib will fall

Re: [PATCH v3 2/5] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-10 Thread Emanuele Giuseppe Esposito
On 10/06/2021 12:27, Vladimir Sementsov-Ogievskiy wrote: 10.06.2021 13:14, Emanuele Giuseppe Esposito wrote: On 09/06/2021 11:12, Vladimir Sementsov-Ogievskiy wrote: 08.06.2021 10:33, Emanuele Giuseppe Esposito wrote: As done in BlockCopyCallState, categorize BlockCopyTask and

[PATCH 2/4] modules: check arch on qom lookup

2021-06-10 Thread Gerd Hoffmann
With target-specific modules we can have multiple modules implementing the same object. Therefore we have to check the target arch on lookup to find the correct module. Signed-off-by: Gerd Hoffmann --- util/module.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/util/module.c

Re: [PATCH v3 2/5] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-10 Thread Emanuele Giuseppe Esposito
On 09/06/2021 11:12, Vladimir Sementsov-Ogievskiy wrote: 08.06.2021 10:33, Emanuele Giuseppe Esposito wrote: As done in BlockCopyCallState, categorize BlockCopyTask and BlockCopyState in IN, State and OUT fields. This is just to understand which field has to be protected with a lock.

[PATCH 1/4] modules: factor out arch check

2021-06-10 Thread Gerd Hoffmann
Move check to helper function for easy reuse. No functional change. Signed-off-by: Gerd Hoffmann --- util/module.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/util/module.c b/util/module.c index 4f98cc74ae37..860c257fc56e 100644 ---

[PATCH v4 28/32] block/nbd: split nbd_co_do_establish_connection out of nbd_reconnect_attempt

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Split out the part that we want to reuse for nbd_open(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 80 - 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 411435c155..8caeafc8d3

Re: [PATCH v3 2/5] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
10.06.2021 13:14, Emanuele Giuseppe Esposito wrote: On 09/06/2021 11:12, Vladimir Sementsov-Ogievskiy wrote: 08.06.2021 10:33, Emanuele Giuseppe Esposito wrote: As done in BlockCopyCallState, categorize BlockCopyTask and BlockCopyState in IN, State and OUT fields. This is just to understand

[PATCH v4 32/32] block/nbd: safer transition to receiving request

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
req->receiving is a flag of request being in one concrete yield point in nbd_co_do_receive_one_chunk(). Such kind of boolean flag is always better to unset before scheduling the coroutine, to avoid double scheduling. So, let's be more careful. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PATCH v4 29/32] nbd/client-connection: add option for non-blocking connection attempt

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We'll need a possibility of non-blocking nbd_co_establish_connection(), so that it returns immediately, and it returns success only if a connections was previously established in background. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- include/block/nbd.h | 2 +-

[PATCH v2] semihosting/arm-compat: remove heuristic softmmu SYS_HEAPINFO

2021-06-10 Thread Alex Bennée
The previous numbers were a guess at best. While we could extract the information from a loaded ELF file via -kernel we could still get tripped up by self decompressing or relocating code. Besides sane library code like newlib will fall back to known symbols to determine of the location of the

Re: [PATCH 0/4] modules: add support for target-specific modules.

2021-06-10 Thread Claudio Fontana
On 6/10/21 12:15 PM, Gerd Hoffmann wrote: > Based on the "modules: add metadata database" patch series sent > earlier today. Adds support for target-specific modules to the > module code and build infrastructure. Builds one simple module > (virtio-9p-device) for testing purposes. Well, one

[PATCH v4 31/32] block/nbd: add nbd_client_connected() helper

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We already have two similar helpers for other state. Let's add another one for convenience. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/nbd.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/block/nbd.c

[PATCH v4 22/32] block/nbd: split nbd_handle_updated_info out of nbd_client_handshake()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
To be reused in the following patch. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Roman Kagan Reviewed-by: Eric Blake --- block/nbd.c | 100 ++-- 1 file changed, 58 insertions(+), 42 deletions(-) diff --git a/block/nbd.c

[PATCH 4/4] modules: build virtio-9p modular

2021-06-10 Thread Gerd Hoffmann
Simple target for testing  Signed-off-by: Gerd Hoffmann --- hw/9pfs/virtio-9p-device.c | 2 ++ hw/9pfs/meson.build| 11 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 14371a78efd8..9a2df7b5126d

[PATCH v4 14/32] block/nbd: rename NBDConnectThread to NBDClientConnection

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We are going to move the connection code to its own file, and want clear names and APIs first. The structure is shared between user and (possibly) several runs of connect-thread. So it's wrong to call it "thread". Let's rename to something more generic. Appropriately rename connect_thread and

Re: [PATCH 02/11] qapi/misc-target: Group SEV QAPI definitions

2021-06-10 Thread Philippe Mathieu-Daudé
On 6/10/21 11:39 AM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> There is already a section with various SEV commands / types, >> so move the SEV guest attestation together. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> qapi/misc-target.json | 75

[PATCH v4 16/32] block/nbd: introduce nbd_client_connection_release()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
This is a last step of creating bs-independent nbd connection interface. With next commit we can finally move it to separate file. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 45 +++-- 1 file changed, 27 insertions(+), 18 deletions(-)

[PATCH v4 19/32] nbd/client-connection: add possibility of negotiation

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Add arguments and logic to support nbd negotiation in the same thread after successful connection. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 9 +++- block/nbd.c | 4 +- nbd/client-connection.c | 105 ++-- 3

[PATCH v4 23/32] block/nbd: use negotiation of NBDClientConnection

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Now that we can opt in to negotiation as part of the client connection thread, use that to simplify connection_co. This is another step on the way to moving all reconnect code into NBDClientConnection. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/nbd.c | 44

[PATCH v4 30/32] block/nbd: reuse nbd_co_do_establish_connection() in nbd_open()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
The only last step we need to reuse the function is coroutine-wrapper. nbd_open() may be called from non-coroutine context. So, generate the wrapper and use it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/coroutines.h | 6 +++ block/nbd.c| 103

Re: [PATCH 04/55] target/arm: Add handling for PSR.ECI/ICI

2021-06-10 Thread Peter Maydell
On Tue, 8 Jun 2021 at 00:33, Richard Henderson wrote: > > On 6/7/21 9:57 AM, Peter Maydell wrote: > > +void clear_eci_state(DisasContext *s) > > +{ > > +/* > > + * Clear any ECI/ICI state: used when a load multiple/store > > + * multiple insn executes. > > + */ > > +if

[PATCH v4 15/32] block/nbd: introduce nbd_client_connection_new()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
This is a step of creating bs-independent nbd connection interface. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Roman Kagan Reviewed-by: Eric Blake --- block/nbd.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index

[PATCH v4 18/32] nbd/client-connection: use QEMU_LOCK_GUARD

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We don't update connect_thread_func() to use QEMU_LOCK_GUARD, as it will get more complex critical sections logic in further commit, where QEMU_LOCK_GUARD doesn't help. Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/client-connection.c | 99 +++-- 1 file

[PATCH 3/4] modules: target-specific module build infrastructure

2021-06-10 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- meson.build | 26 ++ 1 file changed, 26 insertions(+) diff --git a/meson.build b/meson.build index 9823c5889140..a22c26850429 100644 --- a/meson.build +++ b/meson.build @@ -1781,6 +1781,7 @@ user_ss = ss.source_set() util_ss =

[PATCH v4 27/32] block-coroutine-wrapper: allow non bdrv_ prefix

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We are going to reuse the script to generate a nbd_ function in further commit. Prepare the script now. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- scripts/block-coroutine-wrapper.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH v4 17/32] nbd: move connection code from block/nbd to nbd/client-connection

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We now have bs-independent connection API, which consists of four functions: nbd_client_connection_new() nbd_client_connection_release() nbd_co_establish_connection() nbd_co_establish_connection_cancel() Move them to a separate file together with NBDClientConnection structure which

[PATCH v4 13/32] block/nbd: make nbd_co_establish_connection_cancel() bs-independent

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
nbd_co_establish_connection_cancel() actually needs only pointer to NBDConnectThread. So, make it clean. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Roman Kagan Reviewed-by: Eric Blake --- block/nbd.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff

[PATCH 0/4] modules: add support for target-specific modules.

2021-06-10 Thread Gerd Hoffmann
Based on the "modules: add metadata database" patch series sent earlier today. Adds support for target-specific modules to the module code and build infrastructure. Builds one simple module (virtio-9p-device) for testing purposes. Well, one module per target to be exact ;) Gerd Hoffmann (4):

[PATCH v4 25/32] block/nbd: drop BDRVNBDState::sioc

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Currently sioc pointer is used just to pass from socket-connection to nbd negotiation. Drop the field, and use local variables instead. With next commit we'll update nbd/client-connection.c to behave appropriately (return only top-most ioc, not two channels). Signed-off-by: Vladimir

[PATCH v4 05/32] qemu-sockets: introduce socket_address_parse_named_fd()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Add function that transforms named fd inside SocketAddress structure into number representation. This way it may be then used in a context where current monitor is not available. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/sockets.h | 14 ++ util/qemu-sockets.c|

[PATCH v4 11/32] block/nbd: drop thr->state

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
We don't need all these states. The code refactored to use two boolean variables looks simpler. While moving the comment in nbd_co_establish_connection() rework it to give better information. Also, we are going to move the connection code to separate file and mentioning drained section would be

[PATCH v4 20/32] nbd/client-connection: implement connection retry

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Add an option for a thread to retry connection until succeeds. We'll use nbd/client-connection both for reconnect and for initial connection in nbd_open(), so we need a possibility to use same NBDClientConnection instance to connect once in nbd_open() and then use retry semantics for reconnect.

[PATCH v4 24/32] block/nbd: don't touch s->sioc in nbd_teardown_connection()

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
Negotiation during reconnect is now done in a thread, and s->sioc is not available during negotiation. Negotiation in thread will be cancelled by nbd_client_connection_release() called from nbd_clear_bdrvstate(). So, we don't need this code chunk anymore. Signed-off-by: Vladimir

[PATCH v4 04/32] block/nbd: connect_thread_func(): do qio_channel_set_delay(false)

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
nbd_open() does it (through nbd_establish_connection()). Actually we lost that call on reconnect path in 1dc4718d849e1a1fe "block/nbd: use non-blocking connect: fix vm hang on connect()" when we have introduced reconnect thread. Fixes: 1dc4718d849e1a1fe665ce5241ed79048cfa2cfc Signed-off-by:

[PATCH v4 09/32] block/nbd: BDRVNBDState: drop unused connect_err and connect_status

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
These fields are write-only. Drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Roman Kagan Reviewed-by: Eric Blake --- block/nbd.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 77b85ca471..fdfb1ff7a1 100644

[PATCH v4 26/32] nbd/client-connection: return only one io channel

2021-06-10 Thread Vladimir Sementsov-Ogievskiy
block/nbd doesn't need underlying sioc channel anymore. So, we can update nbd/client-connection interface to return only one top-most io channel, which is more straight forward. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- include/block/nbd.h | 4 ++--

<    1   2   3   4   5   >