[PATCH v1 1/5] virtio-blk: decouple config size determination code from VirtIOBlock

2022-08-24 Thread Daniil Tatianin
Make it more stand-alone so that we can reuse it for other virtio-blk devices that are not VirtIOBlock in the future commits. Signed-off-by: Daniil Tatianin --- hw/block/virtio-blk.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block

[PATCH v1 4/5] vhost-user-blk: make 'config_wce' part of 'host_features'

2022-08-24 Thread Daniil Tatianin
No reason to have this be a separate field. This also makes it more akin to what the virtio-blk device does. Signed-off-by: Daniil Tatianin --- hw/block/vhost-user-blk.c | 6 ++ include/hw/virtio/vhost-user-blk.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a

[PATCH v1 0/5] vhost-user-blk: dynamically resize config space based on features

2022-08-24 Thread Daniil Tatianin
reusing the code, which was already present in virtio-blk. - Makes the VHostUserBlk structure a bit less clunky by using the 'host_features' field to represent enabled features, as opposed to using a separate field per feature. This was already done for virtio-blk a long time ag

[PATCH v1 5/5] vhost-user-blk: dynamically resize config space based on features

2022-08-24 Thread Daniil Tatianin
igger configuration space, which isn't actually needed since those additional config fields are not active (write-zeroes/discard). Signed-off-by: Daniil Tatianin --- hw/block/vhost-user-blk.c | 15 --- include/hw/virtio/vhost-user-blk.h | 1 + 2 files changed, 9 insertions(

[PATCH v1 3/5] vhost-user-blk: make it possible to disable write-zeroes/discard

2022-08-24 Thread Daniil Tatianin
It is useful to have the ability to disable these features for compatibility with older VMs that don't have these implemented. Signed-off-by: Daniil Tatianin --- hw/block/vhost-user-blk.c | 8 ++-- include/hw/virtio/vhost-user-blk.h | 2 ++ 2 files changed, 8 insertions(

Re: [PATCH v1 3/5] vhost-user-blk: make it possible to disable write-zeroes/discard

2022-08-24 Thread Daniil Tatianin
On 8/24/22 9:00 PM, Stefan Hajnoczi wrote: On Wed, Aug 24, 2022 at 12:18:35PM +0300, Daniil Tatianin wrote: diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 9117222456..e89164c358 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -251,6 +251,8

Re: [PATCH v1 2/5] virtio-blk: move config space sizing code to virtio-blk-common

