[PATCH] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-25 Thread Daniil Tatianin
This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Signed-off-by: Daniil Tatianin --- hw/rtc/mc146818rtc.c | 15 +++ include/hw/rtc/mc146818rtc.h | 1 + qapi/misc-target.json| 16

Re: [PATCH] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-26 Thread Daniil Tatianin
On 4/26/24 11:39 AM, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Signed-off-by: Daniil Tatianin --- hw/rtc/mc146818rtc.c | 15

[PATCH v1] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-27 Thread Daniil Tatianin
This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact that this (and one other QMP command) only works for the MC146818 RTC controller. Signed-off-by: Daniil Tatianin

Re: [PATCH v1] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Daniil Tatianin
On 4/29/24 11:51 AM, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact that this (and one other QMP command) only

[PATCH v2] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Daniil Tatianin
This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact that this (and one other QMP command) only works for the MC146818 RTC controller. Signed-off-by: Daniil Tatianin

Re: [PATCH v1] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Daniil Tatianin
On 4/29/24 12:40 PM, Philippe Mathieu-Daudé wrote: On 29/4/24 11:34, Daniil Tatianin wrote: On 4/29/24 11:51 AM, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type

Re: [PATCH] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-02 Thread Daniil Tatianin
On 4/29/24 4:39 PM, Philippe Mathieu-Daudé wrote: (+Peter who has more experience on such design). On 29/4/24 13:32, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Hi Daniil, Markus, On 26/4/24 10:39, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force

[PATCH v3] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-06 Thread Daniil Tatianin
This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact that this (and one other QMP command) only works for the MC146818 RTC controller. Signed-off-by: Daniil Tatianin

[PATCH 1/4] oslib: introduce new qemu_prealloc_mem_with_timeout() api

2023-01-20 Thread Daniil Tatianin
tion is currently a stub that just calls into the old qemu_prealloc_mem api. Signed-off-by: Daniil Tatianin --- include/qemu/osdep.h | 19 util/oslib-posix.c | 114 +++ util/oslib-win32.c | 9 3 files changed, 133 insertions(+), 9 delet

[PATCH 4/4] backends/hostmem: add an ability to make prealloc timeout fatal

2023-01-20 Thread Daniil Tatianin
This is controlled via the new 'prealloc-timeout-fatal' property and can be useful for cases when we cannot afford to not preallocate all guest pages while being time constrained. Signed-off-by: Daniil Tatianin --- backends/hostmem.c | 38 ++---

[PATCH v0 0/4] backends/hostmem: add an ability to specify prealloc timeout

2023-01-20 Thread Daniil Tatianin
configured to either simply emit a warning and continue VM startup without having preallocated the entire guest RAM or just abort startup entirely if that is not acceptable for a specific use case. Daniil Tatianin (4): oslib: introduce new qemu_prealloc_mem_with_timeout() api backends/hostmem

[PATCH 3/4] backends/hostmem: add an ability to specify prealloc timeout

2023-01-20 Thread Daniil Tatianin
(no timeout) by default, and can be configured via the new 'prealloc-timeout' property. Signed-off-by: Daniil Tatianin --- backends/hostmem.c | 48 ++-- include/sysemu/hostmem.h | 2 ++ qapi/qom.json| 4 3 files changed, 52

[PATCH 2/4] backends/hostmem: move memory region preallocation logic into a helper

2023-01-20 Thread Daniil Tatianin
...so that we don't have to duplicate it in multiple places throughout the file. Signed-off-by: Daniil Tatianin --- backends/hostmem.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/backends/hostmem.c b/backends/hostmem.c

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 v0 0/4] backends/hostmem: add an ability to specify prealloc timeout

2023-01-23 Thread Daniil Tatianin
On 1/23/23 11:57 AM, David Hildenbrand wrote: On 20.01.23 14:47, Daniil Tatianin wrote: This series introduces new qemu_prealloc_mem_with_timeout() api, which allows limiting the maximum amount of time to be spent on memory preallocation. It also adds prealloc statistics collection that is

