Re: [PATCH v2 2/4] block: Collapse padded I/O vecs exceeding IOV_MAX

2023-04-11 Thread Vladimir Sementsov-Ogievskiy
ot implemented twice. Buglink:https://bugzilla.redhat.com/show_bug.cgi?id=2141964 Signed-off-by: Hanna Czenczek Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH] block: add configure options for excluding vmdk, vhdx and vpc

2023-04-11 Thread Vladimir Sementsov-Ogievskiy
Let's add --enable / --disable configure options for these formats, so that thous who don't need them may not build them. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/meson.build | 18 +- meson.build | 3 +++ meson_options.txt

[PATCH] replication: compile out some staff when replication is not configured

2023-04-11 Thread Vladimir Sementsov-Ogievskiy
Don't compile-in replication-related files when replication is disabled in config. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all! I'm unsure, should it be actually separate --disable-colo / --enable-colo options or it's really used only together with replication staff.. So, I decided

Re: [PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-04-06 Thread Vladimir Sementsov-Ogievskiy
On 06.04.23 19:51, Hanna Czenczek wrote: On 05.04.23 11:59, Vladimir Sementsov-Ogievskiy wrote: On 04.04.23 20:32, Hanna Czenczek wrote: On 04.04.23 10:10, Vladimir Sementsov-Ogievskiy wrote: On 03.04.23 16:33, Hanna Czenczek wrote: (Sorry for the rather late reply... Thanks for the review

Re: [PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-04-05 Thread Vladimir Sementsov-Ogievskiy
On 04.04.23 20:32, Hanna Czenczek wrote: On 04.04.23 10:10, Vladimir Sementsov-Ogievskiy wrote: On 03.04.23 16:33, Hanna Czenczek wrote: (Sorry for the rather late reply... Thanks for the review!) On 20.03.23 11:31, Vladimir Sementsov-Ogievskiy wrote: On 17.03.23 20:50, Hanna Czenczek wrote

Re: [PATCH 00/16] qapi qga/qapi-schema: Doc fixes

2023-04-04 Thread Vladimir Sementsov-Ogievskiy
and nothing seems wrong to me. Good cleanup! all patches: Reviewed-by: Vladimir Sementsov-Ogievskiy PS: do you plan some automatic checks in build process to avoid similar style/naming problems in future? -- Best regards, Vladimir

Re: [PATCH 15/16] qapi: Format since information the conventional way: (since X.Y)

2023-04-04 Thread Vladimir Sementsov-Ogievskiy
On 04.04.23 14:59, Markus Armbruster wrote: @@ -2741,7 +2741,7 @@ # # @on-error: the action to take on an error (default report). #'stop' and 'enospc' can only be used if the block device -#supports io-status (see BlockInfo). Since 1.3. +#supports

Re: [PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-04-04 Thread Vladimir Sementsov-Ogievskiy
On 03.04.23 16:33, Hanna Czenczek wrote: (Sorry for the rather late reply... Thanks for the review!) On 20.03.23 11:31, Vladimir Sementsov-Ogievskiy wrote: On 17.03.23 20:50, Hanna Czenczek wrote: [...] diff --git a/block/io.c b/block/io.c index 8974d46941..1e9cdba17a 100644 --- a/block

[PATCH] vhost-user-blk-server: notify client about disk resize

2023-03-21 Thread Vladimir Sementsov-Ogievskiy
this comment, lsblk in linux guest with attached vhost-user-blk-pci device shows new size immediately after block_resize QMP command on vhost-user exported block node. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all! Seems, we have everything except this tiny patch to support live disk resize

Re: [PATCH] python: honour message limit when using pre-opened socket

2023-03-20 Thread Vladimir Sementsov-Ogievskiy
by default Signed-off-by: Daniel P. Berrangé Tested-by: Vladimir Sementsov-Ogievskiy Thanks! -- Best regards, Vladimir

Re: [PATCH 4/4] iotests/iov-padding: New test

2023-03-20 Thread Vladimir Sementsov-Ogievskiy
On 17.03.23 20:50, Hanna Czenczek wrote: Test that even vectored IO requests with 1024 vector elements that are not aligned to the device's request alignment will succeed. Signed-off-by: Hanna Czenczek Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 3/4] util/iov: Remove qemu_iovec_init_extended()

2023-03-20 Thread Vladimir Sementsov-Ogievskiy
to re-implement it in qemu_iovec_concat_iov(), which might also benefit its pre-existing users. Signed-off-by: Hanna Czenczek Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-20 Thread Vladimir Sementsov-Ogievskiy
alse, + , NULL, ); if (ret < 0) { goto fail; } a bit later: tracked_request_end(); bdrv_padding_destroy(); Now, the request is formally finished inside bdrv_padding_destroy().. Not sure, does it really violate something, but seems safer to swap these two calls.

Re: [PATCH 1/4] util/iov: Make qiov_slice() public

2023-03-20 Thread Vladimir Sementsov-Ogievskiy
, thus get the number of elements, and also create an iovec array with the superfluous prefixing elements stripped, so the following processing functions no longer need to skip them.) Signed-off-by: Hanna Czenczek Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v3 3/3] python/qemu/machine: use socketpair() for QMP by default

2023-03-17 Thread Vladimir Sementsov-Ogievskiy
Hi! By my investigation, this commit (bd4c0ef409140bd1be393407c04005ac077d4574) breaks long qmp output again. Simple test: $ cd python $ cat test.py #!/usr/bin/env python3 import sys from qemu.machine import QEMUMachine monitor_address = sys.argv[2] if len(sys.argv) > 2 else None vm =

Re: [RFC 1/2] block: Split padded I/O vectors exceeding IOV_MAX

2023-03-16 Thread Vladimir Sementsov-Ogievskiy
On 15.03.23 15:13, Hanna Czenczek wrote: When processing vectored guest requests that are not aligned to the storage request alignment, we pad them by adding head and/or tail buffers for a read-modify-write cycle. The guest can submit I/O vectors up to IOV_MAX (1024) in length, but with this

Re: [PATCH] coverity: physmem: use simple assertions instead of modelling

2023-03-15 Thread Vladimir Sementsov-Ogievskiy
On 22.02.23 18:57, Peter Maydell wrote: On Wed, 22 Feb 2023 at 14:19, Stefan Hajnoczi wrote: On Wed, 15 Feb 2023 at 15:22, Vladimir Sementsov-Ogievskiy wrote: ping [add Stefan] I'm not familiar with the Coverity models. Peter Maydell is the maintainer. We haven't run Coverity scans

Re: [PATCH nbd 0/4] Enable multi-conn NBD [for discussion only]

2023-03-10 Thread Vladimir Sementsov-Ogievskiy
On 09.03.23 14:39, Richard W.M. Jones wrote: [ Patch series also available here, along with this cover letter and the script used to generate test results: https://gitlab.com/rwmjones/qemu/-/commits/2023-nbd-multi-conn-v1 ] This patch series adds multi-conn support to the NBD block

Re: [PATCH v6 2/4] qapi: add DEVICE_ON and query-hotplug infrastructure

2023-03-09 Thread Vladimir Sementsov-Ogievskiy
On 07.03.23 20:31, Michael S. Tsirkin wrote: On Tue, Mar 07, 2023 at 07:05:35PM +0300, Vladimir Sementsov-Ogievskiy wrote: We have DEVICE_DELETED event, that signals that device_del command is actually completed. But we don't have a counter-part for device_add. Still it's sensible for SHPC

[PATCH v6 1/4] qapi/qdev.json: unite DEVICE_* event data into single structure

2023-03-07 Thread Vladimir Sementsov-Ogievskiy
DEVICE_DELETED and DEVICE_UNPLUG_GUEST_ERROR has equal data, let's refactor it to one structure. That also helps to add new events consistently. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 39 +++ 1 file changed, 27 insertions(+), 12

[PATCH v6 4/4] pcie: implement DEVICE_ON event and query-hotplug

2023-03-07 Thread Vladimir Sementsov-Ogievskiy
For PCIe and SHPC hotplug it's important to track led indicators and "device-on" status. At this step implement the prepared infrastructure in PCIe. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/hw/pci/pcie.h | 2 ++ hw/pci/pcie.c

[PATCH v6 0/4] pci hotplug tracking

2023-03-07 Thread Vladimir Sementsov-Ogievskiy
sequentially in a short time. So, that's not easy:) Let's just drop it for now. - force DEVICE_ON event to be triggered only once per device - flatten query-hotplug output and add device-on status (corresponding to DEVICE_ON event) Vladimir Sementsov-Ogievskiy (4): qapi/qdev.json: unite DEVICE_

[PATCH v6 2/4] qapi: add DEVICE_ON and query-hotplug infrastructure

2023-03-07 Thread Vladimir Sementsov-Ogievskiy
lso, management tool may make a GUI visualization of power indicator with help of this event. As a counter-part add query-hotplug command, that shows "device-on" state as well as some addtional information. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[PATCH v6 3/4] shpc: implement DEVICE_ON event and query-hotplug

2023-03-07 Thread Vladimir Sementsov-Ogievskiy
For PCIe and SHPC hotplug it's important to track led indicators and "device-on" status. At this step, implement the prepared infrastructure in SHPC. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/hw/pci/pci_bridge.h | 2 + include/hw/pci/shpc.h | 2 + inclu

Re: [PATCH 02/43] migration: Pass migrate_caps_check() the old and new caps

2023-03-06 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 19:33, Juan Quintela wrote: We used to pass the old capabilities array and the new capabilities as a list. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 00/43] Migration: Create options.c for capabilities/params/properties

2023-03-06 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 19:33, Juan Quintela wrote: Hi This series move to options.c: - all migration capabilities code - all migration parameters code - all properties code - all qmp commands that only touch the previous And once there: - sort of functions - make consistent and coherent all the functions

Re: [PATCH 01/43] migration: rename enabled_capabilities to capabilities

2023-03-06 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 19:33, Juan Quintela wrote: It is clear from the context what that means, and such a long name with the extra long names of the capabilities make very difficilut to stay inside the 80 columns limit. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best

Re: [PATCH 8/9] mirror: return the remaining dirty bytes upon query

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 15:34, Fiona Ebner wrote: Am 02.03.23 um 11:13 schrieb Vladimir Sementsov-Ogievskiy: On 02.03.23 13:00, Fiona Ebner wrote: Am 01.03.23 um 17:31 schrieb Vladimir Sementsov-Ogievskiy: On 24.02.23 17:48, Fiona Ebner wrote: This can be used by management applications starting

Re: [PULL 31/53] pcie: set power indicator to off on reset by default

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 11:26, Michael S. Tsirkin wrote: From: Vladimir Sementsov-Ogievskiy It should be zero, the only valid values are ON, OFF and BLINK. At any chance, fix s/should be/should not be/ Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin Message-Id

Re: [PATCH 8/9] mirror: return the remaining dirty bytes upon query

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 13:00, Fiona Ebner wrote: Am 01.03.23 um 17:31 schrieb Vladimir Sementsov-Ogievskiy: On 24.02.23 17:48, Fiona Ebner wrote: This can be used by management applications starting with a job in background mode to determine when the switch to active mode should happen. Suggested

Re: [PATCH v5 18/18] qapi: introduce DEVICE_ON event

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 11:44, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:56PM +0300, Vladimir Sementsov-Ogievskiy wrote: We have DEVICE_DELETED event, that signals that device_del command is actually completed. But we don't have a counter-part for device_add. Still it's sensible for SHPC

Re: [PATCH v5 00/18] pci hotplug tracking

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 00:17, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:38PM +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! v5: - don't deprecate IDs and return to ID & QOM scheme - split complicated HOTPLUG_STATE patch into several ones picked up 1-12 Thanks! -- Best reg

Re: [PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 11:53, Michael S. Tsirkin wrote: On Thu, Mar 02, 2023 at 11:45:00AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 02.03.23 11:37, Michael S. Tsirkin wrote: On Thu, Mar 02, 2023 at 11:28:44AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 02.03.23 00:09, Michael S. Tsirkin wrote

Re: [PATCH v5 18/18] qapi: introduce DEVICE_ON event

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 11:50, Michael S. Tsirkin wrote: On Thu, Mar 02, 2023 at 11:39:42AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 02.03.23 00:07, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:56PM +0300, Vladimir Sementsov-Ogievskiy wrote: We have DEVICE_DELETED event, that signals

Re: [PATCH v5 00/18] pci hotplug tracking

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 00:16, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:38PM +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! v5: - don't deprecate IDs and return to ID & QOM scheme - split complicated HOTPLUG_STATE patch into several ones One small point: when you change patc

Re: [PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 11:37, Michael S. Tsirkin wrote: On Thu, Mar 02, 2023 at 11:28:44AM +0300, Vladimir Sementsov-Ogievskiy wrote: On 02.03.23 00:09, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:51PM +0300, Vladimir Sementsov-Ogievskiy wrote: To be used in further patch to identify

Re: [PATCH v5 18/18] qapi: introduce DEVICE_ON event

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 00:07, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:56PM +0300, Vladimir Sementsov-Ogievskiy wrote: We have DEVICE_DELETED event, that signals that device_del command is actually completed. But we don't have a counter-part for device_add. Still it's sensible for SHPC

Re: [PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-03-02 Thread Vladimir Sementsov-Ogievskiy
On 02.03.23 00:09, Michael S. Tsirkin wrote: On Thu, Feb 16, 2023 at 09:03:51PM +0300, Vladimir Sementsov-Ogievskiy wrote: To be used in further patch to identify the device hot-plugged into pcie-root-port. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin Wait a second

Re: [PATCH 8/9] mirror: return the remaining dirty bytes upon query

2023-03-01 Thread Vladimir Sementsov-Ogievskiy
On 24.02.23 17:48, Fiona Ebner wrote: This can be used by management applications starting with a job in background mode to determine when the switch to active mode should happen. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Fiona Ebner --- block/mirror.c | 1 + qapi

Re: [PATCH 5/9] qapi/block-core: turn BlockJobInfo into a union

2023-03-01 Thread Vladimir Sementsov-Ogievskiy
On 24.02.23 17:48, Fiona Ebner wrote: In preparation to additionally return job-type-specific information. Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 4/9] qapi/block-core: use JobType for BlockJobInfo's type

2023-03-01 Thread Vladimir Sementsov-Ogievskiy
On 24.02.23 17:48, Fiona Ebner wrote: In preparation to turn BlockJobInfo into a union with @type as the discriminator. That requires it to be an enum. No functional change is intended. Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 3/9] mirror: implement mirror_change method

2023-03-01 Thread Vladimir Sementsov-Ogievskiy
On 24.02.23 17:48, Fiona Ebner wrote: which allows switching the @copy-mode from 'background' to 'write-blocking'. Once the job is in active mode, no new writes need to be registered in the dirty bitmap, because they are synchronously written to the target. But since the method is called from

Re: [PATCH 0/9] mirror: allow switching from background to active mode

2023-03-01 Thread Vladimir Sementsov-Ogievskiy
On 24.02.23 17:48, Fiona Ebner wrote: With active mode, the guest write speed is limited by the synchronous writes to the mirror target. For this reason, management applications might want to start out in background mode and only switch to active mode later, when certain conditions are met. This

Re: [PATCH 2/9] block/mirror: set actively_synced even after the job is ready

2023-03-01 Thread Vladimir Sementsov-Ogievskiy
On 24.02.23 17:48, Fiona Ebner wrote: In preparation to allow switching from background to active mode. This ensures that setting actively_synced will not be missed when the switch happens after the job is ready. Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-03-01 Thread Vladimir Sementsov-Ogievskiy
On 01.03.23 00:24, Michael S. Tsirkin wrote: Said that checking on destination would need another flag and the safe way of using this feature would require managing two flags instead of one making it even more fragile. So I'd prefer not to make it more complex. In my opinion the best way to use

[PATCH v6 0/7] blockdev-replace

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
not based on recent "[PATCH v7 0/5] block: refactor blockdev transactions". The series may be handled in any order. Vladimir Sementsov-Ogievskiy (7): block-backend: blk_root(): drop const specifier on return type block/export: add blk_by_export_id() block: make bdrv_find_child() fu

[PATCH v6 1/7] block-backend: blk_root(): drop const specifier on return type

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
We'll need get non-const child pointer for graph modifications in further commits. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend-global-state.h | 2 +- block/block-backend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v6 6/7] iotests.py: introduce VM.assert_edges_list() method

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
Add an alternative method to check block graph, to be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

[PATCH v6 7/7] iotests: add filter-insertion

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
Demonstrate new blockdev-replace API for filter insertion and removal. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/filter-insertion | 257 ++ tests/qemu-iotests/tests/filter-insertion.out | 5 + 2 files changed, 262 insertions(+) create mode

[PATCH v6 3/7] block: make bdrv_find_child() function public

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
To be reused soon for blockdev-replace functionality. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block_int-io.h | 1 + block.c | 13 + blockdev.c | 14 -- 3 files changed, 14 insertions(+), 14 deletions(-) diff

[PATCH v6 4/7] qapi: add x-blockdev-replace command

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
Add a command that can replace bs in following BdrvChild structures: - qdev blk root child - block-export blk root child - any child of BlockDriverState selected by child-name Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 62

[PATCH v6 5/7] block: bdrv_get_xdbg_block_graph(): report export ids

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
Currently for block exports we report empty blk names. That's not good. Let's try to find corresponding block export and report its id. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/export.h | 1 + block.c | 4 block/export/export.c | 13

[PATCH v6 2/7] block/export: add blk_by_export_id()

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
We need it for further blockdev-replace functionality. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend-global-state.h | 1 + block/export/export.c | 18 ++ 2 files changed, 19 insertions(+) diff --git a/include/sysemu/block

Re: [PATCH 02/23] mirror: Fix access of uninitialised fields during start

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
it too early. Signed-off-by: Kevin Wolf Probably bitmap initialization and (maybe) some other things in mirror_run() should actually be done in mirror_start_job(). Still: Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 01/23] block: Make bdrv_can_set_read_only() static

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
On 03.02.23 18:21, Kevin Wolf wrote: It is never called outside of block.c. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
to explicitly allow migration. Signed-off-by: Anton Kuchin Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
On 22.02.23 17:21, Anton Kuchin wrote: 1. I see, other similar qdev_prop_* use DEFINE_PROP_SIGNED I don't think this should be signed. Enum values are non-negative so compilers (at least gcc and clang that I checked) evaluate underlying enum type to be unsigned int. I don't know why other

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
On 22.02.23 17:25, Anton Kuchin wrote: +static int vhost_user_fs_pre_save(void *opaque) +{ +    VHostUserFS *fs = opaque; +    g_autofree char *path = object_get_canonical_path(OBJECT(fs)); + +    switch (fs->migration_type) { +    case VHOST_USER_MIGRATION_TYPE_NONE: +   

Re: [PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-22 Thread Vladimir Sementsov-Ogievskiy
On 17.02.23 20:00, Anton Kuchin wrote: Migration of vhost-user-fs device requires transfer of FUSE internal state from backend. There is no standard way to do it now so by default migration must be blocked. But if this state can be externally transferred by orchestrator give it an option to

Re: [PATCH v7 0/5] block: refactor blockdev transactions

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
On 21.02.23 18:50, Vladimir Sementsov-Ogievskiy wrote: Hi all! v7: fixed my email, sorry for the noise. Ohh. fixed in s-o-b, but not in "Author: ". :). Will fix on next version to avoid one more extra resend. Please don't merge with wrong emails. That's a next portion of old go

[PATCH v7 3/5] blockdev: qmp_transaction: refactor loop to classic for

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index 2174ab2694..89c573a094 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2375,7 +2375,7 @@ void

[PATCH v7 4/5] blockdev: transaction: refactor handling transaction properties

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Only backup supports GROUPED mode. Make this logic more clear. And avoid passing extra thing to each action. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 92 +++--- 1 file changed, 19 insertions

[PATCH v7 2/5] blockdev: transactions: rename some things

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Look at qmp_transaction(): dev_list is not obvious name for list of actions. Let's look at qapi spec, this argument is "actions". Let's follow the common practice of using same argument names in qapi scheme and code. To be honest, rename props to

[PATCH v7 1/5] blockdev: refactor transaction to use Transaction API

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy We are going to add more block-graph modifying transaction actions, and block-graph modifying functions are already based on Transaction API. Next, we'll need to separately update permissions after several graph-modifying actions, and this would be simple

[PATCH v7 5/5] blockdev: qmp_transaction: drop extra generic layer

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Let's simplify things: First, actions generally don't need access to common BlkActionState structure. The only exclusion are backup actions that need block_job_txn. Next, for transaction actions of Transaction API is more native to allocated state structure

[PATCH v7 0/5] block: refactor blockdev transactions

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! v7: fixed my email, sorry for the noise. That's a next portion of old good "[PATCH v5 00/45] Transactional block-graph modifying API", rebased to master. Now, refactor QMP transactions implementation into new (relatively) transaction API. Vladimir Sementsov-Ogievskiy (5):

[PATCH v6 1/5] blockdev: refactor transaction to use Transaction API

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy We are going to add more block-graph modifying transaction actions, and block-graph modifying functions are already based on Transaction API. Next, we'll need to separately update permissions after several graph-modifying actions, and this would be simple

[PATCH v6 2/5] blockdev: transactions: rename some things

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Look at qmp_transaction(): dev_list is not obvious name for list of actions. Let's look at qapi spec, this argument is "actions". Let's follow the common practice of using same argument names in qapi scheme and code. To be honest, rename props to

[PATCH v6 3/5] blockdev: qmp_transaction: refactor loop to classic for

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index 2174ab2694..89c573a094 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2375,7 +2375,7 @@ void

[PATCH v6 0/5] block: refactor blockdev transactions

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! That's a next portion of old good "[PATCH v5 00/45] Transactional block-graph modifying API", rebased to master. Now, refactor QMP transactions implementation into new (relatively) transaction API. Vladimir Sementsov-Ogievskiy (5): blockdev: refactor transaction to use Trans

[PATCH v6 4/5] blockdev: transaction: refactor handling transaction properties

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Only backup supports GROUPED mode. Make this logic more clear. And avoid passing extra thing to each action. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 92 +++--- 1 file changed, 19 insertions

[PATCH v6 5/5] blockdev: qmp_transaction: drop extra generic layer

2023-02-21 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Let's simplify things: First, actions generally don't need access to common BlkActionState structure. The only exclusion are backup actions that need block_job_txn. Next, for transaction actions of Transaction API is more native to allocated state structure

Re: online blockdev-backup, a clarification (was: Summary on new backup interfaces in QEMU)

2023-02-20 Thread Vladimir Sementsov-Ogievskiy
On 20.02.23 18:18, John Maline wrote: As a qemu newcomer I had a related question and confusion from reading existing docs. Searching qemu-block, this seemed related to my question so I’ll ask… On Mar 15, 2022, at 12:57 PM, Vladimir Sementsov-Ogievskiy wrote: Hi all! Here I want

git check-rebase - compare branches

2023-02-20 Thread Vladimir Sementsov-Ogievskiy
Hi all! I'd like to share my script for comparing branches, which is a bit like git range-diff and a bit like codyprime/git-scripts/git-backport-diff, and still provide a lot more options. - provide a table of summary, with changed/removed commits between two (or more) branches (like git

[PATCH v5 14/18] qapi/qdev.json: unite DEVICE_* event data into single structure

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
DEVICE_DELETED and DEVICE_UNPLUG_GUEST_ERROR has equal data, let's refactor it to one structure. That also helps to add new events consistently. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 39 +++ 1 file changed, 27 insertions(+), 12

[PATCH v5 00/18] pci hotplug tracking

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
test new events, don't forget -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off flag, to disable ACPI hotplug default. Vladimir Sementsov-Ogievskiy (18): pci/shpc: set attention led to OFF on reset pci/shpc: change shpc_get_status() return type to uint8_t pci/shpc: shpc_slot_com

[PATCH v5 08/18] pcie_regs: drop duplicated indicator value macros

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Anton Kuchin --- include/hw/pci/pcie_regs.h | 9 - hw/pci/pcie.c | 13 +++-- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/include/hw/pci/pcie_regs.h b/include/hw/pci/pcie_regs.h

[PATCH v5 15/18] qapi: add HOTPLUG_STATE infrastructure

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 175 + include/hw/hotplug.h | 12 +++ include/monitor/qdev.h | 5 ++ hw/core/hotplug.c | 13 +++ softmmu/qdev-monitor.c | 50 5 files changed, 255 insertions(+) diff --git a/qapi

[PATCH v5 03/18] pci/shpc: shpc_slot_command(): handle PWRONLY -> ENABLED transition

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
ENABLED -> PWRONLY transition is not allowed and we handle it by shpc_invalid_command(). But PWRONLY -> ENABLED transition is silently ignored, which seems wrong. Let's handle it as correct. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- hw/pci/shpc.

[PATCH v5 07/18] pcie: pcie_cap_slot_write_config(): use correct macro

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
PCI_EXP_SLTCTL_PIC_OFF is a value, and PCI_EXP_SLTCTL_PIC is a mask. Happily PCI_EXP_SLTCTL_PIC_OFF is a maximum value for this mask and is equal to the mask itself. Still the code looks like a bug. Let's make it more reader-friendly. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed

[PATCH v5 09/18] pcie: drop unused PCIExpressIndicator

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
The structure type is unused. Also, it's the only user of corresponding macros, so drop them too. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Anton Kuchin --- include/hw/pci/pcie.h | 8 include/hw/pci/pcie_regs.h | 5 - 2

[PATCH v5 17/18] pcie: implement HOTPLUG_STATE event and query-hotplug

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
For PCIe and SHPC hotplug it's important to track led indicators, especially the power led. At this step implement the prepared infrastructure in PCIe. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/hw/pci/pcie.h | 2 ++ hw/pci/pcie.c | 78

[PATCH v5 11/18] pcie: introduce pcie_sltctl_powered_off() helper

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
s use same pattern everywhere. To simplify things add also a helper. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Anton Kuchin --- hw/pci/pcie.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/pci/pcie.

[PATCH v5 13/18] pci: introduce pci_find_the_only_child()

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
To be used in further patch to identify the device hot-plugged into pcie-root-port. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- include/hw/pci/pci.h | 1 + hw/pci/pci.c | 33 + 2 files changed, 34 insertions(+) diff --git

[PATCH v5 05/18] pci/shpc: pass PCIDevice pointer to shpc_slot_command()

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
We'll need it in further patch to report bridge in QAPI event. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- hw/pci/shpc.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index 959dc470f3

[PATCH v5 10/18] pcie: pcie_cap_slot_enable_power() use correct helper

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
for PCI_EXP_SLTCTL_PWR_OFF constant it will do wrong thing. So, let's use instead pci_word_test_and_clear_mask() which is already used in the file to clear PCI_EXP_SLTCTL_PWR_OFF bit in pcie_cap_slot_init() and pcie_cap_slot_reset(). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin

[PATCH v5 12/18] pcie: set power indicator to off on reset by default

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
It should be zero, the only valid values are ON, OFF and BLINK. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- hw/pci/pcie.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 90faf0710a..b8c24cf45f 100644 --- a/hw/pci/pcie.c

[PATCH v5 06/18] pci/shpc: refactor shpc_device_plug_common()

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
Rename it to shpc_device_get_slot(), to mention what it does rather than how it is used. It also helps to reuse it in further commit. Also, add a return value and get rid of local_err. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- hw/pci/shpc.c | 19

[PATCH v5 18/18] qapi: introduce DEVICE_ON event

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
is finally powered on, power indicator is on and everything is OK for next manipulation on that device. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 10 ++ hw/pci/pcie.c | 14 ++ hw/pci/shpc.c | 12 3 files changed, 36 insertions(+) diff

[PATCH v5 04/18] pci/shpc: more generic handle hot-unplug in shpc_slot_command()

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
Free slot if both conditions (power-led = OFF and state = DISABLED) becomes true regardless of the sequence. It is similar to how PCIe hotplug works. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- hw/pci/shpc.c | 52

[PATCH v5 02/18] pci/shpc: change shpc_get_status() return type to uint8_t

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
The result of the function is always one byte. The result is always assigned to uint8_t variable. Also, shpc_get_status() should be symmetric to shpc_set_status() which has uint8_t value argument. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- hw/pci/shpc.c | 7

[PATCH v5 16/18] shpc: implement HOTPLUG_STATE event and query-hotplug

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
For PCIe and SHPC hotplug it's important to track led indicators, especially the power led. At this step, implement the prepared infrastructure in SHPC. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/hw/pci/pci_bridge.h | 2 + include/hw/pci/shpc.h | 2 + include

[PATCH v5 01/18] pci/shpc: set attention led to OFF on reset

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
0 is not a valid state for the led. Let's start with OFF. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Anton Kuchin --- hw/pci/shpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index fca7f6691a..1b3f619dc9 100644 --- a/hw/pci/shpc.c +++ b/hw

Re: [PATCH] qemu: make version available in coredump

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
On 16.02.23 15:03, Daniel P. Berrangé wrote: On Thu, Feb 16, 2023 at 02:30:16PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 16.02.23 12:44, Daniel P. Berrangé wrote: On Wed, Feb 15, 2023 at 05:05:47PM -0500, Stefan Hajnoczi wrote: On Tue, 7 Jun 2022 at 16:33, Vladimir Sementsov-Ogievskiy

Re: [PATCH] qemu: make version available in coredump

2023-02-16 Thread Vladimir Sementsov-Ogievskiy
On 16.02.23 12:44, Daniel P. Berrangé wrote: On Wed, Feb 15, 2023 at 05:05:47PM -0500, Stefan Hajnoczi wrote: On Tue, 7 Jun 2022 at 16:33, Vladimir Sementsov-Ogievskiy wrote: Add a variable with QEMU_FULL_VERSION definition. Then the content of the variable is easily searchable: strings

Re: [PATCH] qemu: make version available in coredump

2023-02-15 Thread Vladimir Sementsov-Ogievskiy
ping) -- Best regards, Vladimir

Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events

2023-02-15 Thread Vladimir Sementsov-Ogievskiy
:01:01PM +0300, Vladimir Sementsov-Ogievskiy wrote: The device field is redundant, because QOM path always include device ID when this ID exist. The flipside to that view is that applications configuring QEMU are specifying the device ID for -device (CLI) / device_add (QMP) and not the QOM path

Re: [PATCH 0/4] qemu-img: Fix exit code for errors closing the image

2023-02-15 Thread Vladimir Sementsov-Ogievskiy
On 15.02.23 16:07, Markus Armbruster wrote: Kevin Wolf writes: Am 13.01.2023 um 08:30 hat Markus Armbruster geschrieben: Drive-by comment... Kevin Wolf writes: This series addresses the problem described in these bug reports: https://gitlab.com/qemu-project/qemu/-/issues/1330

Re: [PATCH] coverity: physmem: use simple assertions instead of modelling

2023-02-15 Thread Vladimir Sementsov-Ogievskiy
ping [add Stefan] -- Best regards, Vladimir

Re: [PATCH v2 3/3] migration: Rename res_{postcopy,precopy}_only

2023-02-15 Thread Vladimir Sementsov-Ogievskiy
(trace_vfio_state_pending, trace_migrate_pending_estimate, trace_migrate_pending_exact) should be changed correspondingly. with or without: Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

<    2   3   4   5   6   7   8   9   10   11   >