2022-08-24 Thread Daniil Tatianin
On 8/24/22 9:13 PM, Stefan Hajnoczi wrote: On Wed, Aug 24, 2022 at 12:18:34PM +0300, Daniil Tatianin wrote: +size_t virtio_blk_common_get_config_size(uint64_t host_features) +{ +size_t config_size = MAX(VIRTIO_BLK_CFG_SIZE, +virtio_feature_get_config_size(feature_sizes

[PATCH v2 6/8] vhost-user-blk: make it possible to disable write-zeroes/discard

2022-08-26 Thread Daniil Tatianin
It is useful to have the ability to disable these features for compatibility with older VMs that don't have these implemented. Signed-off-by: Daniil Tatianin --- hw/block/vhost-user-blk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/block/vhost-user-blk.c

[PATCH v2 7/8] vhost-user-blk: make 'config_wce' part of 'host_features'

2022-08-26 Thread Daniil Tatianin
No reason to have this be a separate field. This also makes it more akin to what the virtio-blk device does. Signed-off-by: Daniil Tatianin --- hw/block/vhost-user-blk.c | 6 ++ include/hw/virtio/vhost-user-blk.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a

[PATCH v2 0/8] vhost-user-blk: dynamically resize config space based on features

2022-08-26 Thread Daniil Tatianin
hold the virtio-blk config size parameters. - Reuse parent fields in vhost-user-blk instead of introducing new ones. Daniil Tatianin (8): virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size virtio-blk: utilize VirtIOConfigSizeParams & virtio_get_config_size vi

[PATCH v2 1/8] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-08-26 Thread Daniil Tatianin
ver, the next step of this transition is moving VirtIOConfigSizeParams into VirtioDeviceClass, so that it can be done automatically by the virtio initialization code. Signed-off-by: Daniil Tatianin --- hw/virtio/virtio.c | 17 + include/hw/virtio/virtio.h | 9 +

[PATCH v2 3/8] virtio-net: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-08-26 Thread Daniil Tatianin
Use the new common helper. As an added bonus this also makes use of config size sanity checking via the 'max_size' field. Signed-off-by: Daniil Tatianin --- hw/net/virtio-net.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/vi

[PATCH v2 2/8] virtio-blk: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-08-26 Thread Daniil Tatianin
Use the common helper instead of duplicating the same logic. Signed-off-by: Daniil Tatianin --- hw/block/virtio-blk.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index e9ba752f6b..10c47c2934 100644 --- a/hw

[PATCH v2 5/8] virtio-blk: move config size params to virtio-blk-common

2022-08-26 Thread Daniil Tatianin
This way we can reuse it for other virtio-blk devices, e.g vhost-user-blk, which currently does not control its config space size dynamically. Signed-off-by: Daniil Tatianin --- MAINTAINERS | 4 +++ hw/block/meson.build | 4 +-- hw/block/virtio-blk

[PATCH v2 8/8] vhost-user-blk: dynamically resize config space based on features

2022-08-26 Thread Daniil Tatianin
igger configuration space, which isn't actually needed since those additional config fields are not active (write-zeroes/discard). Signed-off-by: Daniil Tatianin --- hw/block/vhost-user-blk.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/hw/block/vhost-us

[PATCH v2 4/8] virtio: remove the virtio_feature_get_config_size helper

2022-08-26 Thread Daniil Tatianin
This has no more users and is superseded by virtio_get_config_size. Signed-off-by: Daniil Tatianin --- hw/virtio/virtio.c | 15 --- include/hw/virtio/virtio.h | 3 --- 2 files changed, 18 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 8518382025

Re: [PATCH v2 0/8] vhost-user-blk: dynamically resize config space based on features

2022-09-01 Thread Daniil Tatianin
ping

Re: [PATCH v2 1/8] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Daniil Tatianin
it. I can squash the first four if that would be better. For this one: Reviewed-by: Raphael Norwitz On Fri, Aug 26, 2022 at 05:32:41PM +0300, Daniil Tatianin wrote: This is the first step towards moving all device config size calculation logic into the virtio core code. In particular, this a

Re: [PATCH v2 5/8] virtio-blk: move config size params to virtio-blk-common

2022-09-02 Thread Daniil Tatianin
On 9/2/22 8:57 PM, Raphael Norwitz wrote: The vhost-user-blk bits in meson.build and Maintainers should probably be in patch 8? You're totally right, thanks. Otherwise LGTM. On Fri, Aug 26, 2022 at 05:32:45PM +0300, Daniil Tatianin wrote: This way we can reuse it for other virti

Re: [PATCH v2 3/8] virtio-net: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Daniil Tatianin
On 9/2/22 8:54 PM, Raphael Norwitz wrote: On Fri, Aug 26, 2022 at 05:32:43PM +0300, Daniil Tatianin wrote: Use the new common helper. As an added bonus this also makes use of config size sanity checking via the 'max_size' field. Signed-off-by: Daniil Tatianin --- hw/net/virtio

[PATCH v3 1/5] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-09-06 Thread Daniil Tatianin
d and is removed with this commit. Signed-off-by: Daniil Tatianin --- hw/block/virtio-blk.c | 16 +++- hw/net/virtio-net.c| 9 +++-- hw/virtio/virtio.c | 10 ++ include/hw/virtio/virtio.h | 10 -- 4 files changed, 28 insertions(+), 17 deletions

[PATCH v3 2/5] virtio-blk: move config size params to virtio-blk-common

2022-09-06 Thread Daniil Tatianin
This way we can reuse it for other virtio-blk devices, e.g vhost-user-blk, which currently does not control its config space size dynamically. Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz --- MAINTAINERS | 2 ++ hw/block/meson.build

[PATCH v3 5/5] vhost-user-blk: dynamically resize config space based on features

2022-09-06 Thread Daniil Tatianin
igger configuration space, which isn't actually needed since those additional config fields are not active (write-zeroes/discard). Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz --- MAINTAINERS | 2 ++ hw/block/meson.build | 2 +- hw/block/vhost-user-blk.c |

[PATCH v3 3/5] vhost-user-blk: make it possible to disable write-zeroes/discard

2022-09-06 Thread Daniil Tatianin
It is useful to have the ability to disable these features for compatibility with older VMs that don't have these implemented. Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features

2022-09-06 Thread Daniil Tatianin
hold the virtio-blk config size parameters. - Reuse parent fields in vhost-user-blk instead of introducing new ones. Changes since v2: - Squash the first four commits into one - Set .min_size for virtio-net as well - Move maintainer/meson user-blk bits to the last commit Daniil Tatianin (5):

[PATCH v3 4/5] vhost-user-blk: make 'config_wce' part of 'host_features'

2022-09-06 Thread Daniil Tatianin
No reason to have this be a separate field. This also makes it more akin to what the virtio-blk device does. Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 6 ++ include/hw/virtio/vhost-user-blk.h | 1 - 2 files changed, 2 insertions

Re: [PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features

2022-09-12 Thread Daniil Tatianin
Thanks for reviewing! Could you send a Pull request? Or do we need an ack from someone else? On 9/7/22 7:02 AM, Raphael Norwitz wrote: Thanks for the changes. For the whole series: Reviewed-by: Raphael Norwitz On Tue, Sep 06, 2022 at 10:31:06AM +0300, Daniil Tatianin wrote: This patch set

Re: [PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features

2022-10-11 Thread Daniil Tatianin
Ping :) On 9/6/22 10:31 AM, Daniil Tatianin wrote: This patch set attempts to align vhost-user-blk with virtio-blk in terms of backward compatibility and flexibility. It also improves the virtio core by introducing new common code that can be used by a virtio device to calculate its config

Re: [PATCH v3 0/5] vhost-user-blk: dynamically resize config space based on features

2022-10-11 Thread Daniil Tatianin
On 10/11/22 10:20 AM, Daniil Tatianin wrote: Ping :) Oops, didn't see the pull request. Disregard this. On 9/6/22 10:31 AM, Daniil Tatianin wrote: This patch set attempts to align vhost-user-blk with virtio-blk in terms of backward compatibility and flexibility. It also improve

Re: [PATCH 0/2] virtio-scsi: stop using aio_disable_external() during unplug

2023-04-04 Thread Daniil Tatianin
Reviewed-by: Daniil Tatianin

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

2023-04-13 Thread Daniil Tatianin
Just a few minor nits On 4/11/23 5:51 PM, Vladimir Sementsov-Ogievskiy wrote: 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 o

[PATCH 1/3] softmmu/runstate: add a way to detect force shutdowns

2025-06-09 Thread Daniil Tatianin
entirely and are equivalent to pulling the power plug. Signed-off-by: Daniil Tatianin --- include/system/runstate.h | 1 + system/runstate.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/include/system/runstate.h b/include/system/runstate.h index fdd5c4a517..b406a3960e

[PATCH 0/3] vhost-user-blk: add an option to skip GET_VRING_BASE for force shutdown

2025-06-09 Thread Daniil Tatianin
lk devices since those require the drain operation to shut down gracefully unlike, for example, network devices. Daniil Tatianin (3): softmmu/runstate: add a way to detect force shutdowns vhost: add a helper for force stopping a device vhost-user-blk: add an option to skip GET_VRING_BASE for force

[PATCH 2/3] vhost: add a helper for force stopping a device

2025-06-09 Thread Daniil Tatianin
for whatever reason. Signed-off-by: Daniil Tatianin --- hw/virtio/vhost.c | 52 +-- include/hw/virtio/vhost.h | 15 +++ 2 files changed, 54 insertions(+), 13 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index fc43853704

[PATCH 3/3] vhost-user-blk: add an option to skip GET_VRING_BASE for force shutdown

2025-06-09 Thread Daniil Tatianin
on called "skip-get-vring-base-on-force-shutdown" to allow SIGTERM/QMP quit() to actually act like a "force shutdown" at least for vhost-user-blk devices since those require the drain operation to shut down gracefully unlike, for example, network devices. Signed-off-by: Daniil

Re: [PATCH 0/3] vhost-user-blk: add an option to skip GET_VRING_BASE for force shutdown

2025-07-01 Thread Daniil Tatianin
Ping :) On 6/10/25 12:25 AM, Daniil Tatianin wrote: This series aims to address SIGTERM/QMP quit() being a bit too graceful in respect to devices. Both of the aforementioned ways to stop QEMU completely bypass the guest OS so in that sense they're basically equal to pulling the power plug