Re: [PATCH v0 0/4] backends/hostmem: add an ability to specify prealloc timeout

2023-01-23 Thread Daniil Tatianin
On 1/23/23 4:47 PM, Daniel P. Berrangé wrote: On Mon, Jan 23, 2023 at 04:30:03PM +0300, Daniil Tatianin wrote: On 1/23/23 11:57 AM, David Hildenbrand wrote: On 20.01.23 14:47, Daniil Tatianin wrote: This series introduces new qemu_prealloc_mem_with_timeout() api, which allows limiting the

[PATCH v1] chardev/wctable: don't free the instance in wctablet_chr_finalize

2021-11-17 Thread Daniil Tatianin
Object is supposed to be freed by invoking obj->free, and not obj->instance_finalize. This would lead to use-after-free followed by double free in object_unref/object_finalize. Signed-off-by: Daniil Tatianin --- chardev/wctablet.c | 1 - 1 file changed, 1 deletion(-) diff --git a/c

[PATCH v1] hw/i386/amd_iommu: clean up broken event logging

2021-11-17 Thread Daniil Tatianin
ng to evt containing uninitialized event type and address. - Reduce buffer size from 32 to 16 bytes, which is the amount of bytes actually needed for event storage. - Remove amdvi_encode_event & amdvi_setevent_bits, as they are no longer needed. Signed-off-by: Daniil Tatianin --- hw/i38

[PATCH v1] virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup

2021-11-29 Thread Daniil Tatianin
In case of an error during initialization in vhost_dev_init, vhostfd is closed in vhost_dev_cleanup. Remove close from err_virtio as it's both redundant and causes a double close on vhostfd. Signed-off-by: Daniil Tatianin --- hw/virtio/vhost-vsock.c | 11 +-- 1 file chang

[PATCH v1 1/2] hw/scsi/vhost-scsi: don't leak vqs on error

2021-11-29 Thread Daniil Tatianin
vhost_dev_init calls vhost_dev_cleanup in case of an error during initialization, which zeroes out the entire vsc->dev as well as the vsc->dev.vqs pointer. This prevents us from properly freeing it in free_vqs. Keep a local copy of the pointer so we can free it later. Signed-off-by:

[PATCH v1 2/2] hw/scsi/vhost-scsi: don't double close vhostfd on error

2021-11-29 Thread Daniil Tatianin
vhost_dev_init calls vhost_dev_cleanup on error, which closes vhostfd, don't double close it. Signed-off-by: Daniil Tatianin --- hw/scsi/vhost-scsi.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index efb3e

[PATCH v1] hw/smbios: verify header type for file before using it

2021-11-29 Thread Daniil Tatianin
Signed-off-by: Daniil Tatianin --- hw/smbios/smbios.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 7397e56737..c55f77368a 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -1163,6 +1163,12 @@ void smbios_entry_add(QemuOpts

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 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 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(

[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 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 2/5] virtio-blk: move config space sizing code to virtio-blk-common

2022-08-24 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 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

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 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 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 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 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 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 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

[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

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

Re: [PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-08-15 Thread Daniil Tatianin
Ping:) 17.07.2024, 10:58, "Daniil Tatianin" :On 5/29/24 6:27 PM, Philippe Mathieu-Daudé wrote:  On 29/5/24 16:34, Markus Armbruster wrote: Daniil Tatianin <d-tatia...@yandex-team.ru> writes:  On 5/29/24 4:39 PM, Philippe Mathieu-Daudé wrote:  On 29/5/24 14:43, Daniil Tatianin wro

[PATCH] chardev: allow specifying finer-grained reconnect timeouts

2024-08-16 Thread Daniil Tatianin
one second because it would take this long for QEMU to reinitialize the socket connection. Make it possible to specify a smaller timeout by treating the value in "reconnect" as milliseconds via the new "reconnect-is-ms" option. Signed-off-by: Daniil Tatianin --- chardev/char-

Re: [PATCH v3] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-28 Thread Daniil Tatianin
On 5/27/24 8:01 PM, Philippe Mathieu-Daudé wrote: Hi Daniil, On 21/5/24 10:08, Daniil Tatianin wrote: Could you please take a look at this revision? I think I've taken everyone's feedback into account. Sorry for the delay, I missed your patch since you didn't Cc me (Markus a

[PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-28 Thread Daniil Tatianin
Signed-off-by: Daniil Tatianin --- Changes since v0: - Rename to rtc-inject-irq to match other similar API - Add a comment to highlight that this only works for the I386 RTC Changes since v1: - Added a description below the QMP command to explain how it can be used and what it does. Changes since

Re: [PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-29 Thread Daniil Tatianin
Thanks for the review Markus! I will fix the wording and add a "Bug:" clause for the next revision. On 5/29/24 3:03 PM, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for

Re: [PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-29 Thread Daniil Tatianin
On 5/29/24 3:36 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 14:03, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the

Re: [PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-29 Thread Daniil Tatianin
On 5/29/24 4:39 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 14:43, Daniil Tatianin wrote: On 5/29/24 3:36 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 14:03, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont

Re: [PATCH v3] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-13 Thread Daniil Tatianin
ping :) 06.05.2024, 11:34, "Daniil Tatianin" :This can be used to force-synchronize the time in guest after a longstop-cont pause, which can be useful for serverless-type workload.Also add a comment to highlight the fact that this (and one other QMPcommand) only works for the MC

Re: [PATCH v3] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-21 Thread Daniil Tatianin
Could you please take a look at this revision? I think I've taken everyone's feedback into account. Thank you! On 5/14/24 9:57 AM, Daniil Tatianin wrote: ping :) 06.05.2024, 11:34, "Daniil Tatianin" : This can be used to force-synchronize the time in guest after

Re: [PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-06-17 Thread Daniil Tatianin
On 5/29/24 6:27 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 16:34, Markus Armbruster wrote: Daniil Tatianin writes: On 5/29/24 4:39 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 14:43, Daniil Tatianin wrote: On 5/29/24 3:36 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 14:03, Markus

Re: [PATCH] chardev: allow specifying finer-grained reconnect timeouts

2024-08-29 Thread Daniil Tatianin
On 8/29/24 2:56 PM, Markus Armbruster wrote: Daniil Tatianin writes: The "reconnect" option only allows to specify the time in seconds, which is way too long for certain workflows. We have a lightweight disk backend server, which takes about 20ms to live update, but due to this lim

[PATCH] chardev: introduce 'reconnect-ms' and deprecate 'reconnect'

2024-09-03 Thread Daniil Tatianin
an error. 'reconnect' is also deprecated by this commit to make it possible to remove it in the future as to not keep two options that control the same thing. Signed-off-by: Daniil Tatianin --- chardev/char-socket.c | 33 - chardev/char.c

[PATCH v1] chardev: introduce 'reconnect-ms' and deprecate 'reconnect'

2024-09-05 Thread Daniil Tatianin
an error. 'reconnect' is also deprecated by this commit to make it possible to remove it in the future as to not keep two options that control the same thing. Reviewed-by: Vladimir Sementsov-Ogievskiy Acked-by: Peter Krempa Signed-off-by: Daniil Tatianin --- Changes since v0: - Mention the d

Re: [PATCH v1] chardev: introduce 'reconnect-ms' and deprecate 'reconnect'

2024-09-11 Thread Daniil Tatianin
Ping :) I think this one should be good to go now! On 9/5/24 11:57 AM, Daniil Tatianin wrote: The 'reconnect' option only allows to specify the time in seconds, which is way too long for certain workflows. We have a lightweight disk backend server, which takes about 20ms to live u

Re: [PATCH v1] chardev: introduce 'reconnect-ms' and deprecate 'reconnect'

2024-09-13 Thread Daniil Tatianin
On 9/13/24 11:57 AM, Markus Armbruster wrote: Daniil Tatianin writes: The 'reconnect' option only allows to specify the time in seconds, which is way too long for certain workflows. We have a lightweight disk backend server, which takes about 20ms to live update, but due to this

[PATCH v2] chardev: introduce 'reconnect-ms' and deprecate 'reconnect'

2024-09-13 Thread Daniil Tatianin
an error. 'reconnect' is also deprecated by this commit to make it possible to remove it in the future as to not keep two options that control the same thing. Reviewed-by: Vladimir Sementsov-Ogievskiy Acked-by: Peter Krempa Signed-off-by: Daniil Tatianin --- Changes since v0: - Mention

[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 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 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 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

[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):

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
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 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

[PATCH v1 2/2] osdep: support mempolicy for preallocation in os_mem_prealloc

2021-12-06 Thread Daniil Tatianin
instead. Signed-off-by: Daniil Tatianin --- backends/hostmem.c | 6 -- include/qemu/osdep.h | 3 ++- util/meson.build | 2 ++ util/oslib-posix.c | 29 ++--- util/oslib-win32.c | 3 ++- 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/backends

[PATCH v1 1/2] hostmem: use a static size for maxnode, validate policy everywhere

2021-12-06 Thread Daniil Tatianin
that it's guaranteed to be valid when we call mbind. Signed-off-by: Daniil Tatianin --- backends/hostmem.c | 64 +++--- 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index 4c05862ed5..39202

Re: [PATCH v1 2/2] osdep: support mempolicy for preallocation in os_mem_prealloc

2021-12-07 Thread Daniil Tatianin
icy returns NULL (which it doesn't in our case).Sorry for the confusion.Thanks,Daniil 07.12.2021, 11:13, "David Hildenbrand" :On 07.12.21 08:06, Daniil Tatianin wrote: This is needed for cases where we want to make sure that a shared memory region gets allocated from a specific NUMA node

Re: [PATCH v2 0/3] migration-qtest: zero the first byte of each page on start

2023-09-26 Thread Daniil Tatianin
ping :)

Re: [PATCH 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-26 Thread Daniil Tatianin
27.09.2023, 00:02, "Peter Xu" :On Thu, Sep 07, 2023 at 10:29:42PM +0300, Daniil Tatianin wrote: This series fixes an issue where the outcome of the migration qtest relies on the initial memory contents all being the same across the first 100MiB of RAM, which is a very fragile invarian

Re: [PATCH 2/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-26 Thread Daniil Tatianin
26.09.2023, 23:41, "Vladimir Sementsov-Ogievskiy" :On 07.09.23 22:29, Daniil Tatianin wrote: The migration qtest all the way up to this point used to work by sheer luck relying on the contents of all pages from 1MiB to 100MiB to contain the same one value in the first byte initially.  T

Re: [PATCH 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-26 Thread Daniil Tatianin
27.09.2023, 00:02, "Peter Xu" :On Thu, Sep 07, 2023 at 10:29:42PM +0300, Daniil Tatianin wrote: This series fixes an issue where the outcome of the migration qtest relies on the initial memory contents all being the same across the first 100MiB of RAM, which is a very fragile invarian

Re: [PATCH v2 1/3] i386/a-b-bootblock: factor test memory addresses out into constants

2023-10-02 Thread Daniil Tatianin
Ping! :) 19.09.2023, 13:23, "Daniil Tatianin" :So that we have less magic numbers to deal with. This also allows us toreuse these in the following commits.Signed-off-by: Daniil Tatianin <d-tatia...@yandex-team.ru>Reviewed-by: Peter Xu <pet...@redhat.com>--- tests/migration/i3

[PATCH v2 1/3] i386/a-b-bootblock: factor test memory addresses out into constants

2023-09-19 Thread Daniil Tatianin
So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Signed-off-by: Daniil Tatianin Reviewed-by: Peter Xu --- tests/migration/i386/a-b-bootblock.S | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests

[PATCH v2 3/3] s390x/a-b-bios: zero the first byte of each page on start

2023-09-19 Thread Daniil Tatianin
ation test on s390x, too") Signed-off-by: Daniil Tatianin --- tests/migration/s390x/a-b-bios.c | 8 + tests/migration/s390x/a-b-bios.h | 380 +-- 2 files changed, 211 insertions(+), 177 deletions(-) diff --git a/tests/migration/s390x/a-b-bios.c b/tests/migration

[PATCH v2 2/3] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-19 Thread Daniil Tatianin
test.c:300:check_guests_ram: assertion failed: (bad == 0) Fix this by always zeroing the first byte of each page in the range so that we get consistent results no matter the initial contents. Fixes: ea0c6d62391 ("test: Postcopy") Signed-off-by: Daniil Tatianin Reviewed-by: Peter Xu ---

[PATCH v2 0/3] migration-qtest: zero the first byte of each page on start

2023-09-19 Thread Daniil Tatianin
since v1: - Add a fix for the s390x test binary as well as suggested by Peter Xu Daniil Tatianin (3): i386/a-b-bootblock: factor test memory addresses out into constants i386/a-b-bootblock: zero the first byte of each page on start s390x/a-b-bios: zero the first byte of each page on start

[PATCH 2/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-07 Thread Daniil Tatianin
test.c:300:check_guests_ram: assertion failed: (bad == 0) Fix this by always zeroing the first byte of each page in the range so that we get consistent results no matter the initial contents. Fixes: ea0c6d62391 ("test: Postcopy") Signed-off-by: Daniil Tatianin --- tests/migration/i386/

[PATCH 1/2] i386/a-b-bootblock: factor test memory addresses out into constants

2023-09-07 Thread Daniil Tatianin
So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Signed-off-by: Daniil Tatianin --- tests/migration/i386/a-b-bootblock.S | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/migration/i386/a-b-bootblock.S

[PATCH 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-07 Thread Daniil Tatianin
This series fixes an issue where the outcome of the migration qtest relies on the initial memory contents all being the same across the first 100MiB of RAM, which is a very fragile invariant. We fix this by making sure we zero the first byte of every testable page in range beforehand. Daniil

[PATCH v1 1/2] i386/a-b-bootblock: factor test memory addresses out into constants

2023-09-07 Thread Daniil Tatianin
So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Signed-off-by: Daniil Tatianin --- tests/migration/i386/a-b-bootblock.S | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/migration/i386/a-b-bootblock.S

[PATCH v1 2/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-07 Thread Daniil Tatianin
test.c:300:check_guests_ram: assertion failed: (bad == 0) Fix this by always zeroing the first byte of each page in the range so that we get consistent results no matter the initial contents. Fixes: ea0c6d62391 ("test: Postcopy") Signed-off-by: Daniil Tatianin --- tests/migration/i386/

[PATCH v1 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-07 Thread Daniil Tatianin
This series fixes an issue where the outcome of the migration qtest relies on the initial memory contents all being the same across the first 100MiB of RAM, which is a very fragile invariant. We fix this by making sure we zero the first byte of every testable page in range beforehand. Daniil

Re: [PATCH v1 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-13 Thread Daniil Tatianin
ping 07.09.2023, 22:31, "Daniil Tatianin" :This series fixes an issue where the outcome of the migration qtestrelies on the initial memory contents all being the same across thefirst 100MiB of RAM, which is a very fragile invariant.We fix this by making sure we zero the first byt

Re: [PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-07-17 Thread Daniil Tatianin
On 5/29/24 6:27 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 16:34, Markus Armbruster wrote: Daniil Tatianin writes: On 5/29/24 4:39 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 14:43, Daniil Tatianin wrote: On 5/29/24 3:36 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 14:03, Markus

Re: [PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-07-22 Thread Daniil Tatianin
Ping :) Any ideas on this? On 7/17/24 10:57 AM, Daniil Tatianin wrote: On 5/29/24 6:27 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 16:34, Markus Armbruster wrote: Daniil Tatianin writes: On 5/29/24 4:39 PM, Philippe Mathieu-Daudé wrote: On 29/5/24 14:43, Daniil Tatianin wrote: On 5

Re: [PATCH v2] chardev: introduce 'reconnect-ms' and deprecate 'reconnect'

2024-10-10 Thread Daniil Tatianin
se as well. I'll have some time after next week. Thanks! On 13.09.24 12:46, Daniil Tatianin wrote: > The 'reconnect' option only allows to specify the time in seconds, > which is way too long for certain workflows. > > We have a lightweight disk b

[PATCH 2/2] chardev: finalize 'reconnect' deprecation

2024-10-25 Thread Daniil Tatianin
Change all related docs and tests to use the new 'reconnect-ms' option instead of the now deprecated 'reconnect'. Signed-off-by: Daniil Tatianin --- docs/COLO-FT.txt | 4 ++-- docs/system/ppc/powernv.rst | 2 +- qemu-options.hx | 22 +

[PATCH 1/2] net/stream: deprecate 'reconnect' in favor of 'reconnect-ms'

2024-10-25 Thread Daniil Tatianin
Do the same thing we already did for chardev in c8e2b6b4d7e, and introduce a new 'reconnect-ms' option to make it possible to specify sub-second timeouts. This also changes the related documentaion and tests to use reconnect-ms as well. Signed-off-by: Daniil Tatianin ---

[PATCH 0/2] finalize 'reconnect' deprecation

2024-10-25 Thread Daniil Tatianin
We've deprecated the 'reconnect' property in c8e2b6b4d7e, but all the tests, as well as the stream netdev were still left using it. This series finalizes the deprecation and replaces all local usage and docs metions of 'reconnect' with 'reconnect-ms'. Daniil Ta

Re: [PATCH 0/2] overcommit: introduce mem-lock-onfault

2024-12-08 Thread Daniil Tatianin
On 12/6/24 4:08 AM, Peter Xu wrote: On Fri, Dec 06, 2024 at 02:19:06AM +0300, Daniil Tatianin wrote: Currently, passing mem-lock=on to QEMU causes memory usage to grow by huge amounts: no memlock: $ qemu-system-x86_64 -overcommit mem-lock=off $ ps -p $(pidof ./qemu-system-x86_64) -o

Re: [PATCH v4 0/4] overcommit: introduce mem-lock-onfault

2025-02-04 Thread Daniil Tatianin
On 1/23/25 7:31 PM, Peter Xu wrote: On Thu, Jan 23, 2025 at 04:19:40PM +0300, Daniil Tatianin wrote: Currently, passing mem-lock=on to QEMU causes memory usage to grow by huge amounts: no memlock: $ ./qemu-system-x86_64 -overcommit mem-lock=off $ ps -p $(pidof ./qemu-system-x86_64

Re: [PATCH v4 0/4] overcommit: introduce mem-lock-onfault

2025-02-04 Thread Daniil Tatianin
On 2/4/25 5:47 PM, Peter Xu wrote: On Tue, Feb 04, 2025 at 11:23:41AM +0300, Daniil Tatianin wrote: On 1/23/25 7:31 PM, Peter Xu wrote: On Thu, Jan 23, 2025 at 04:19:40PM +0300, Daniil Tatianin wrote: Currently, passing mem-lock=on to QEMU causes memory usage to grow by huge amounts: no

Re: [PATCH v5 1/4] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
On 2/12/25 5:48 PM, Philippe Mathieu-Daudé wrote: Hi Daniil, On 12/2/25 15:39, Daniil Tatianin wrote: This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin ---   include/system/os-posix.h |  2

Re: [PULL 02/14] os: add an ability to lock memory on_fault

2025-02-12 Thread Daniil Tatianin
On 2/12/25 5:13 PM, Stefan Hajnoczi wrote: On Tue, Feb 11, 2025 at 5:52 PM Peter Xu wrote: From: Daniil Tatianin This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Hi Peter and Daniil, Please take a look at this CI failure

[PATCH v5 0/4] overcommit: introduce mem-lock-onfault

2025-02-12 Thread Daniil Tatianin
ommit option parsing out of line - Make enable_mlock an enum instead Changes since v3: - Rebase to latest master due to the recent sysemu -> system renames Changes since v4: - Fix compile errors under FreeBSD and MacOS Daniil Tatianin (4): os: add an ability to lock memory on_fau

  1   2   >