Re: [Qemu-devel] [PATCH] migration: Add error_desc for file channel errors

2019-06-07 Thread Yury Kotov
Ping 22.04.2019, 13:50, "Yury Kotov" : > Currently, there is no information about error if outgoing migration was > failed > because of file channel errors. > Example (QMP session): > -> { "execute": "migrate", "arguments": { "uri&qu

[Qemu-devel] [PATCH] kvm-all: Add/update fprintf's for kvm_*_ioeventfd_del

2019-06-07 Thread Yury Kotov
Signed-off-by: Yury Kotov --- accel/kvm/kvm-all.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 524c4ddfbd..e4ac3386cb 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -864,8 +864,8 @@ static void

[Qemu-devel] [RFC PATCH] QEMU may write to system_memory before guest starts

2019-03-14 Thread Yury Kotov
tem_ram in such case? What do you think? Signed-off-by: Yury Kotov --- backends/hostmem-file.c | 2 +- exec.c| 15 +-- include/exec/cpu-common.h | 2 ++ include/exec/memory.h | 3 +++ include/qemu/mmap-alloc.h | 2 +- migration/ram.c | 2 ++ ut

Re: [Qemu-devel] [PATCH v7 6/7] vhost-user-blk: Add support to reconnect backend

2019-03-14 Thread Yury Kotov
Hi, 14.03.2019, 14:44, "Daniel P. Berrangé" : > On Thu, Mar 14, 2019 at 07:34:03AM -0400, Michael S. Tsirkin wrote: >>  On Thu, Mar 14, 2019 at 11:24:22AM +, Daniel P. Berrangé wrote: >>  > On Tue, Mar 12, 2019 at 12:49:35PM -0400, Michael S. Tsirkin wrote: >>  > > On Thu, Feb 28, 2019 at 04:5

[RFC PATCH 0/1] Removing RAMBlocks during migration

2019-12-08 Thread Yury Kotov
actually an illustration of the race conditions for removing RAMBlock. Regards, Yury Yury Kotov (1): migration: Remove vmstate_unregister_ram hw/block/pflash_cfi01.c | 1 - hw/block/pflash_cfi02.c | 1 - hw/mem/pc-dimm.c| 5 - hw/misc/ivshmem.c | 2 -- hw/pci/pci

[RFC PATCH 1/1] migration: Remove vmstate_unregister_ram

2019-12-08 Thread Yury Kotov
at all calls of this function are just before MemoryRegion deletion. Thus, there is no effect of this function actually. Signed-off-by: Yury Kotov --- hw/block/pflash_cfi01.c | 1 - hw/block/pflash_cfi02.c | 1 - hw/mem/pc-dimm.c| 5 - hw/misc/ivshmem.c | 2 -

[PATCH] monitor: Fix slow reading

2019-11-22 Thread Yury Kotov
handle a command. In fact, these both functions can process any buffer size. So, return 1024 as a reasonable size which is enough to process the most QMP commands, but not too big to block the main loop for a long time. Signed-off-by: Yury Kotov --- monitor/monitor.c | 9 - 1 file changed, 8

[PATCH] migration/ram: Yield periodically to the main loop

2019-11-25 Thread Yury Kotov
or example, it doesn't respond to QMP commands. For this case, yield periodically, but not too often, so as not to affect the speed of migration. Signed-off-by: Yury Kotov --- migration/ram.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b/

[PATCH v2] migration/ram: Yield periodically to the main loop

2019-11-25 Thread Yury Kotov
d for instance, it doesn't respond to QMP commands. For this case, yield periodically, but not too often, so as not to affect the speed of migration. Signed-off-by: Yury Kotov --- migration/ram.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b

Re: [PATCH] monitor: Fix slow reading

2019-12-02 Thread Yury Kotov
Hi! 29.11.2019, 11:22, "Markus Armbruster" : > Yury Kotov writes: > >>  The monitor_can_read (as a callback of qemu_chr_fe_set_handlers) >>  should return size of buffer which monitor_qmp_read or monitor_read >>  can process. >>  Currently, monitor_can_r

Re: [PATCH] monitor: Fix slow reading

2019-12-03 Thread Yury Kotov
02.12.2019, 23:50, "Markus Armbruster" : > Yury Kotov writes: > >>  Hi! >> >>  29.11.2019, 11:22, "Markus Armbruster" : >>>  Yury Kotov writes: >>> >>>>   The monitor_can_read (as a callback of qemu_chr_fe_set_handlers)

Re: [Qemu-devel] [PATCH v4 0/3] High downtime with 95+ throttle pct

2019-08-15 Thread Yury Kotov
Ping ping 07.08.2019, 10:42, "Yury Kotov" : > Ping > > 23.07.2019, 16:42, "Yury Kotov" : >>  Hi, >> >>  V4: >>  * The test was simplified to prevent false fails. >> >>  V3: >>  * Rebase fixes (migrate_set_parameter

Re: [Qemu-devel] [PATCH v4 0/3] High downtime with 95+ throttle pct

2019-08-07 Thread Yury Kotov
Ping 23.07.2019, 16:42, "Yury Kotov" : > Hi, > > V4: > * The test was simplified to prevent false fails. > > V3: > * Rebase fixes (migrate_set_parameter -> migrate_set_parameter_int) > > V2: > * Added a test > * Fixed qemu_cond_timedwait for qsp >

Re: [Qemu-devel] [PATCH for-4.0 0/6] vhost-user-blk: Add support for backend reconnecting

2018-12-06 Thread Yury Kotov
Hi, it's very interesting patchset. I also research reconnecting issue for vhost-user-blk and SPDK. Did you support a case when vhost backend is not started but QEMU does? Regards, Yury 06.12.2018, 09:37, "elohi...@gmail.com" : > From: Xie Yongji > > This patchset is aimed at supporting qemu to

Re: [Qemu-devel] [PATCH for-4.0 1/6] char-socket: Enable "wait" option for client mode

2018-12-06 Thread Yury Kotov
Hi, 06.12.2018, 09:37, "elohi...@gmail.com" : > From: Xie Yongji > > Now we attempt to connect asynchronously for "reconnect socket" > during open(). But vhost-user device prefer a connected socket > during initialization. That means we may still need to support > sync connection during open() fo

Re: [Qemu-devel] [PATCH for-4.0 0/6] vhost-user-blk: Add support for backend reconnecting

2018-12-06 Thread Yury Kotov
e can try again. What do you think about it? Regards, Yury 06.12.2018, 12:42, "Yongji Xie" : > On Thu, 6 Dec 2018 at 17:21, Yury Kotov wrote: >>  Hi, it's very interesting patchset. >> >>  I also research reconnecting issue for vhost-user-blk and SPDK. >>

Re: [Qemu-devel] [PATCH for-4.0 5/6] vhost-user-blk: Add support for reconnecting backend

2018-12-06 Thread Yury Kotov
06.12.2018, 09:38, "elohi...@gmail.com" : > From: Xie Yongji > > Since the new message VHOST_USER_SET_VRING_INFLIGHT, > the backend is able to restart safely. This patch > allow qemu to reconnect the backend after connection > closed. > > Signed-off-by: Xie Yongji > Signed-off-by: Ni Xun > Signe

Re: [Qemu-devel] vhost-user devices work with chardev from different threads

2018-11-07 Thread Yury Kotov
ot; : > Hi > > On Mon, Oct 29, 2018 at 5:35 PM Yury Kotov wrote: >>  29.10.2018, 09:46, "Marc-André Lureau" : >>  > Hi >>  > >>  > On Mon, Oct 22, 2018 at 5:24 PM Yury Kotov >> wrote: >>  > >>  >> Hi, >>  >>

[Qemu-devel] vhost-user devices work with chardev from different threads

2018-10-22 Thread Yury Kotov
Hi, I examined vhost-user devices and found some chardev using strangeness. Is it ok, that vhost-user's set_status do sync chardev io ops from KVM thread? It seems that chardev doesn't support working with different threads. For example, I think such race is possible (two simultaneous events): 1

Re: [Qemu-devel] vhost-user devices work with chardev from different threads

2018-10-29 Thread Yury Kotov
29.10.2018, 09:46, "Marc-André Lureau" : > Hi > > On Mon, Oct 22, 2018 at 5:24 PM Yury Kotov wrote: > >>  Hi, >> >>  I examined vhost-user devices and found some chardev using strangeness. >> >>  Is it ok, that vhost-user's set_status

Re: [Qemu-devel] [PULL v2 00/79] Misc patches for 2018-09-30

2018-10-01 Thread Yury Kotov
+ marcandre.lureau@ Hi, I follow the "Fix socket chardev regression" series of Marc-André. The v2 of the series has commit "test-char: fix random socket test failure". So, I don't see the commit in this pull. May be you missed it? + "Marc-André Lureau" Reg

Re: [Qemu-devel] [PATCH v2 for-4.0 6/7] vhost-user-blk: Add support to reconnect backend

2018-12-18 Thread Yury Kotov
+ wrfsh@ Hi, 18.12.2018, 13:01, "elohi...@gmail.com" : > From: Xie Yongji > > Since we now support the message VHOST_USER_GET_SHM_SIZE > and VHOST_USER_SET_SHM_FD. The backend is able to restart > safely because it can record inflight I/O in shared memory. > This patch allows qemu to reconnect t

Re: [Qemu-devel] [PATCH v2 for-4.0 6/7] vhost-user-blk: Add support to reconnect backend

2018-12-18 Thread Yury Kotov
18.12.2018, 17:16, "Yongji Xie" : > On Tue, 18 Dec 2018 at 20:30, Yury Kotov wrote: >>  + wrfsh@ >> >>  Hi, >> >>  18.12.2018, 13:01, "elohi...@gmail.com" : >>  > From: Xie Yongji >>  > >>  > Since we now support the

Re: [Qemu-devel] [PATCH v2 for-4.0 6/7] vhost-user-blk: Add support to reconnect backend

2018-12-18 Thread Yury Kotov
18.12.2018, 17:59, "Yongji Xie" : > On Tue, 18 Dec 2018 at 22:35, Yury Kotov wrote: >>  18.12.2018, 17:16, "Yongji Xie" : >>  > On Tue, 18 Dec 2018 at 20:30, Yury Kotov >> wrote: >>  >> + wrfsh@ >>  >> >>  >>

Re: [Qemu-devel] [PATCH 0/4] Add ignore-external migration capability

2019-01-11 Thread Yury Kotov
10.01.2019, 23:12, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >> Hi, >> >> The series adds migration capability which allows to skip 'external' RAM >> blocks >> during migration. External block is a RAMBloc

Re: [Qemu-devel] [PATCH 1/4] migration: add RAMBlock's offset validation

2019-01-11 Thread Yury Kotov
10.01.2019, 23:14, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  RAM migration has a RAMBlock validation stage (flag RAM_SAVE_FLAG_MEM_SIZE). >>  In this stage QEMU checks further information about RAMBlock: >>  1. Presence (by i

Re: [Qemu-devel] [PATCH 1/4] migration: add RAMBlock's offset validation

2019-01-14 Thread Yury Kotov
11.01.2019, 21:25, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >> 10.01.2019, 23:14, "Dr. David Alan Gilbert" : >> > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >> >> RAM migration has a RAMBlock

Re: [Qemu-devel] [PATCH 0/4] Add ignore-external migration capability

2019-01-14 Thread Yury Kotov
11.01.2019, 23:09, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >> 10.01.2019, 23:12, "Dr. David Alan Gilbert" : >> > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >> >> Hi, >> >> >> >>

Re: [Qemu-devel] [PATCH 0/4] Add ignore-external migration capability

2019-01-14 Thread Yury Kotov
11.01.2019, 23:55, "Eduardo Habkost" : > On Fri, Jan 11, 2019 at 06:49:53PM +0300, Yury Kotov wrote: >>  10.01.2019, 23:12, "Dr. David Alan Gilbert" : >>  > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  >> Hi, >>  >> >>  &g

Re: [Qemu-devel] [PATCH v4 for-4.0 1/7] char-socket: Enable "nowait" option on client sockets

2019-01-15 Thread Yury Kotov
15.01.2019, 18:39, "Daniel P. Berrangé" : > On Fri, Jan 11, 2019 at 04:36:11PM +0800, Yongji Xie wrote: >>  On Fri, 11 Jan 2019 at 16:32, Daniel P. Berrangé >> wrote: >>  > >>  > On Fri, Jan 11, 2019 at 03:50:40PM +0800, Yongji Xie wrote: >>  > > On Fri, 11 Jan 2019 at 00:41, Daniel P. Berrangé

[Qemu-devel] [PATCH 3/4] migration: introduce ignore-external capability

2019-01-10 Thread Yury Kotov
We want to use local migration to update QEMU for running guests. In this case we don't need to migrate external RAM. So, add a capability to ignore such blocks during live migration. Signed-off-by: Yury Kotov --- exec.c| 5 + include/exec/cpu-common.h | 1 + migr

[Qemu-devel] [PATCH 4/4] tests/migration-test: Add a test for ignore-external capability

2019-01-10 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/migration-test.c | 109 + 1 file changed, 89 insertions(+), 20 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index 06ca5068d8..67e6d6dad2 100644 --- a/tests/migration-test.c +++ b/tests

[Qemu-devel] [PATCH 1/4] migration: add RAMBlock's offset validation

2019-01-10 Thread Yury Kotov
only meta information about RAM blocks to validate them. So, the only way to check block's offset is to send it explicitly. Signed-off-by: Yury Kotov --- migration/ram.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c i

[Qemu-devel] [PATCH 2/4] exec: add RAM_EXTERNAL flag to mark non-QEMU allocated blocks

2019-01-10 Thread Yury Kotov
This flag allows to determine whether RAM block is available from the outside. E.g. when we use -object memory-backend-file or -mem-path options we have a RAM block which is mapped to shared file. We need this flag in the following commits. Signed-off-by: Yury Kotov --- backends/hostmem-file.c

[Qemu-devel] [PATCH 0/4] Add ignore-external migration capability

2019-01-10 Thread Yury Kotov
;: [ { "capability": "x-ignore-external", "state": true } ] } } 4. Start migration. Regards, Yury Yury Kotov (4): migration: add RAMBlock's offset validation exec: add RAM_EXTERNAL flag to mark non-QEMU allocated blocks migration: introduce ignore-external capab

[Qemu-devel] [PATCH] vhost: fix invalid downcast

2018-07-13 Thread Yury Kotov
virtio_queue_get_desc_addr returns 64-bit hwaddr while int is usually 32-bit. If returned hwaddr is not equal to 0 but least-significant 32 bits are equal to 0 then this code will not actually stop running queue. Signed-off-by: Yury Kotov --- hw/virtio/vhost.c | 4 +--- 1 file changed, 1

[Qemu-devel] [PATCH 0/3] vhost-user reconnect

2018-08-16 Thread Yury Kotov
d5 \ --size=64M --filename=/dev/vda --loops=100 2. Restart SPDK many times. We are expecting that during SPDK restart fio will pause and fio should continue to work after restart completion. 3. fio process completed successfully without any error. Yury Kotov (3): chardev: prev

[Qemu-devel] [PATCH 2/3] vhost: refactor vhost_dev_start and vhost_virtqueue_start

2018-08-16 Thread Yury Kotov
Queue, * vhost_virtqueue_sync_backend: syncs vhost_virtqueue and backend. Signed-off-by: Yury Kotov Signed-off-by: Evgeny Yakovlev --- hw/virtio/vhost.c | 192 -- include/hw/virtio/vhost.h | 1 + 2 files changed, 119 insertions(+), 74 deletions(-) diff --git a/hw/v

[Qemu-devel] [PATCH 3/3] vhost-user: add reconnect support for vhost-user

2018-08-16 Thread Yury Kotov
vhost and add reconnect handler to vhost-user which uses vhost_dev_reconnect to retry handshake with vhost-user backend. Signed-off-by: Yury Kotov Signed-off-by: Evgeny Yakovlev --- hw/virtio/vhost-user.c| 65 +++ hw/virtio/vhost.c

[Qemu-devel] [PATCH 1/3] chardev: prevent extra connection attempt in tcp_chr_machine_done_hook

2018-08-16 Thread Yury Kotov
connection attempt. So add a check to prevent it. Signed-off-by: Yury Kotov Signed-off-by: Evgeny Yakovlev --- chardev/char-socket.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index efbad6e..116dcc4 100644 --- a/chardev

Re: [Qemu-devel] [PATCH 0/3] vhost-user reconnect

2018-08-20 Thread Yury Kotov
16.08.2018, 19:12, "Marc-André Lureau" : > Hi > > On Thu, Aug 16, 2018 at 5:32 PM, Yury Kotov wrote: >>  We are using QEMU (2.12.0) with SPDK (18.04.1) over vhost-user to emulate >> block >>  devices. One of our cases it to restart SPDK without restarting VM

Re: [Qemu-devel] [PATCH 0/3] vhost-user reconnect

2018-08-20 Thread Yury Kotov
16.08.2018, 18:36, "Marc-André Lureau" : > On Thu, Aug 16, 2018 at 5:32 PM, Yury Kotov wrote: >>  We are using QEMU (2.12.0) with SPDK (18.04.1) over vhost-user to emulate >> block >>  devices. One of our cases it to restart SPDK without restarting VM (in case >

Re: [Qemu-devel] [PATCH 0/3] vhost-user reconnect

2018-08-20 Thread Yury Kotov
20.08.2018, 16:11, "Marc-André Lureau" : > Hi > > On Mon, Aug 20, 2018 at 2:51 PM, Yury Kotov wrote: >>  16.08.2018, 18:36, "Marc-André Lureau" : >>>  On Thu, Aug 16, 2018 at 5:32 PM, Yury Kotov >>> wrote: >>>>   We are using Q

[Qemu-devel] [PATCH v2 1/3] migration: Add validate-uuid capability

2019-09-03 Thread Yury Kotov
This capability realizes simple source validation by UUID. It's useful for live migration between hosts. Signed-off-by: Yury Kotov --- migration/migration.c | 9 + migration/migration.h | 1 + migration/savevm.c| 45 +++ qapi/migration

Re: [Qemu-devel] [PATCH 1/3] migration: Add x-validate-uuid capability

2019-09-03 Thread Yury Kotov
03.09.2019, 14:25, "Dr. David Alan Gilbert" : > * Eric Blake (ebl...@redhat.com) wrote: >>  On 8/27/19 10:36 AM, Yury Kotov wrote: >>  > 27.08.2019, 17:02, "Eric Blake" : >>  >> On 8/27/19 7:02 AM, Yury Kotov wrote: >>  >>>  This ca

[Qemu-devel] [PATCH v2 2/3] tests/libqtest: Allow setting expected exit status

2019-09-03 Thread Yury Kotov
Add qtest_set_expected_status function to set expected exit status of child process. By default expected exit status is 0. Signed-off-by: Yury Kotov --- tests/libqtest.c | 36 +--- tests/libqtest.h | 9 + 2 files changed, 30 insertions(+), 15 deletions

[Qemu-devel] [PATCH v2 3/3] tests/migration: Add a test for validate-uuid capability

2019-09-03 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/migration-test.c | 140 - 1 file changed, 110 insertions(+), 30 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index b87ba99a9e..524caf773f 100644 --- a/tests/migration-test.c +++ b/tests

[Qemu-devel] [PATCH v2 0/3] UUID validation during migration

2019-09-03 Thread Yury Kotov
ility validate-uuid only affects the source so that it sends its UUID to the target. The target will validate the received UUID and stop the migration if UUIDs are not equal. Regards, Yury Yury Kotov (3): migration: Add validate-uuid capability tests/libqtest: Allow setting expected exit status

[Qemu-devel] [PATCH v6 0/3] High downtime with 95+ throttle pct

2019-09-09 Thread Yury Kotov
ms+ for high throttle percentage (>=95%) in VCPU thread. And it sleeps even after a cpu kick. Fixed it by using timedwait for ms part of sleep. E.g timedwait(halt_cond, 1ms) + usleep(500). Regards, Yury Yury Kotov (3): qemu-thread: Add qemu_cond_timedwait cpus: Fix throttling during vm_st

[Qemu-devel] [PATCH v6 2/3] cpus: Fix throttling during vm_stop

2019-09-09 Thread Yury Kotov
100ms even for downtime-limit 1ms. Use qemu_cond_timedwait for high percentage to wake up during vm_stop. Signed-off-by: Yury Kotov Reviewed-by: Eric Blake --- cpus.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index 85cd4

[Qemu-devel] [PATCH v6 3/3] tests/migration: Add a test for auto converge

2019-09-09 Thread Yury Kotov
Signed-off-by: Yury Kotov Reviewed-by: Dr. David Alan Gilbert --- tests/migration-test.c | 120 + 1 file changed, 109 insertions(+), 11 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index a9f81cc185..7064b341e7 100644 --- a

[Qemu-devel] [PATCH v6 1/3] qemu-thread: Add qemu_cond_timedwait

2019-09-09 Thread Yury Kotov
ned-off-by: Yury Kotov --- include/qemu/thread.h| 19 +++ util/qemu-thread-posix.c | 41 util/qemu-thread-win32.c | 17 + util/qsp.c | 20 4 files changed, 85 insertions(+), 12 deletion

[Qemu-devel] [PATCH v7 2/3] cpus: Fix throttling during vm_stop

2019-09-09 Thread Yury Kotov
100ms even for downtime-limit 1ms. Use qemu_cond_timedwait for high percentage to wake up during vm_stop. Signed-off-by: Yury Kotov Reviewed-by: Eric Blake --- cpus.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index 85cd4

[Qemu-devel] [PATCH v7 1/3] qemu-thread: Add qemu_cond_timedwait

2019-09-09 Thread Yury Kotov
ned-off-by: Yury Kotov --- include/qemu/thread.h| 19 +++ util/qemu-thread-posix.c | 41 util/qemu-thread-win32.c | 17 + util/qsp.c | 20 4 files changed, 85 insertions(+), 12 deletion

[Qemu-devel] [PATCH v7 3/3] tests/migration: Add a test for auto converge

2019-09-09 Thread Yury Kotov
Signed-off-by: Yury Kotov Reviewed-by: Dr. David Alan Gilbert --- tests/migration-test.c | 130 + 1 file changed, 119 insertions(+), 11 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index a9f81cc185..966d458d72 100644 --- a

[Qemu-devel] [PATCH v7 0/3] High downtime with 95+ throttle pct

2019-09-09 Thread Yury Kotov
cpu_throttle_thread() function sleeps for 100ms+ for high throttle percentage (>=95%) in VCPU thread. And it sleeps even after a cpu kick. Fixed it by using timedwait for ms part of sleep. E.g timedwait(halt_cond, 1ms) + usleep(500). Regards, Yury Yury Kotov (3): qemu-thread: Add qemu_con

Re: [Qemu-devel] [PATCH v6 0/3] High downtime with 95+ throttle pct

2019-09-09 Thread Yury Kotov
nzini" : > On 09/09/19 12:49, Yury Kotov wrote: >>  Hi, >> >>  V6: >>  * Fix "Add qemu_cond_timedwait" patch: >>    - Changed return type for qemu_cond_timedwait (void -> bool) >>    - Added details in commit message >> >>  V5: >

Re: [Qemu-devel] [PATCH v3 0/5] Add ignore-external migration capability

2019-03-06 Thread Yury Kotov
05.03.2019, 21:06, "Dr. David Alan Gilbert" : > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: >>  * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  > Hi, >>  > >>  > The series adds a migration capability, which allows to skip shared RAM >

Re: [Qemu-devel] [PATCH v2 0/5] Add ignore-external migration capability

2019-02-11 Thread Yury Kotov
Ping 04.02.2019, 16:27, "Yury Kotov" : > Hi, > > The series adds a migration capability, which allows to skip shared RAM blocks > during the migration. It's useful for fast local migration. E.g. to update > QEMU > for the running guests. > > Usage example:

Re: [Qemu-devel] [PATCH v2 2/4] migration: Introduce ignore-shared capability

2019-02-11 Thread Yury Kotov
11.02.2019, 15:45, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  We want to use local migration to update QEMU for running guests. >>  In this case we don't need to migrate shared (file backed) RAM. >>  So, add a capabili

Re: [Qemu-devel] [PATCH v2 3/4] tests/migration-test: Add a test for ignore-shared capability

2019-02-12 Thread Yury Kotov
11.02.2019, 16:17, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  Signed-off-by: Yury Kotov >>  --- >>   tests/migration-test.c | 109 + >>   1 file changed, 89 insertions(+), 20 d

Re: [Qemu-devel] [PATCH v2 4/4] migration: Add capabilities validation

2019-02-12 Thread Yury Kotov
11.02.2019, 16:30, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  Currently we don't check which capabilities set in the source QEMU. >>  We just expect that the target QEMU has the same enabled capabilities. >> >>  Add ex

[Qemu-devel] [PATCH v3 1/5] exec: Change RAMBlockIterFunc definition

2019-02-15 Thread Yury Kotov
_host (which also enumerates blocks). So, this patch reduces complexity of qemu_ram_foreach_block() -> cb() -> qemu_ram_block_from_host() from O(n^2) to O(n). Fix RAMBlockIterFunc definition and add some functions to read RAMBlock* fields witch were passed. Signed-off-by: Yury Kotov

[Qemu-devel] [PATCH v3 2/5] migration: Introduce ignore-shared capability

2019-02-15 Thread Yury Kotov
We want to use local migration to update QEMU for running guests. In this case we don't need to migrate shared (file backed) RAM. So, add a capability to ignore such blocks during live migration. Signed-off-by: Yury Kotov --- migration/migration.c | 14 ++ migration/migration.h

[Qemu-devel] [PATCH v3 0/5] Add ignore-external migration capability

2019-02-15 Thread Yury Kotov
able postcopy and ignore-shared together * Skip the test for OSs which don't have /dev/shm * Add a check whether shared RAM has been really skipped V1 to V2: * Keep migration stream compatibility * Reuse the existing code to ignore unwanted RAMBlocks * Add capability validation feature * i

[Qemu-devel] [PATCH v3 4/5] tests/migration-test: Add a test for ignore-shared capability

2019-02-15 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/migration-test.c | 131 + 1 file changed, 106 insertions(+), 25 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index 8352612364..dd604c4f21 100644 --- a/tests/migration-test.c +++ b/tests

[Qemu-devel] [PATCH v3 5/5] migration: Add capabilities validation

2019-02-15 Thread Yury Kotov
igned-off-by: Yury Kotov --- migration/savevm.c | 137 + 1 file changed, 137 insertions(+) diff --git a/migration/savevm.c b/migration/savevm.c index 322660438d..a721cf5868 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -57,6 +57,7 @@ #in

[Qemu-devel] [PATCH v3 3/5] migration: Add an ability to ignore shared RAM blocks

2019-02-15 Thread Yury Kotov
If ignore-shared capability is set then skip shared RAMBlocks during the RAM migration. Also, move qemu_ram_foreach_migratable_block (and rename) to the migration code, because it requires access to the migration capabilities. Signed-off-by: Yury Kotov --- exec.c| 19

[Qemu-devel] Question about bdrv_co_invalidate_cache

2019-07-01 Thread Yury Kotov
Hi, I just want to clarify the purpose of bdrv_co_invalidate_cache callback. IIUC on of the purposes of this callback is to "activate" BDRV (opposite of the bdrv_inactivate callback) on migration end, right? E.g, if we have a custom BDRV which is backed by some network block storage with exclusiv

Re: [Qemu-devel] [PATCH] migration: Fix use-after-free during process exit

2019-09-13 Thread Yury Kotov
Hi Vladimir! 13.09.2019, 16:43, "Vladimir Sementsov-Ogievskiy" : > Hi! > > 08.04.2019 14:33, Yury Kotov wrote: >>  It fixes heap-use-after-free which was found by clang's ASAN. >> >>  Control flow of this use-after-free: >>  main_thread

Re: [Qemu-devel] [PULL v2 00/29] Misc patches for 2019-09-16

2019-09-17 Thread Yury Kotov
Wei Yang (5): >   exec.c: replace hwaddr with uint64_t for better understanding >   exec.c: get nodes_nb_alloc with one MAX calculation >   exec.c: subpage->sub_section is already initialized to 0 >   exec.c: correct the maximum skip value during compact >   exec.c:

[PATCH] migration: Fix the re-run check of the migrate-incoming command

2019-11-13 Thread Yury Kotov
The current check sets an error but doesn't fail the command. This may cause a problem if new connection attempt by the same URI affects the first connection. Signed-off-by: Yury Kotov --- migration/migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/migratio

[PATCH] monitor: Remove unused define

2019-11-19 Thread Yury Kotov
Remove the definition of QMP_ACCEPT_UNKNOWNS as it is unused since refactoring 5c678ee8d940 Signed-off-by: Yury Kotov --- monitor/misc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/monitor/misc.c b/monitor/misc.c index 3baa15f3bf..6680734ea1 100644 --- a/monitor/misc.c +++ b/monitor

Re: [Qemu-devel] [PATCH v4 0/3] High downtime with 95+ throttle pct

2019-08-23 Thread Yury Kotov
Hi, 19.08.2019, 20:11, "Paolo Bonzini" : > On 19/08/19 18:39, Paolo Bonzini wrote: >>  On 15/08/19 11:13, Yury Kotov wrote: >>>  Ping ping >> >>  Hi, >> >>  sorry for the delay, I was waiting for the 4.1 release. >> >>  I would

[Qemu-devel] [PATCH v5 1/3] qemu-thread: Add qemu_cond_timedwait

2019-08-26 Thread Yury Kotov
Signed-off-by: Yury Kotov --- include/qemu/thread.h| 18 ++ util/qemu-thread-posix.c | 40 util/qemu-thread-win32.c | 16 util/qsp.c | 18 ++ 4 files changed, 80 insertions(+), 12

[Qemu-devel] [PATCH v5 3/3] tests/migration: Add a test for auto converge

2019-08-26 Thread Yury Kotov
Signed-off-by: Yury Kotov Reviewed-by: Dr. David Alan Gilbert --- tests/migration-test.c | 120 + 1 file changed, 109 insertions(+), 11 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index b87ba99a9e..e5caf93dfa 100644 --- a

[Qemu-devel] [PATCH v5 0/3] High downtime with 95+ throttle pct

2019-08-26 Thread Yury Kotov
ait(halt_cond, 1ms) + usleep(500). Regards, Yury Yury Kotov (3): qemu-thread: Add qemu_cond_timedwait cpus: Fix throttling during vm_stop tests/migration: Add a test for auto converge cpus.c | 25 +--- include/qemu/thread.h| 18 ++ te

[Qemu-devel] [PATCH v5 2/3] cpus: Fix throttling during vm_stop

2019-08-26 Thread Yury Kotov
100ms even for downtime-limit 1ms. Use qemu_cond_timedwait for high percentage to wake up during vm_stop. Signed-off-by: Yury Kotov --- cpus.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index 85cd451a86..d2c61ff155 100644 --- a/c

Re: [Qemu-devel] [PATCH v5 3/3] tests/migration: Add a test for auto converge

2019-08-26 Thread Yury Kotov
David, I kept your Reviewed-by, but could you take another look at the test? I've made many changes in it. Thanks! 26.08.2019, 13:39, "Yury Kotov" : > Signed-off-by: Yury Kotov > Reviewed-by: Dr. David Alan Gilbert > --- >  t

[Qemu-devel] [PATCH 0/3] UUID validation during migration

2019-08-27 Thread Yury Kotov
e the received UUID and stop the migration if UUIDs are not equal. Regards, Yury Yury Kotov (3): migration: Add x-validate-uuid capability tests/libqtest: Allow to set expected exit status tests/migration: Add a test for x-validate-uuid capability migration/migration.c | 9 +++ migr

[Qemu-devel] [PATCH 1/3] migration: Add x-validate-uuid capability

2019-08-27 Thread Yury Kotov
This capability realizes simple source validation by UUID. It's useful for live migration between hosts. Signed-off-by: Yury Kotov --- migration/migration.c | 9 + migration/migration.h | 1 + migration/savevm.c| 45 +++ qapi/migration

[Qemu-devel] [PATCH 3/3] tests/migration: Add a test for x-validate-uuid capability

2019-08-27 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/migration-test.c | 140 - 1 file changed, 110 insertions(+), 30 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index b87ba99a9e..adac1c01a2 100644 --- a/tests/migration-test.c +++ b/tests

[Qemu-devel] [PATCH 2/3] tests/libqtest: Allow to set expected exit status

2019-08-27 Thread Yury Kotov
Add qtest_set_expected_status function to set expected exit status of child process. By default expected exit status is 0. Signed-off-by: Yury Kotov --- tests/libqtest.c | 14 +++--- tests/libqtest.h | 9 + 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/tests

Re: [Qemu-devel] [PATCH 1/3] migration: Add x-validate-uuid capability

2019-08-27 Thread Yury Kotov
27.08.2019, 17:02, "Eric Blake" : > On 8/27/19 7:02 AM, Yury Kotov wrote: >>  This capability realizes simple source validation by UUID. >>  It's useful for live migration between hosts. >> >>  Signed-off-by: Yury Kotov >>  --- >>   migratio

Re: [Qemu-devel] [PATCH 2/3] tests/libqtest: Allow to set expected exit status

2019-08-27 Thread Yury Kotov
27.08.2019, 16:53, "Marc-André Lureau" : > Hi > > On Tue, Aug 27, 2019 at 4:09 PM Yury Kotov wrote: >>  Add qtest_set_expected_status function to set expected exit status of >>  child process. By default expected exit status is 0. >> >>  Signed-off-by

Re: [Qemu-devel] [PATCH 2/3] tests/libqtest: Allow to set expected exit status

2019-08-27 Thread Yury Kotov
27.08.2019, 17:04, "Eric Blake" : > On 8/27/19 7:02 AM, Yury Kotov wrote: > > In the subject: 'Allow to $verb' is not idiomatic; either 'Allow > $subject to $verb' or 'Allow ${verb}ing' sound better. In this case, > I'd go with: > >

[RFC PATCH] pcie: Defer hot unplug until migration is complete

2020-01-13 Thread Yury Kotov
off-by: Yury Kotov --- hw/pci-bridge/gen_pcie_root_port.c | 7 hw/pci-bridge/ioh3420.c| 7 hw/pci-bridge/xio3130_downstream.c | 7 hw/pci/pcie.c | 54 +++--- hw/pci/pcie_port.c |

Re: [RFC PATCH 0/1] Removing RAMBlocks during migration

2020-01-13 Thread Yury Kotov
Hi! 07.01.2020, 23:08, "Michael S. Tsirkin" : > On Fri, Jan 03, 2020 at 11:44:27AM +, Dr. David Alan Gilbert wrote: >>  > 1) Guest: writes to slot's pci config >>  > 2) QEMU: pcie_cap_slot_write_config -> pcie_unplug_device >>  > >>  > So, it's only guest driven action and qdev_unplug doesn't

[PATCH 2/2] monitor: Add an input buffer for QMP reading

2019-12-19 Thread Yury Kotov
the main loop are required to handle a command. This patch adds an input buffer to speed up reading and to keep the guarantee of executing one command at a time. Signed-off-by: Yury Kotov --- monitor/monitor-internal.h | 11 +++ monitor/monitor.c | 27

[PATCH 0/2] Speed up QMP stream reading

2019-12-19 Thread Yury Kotov
/qemu-devel/2019-11/msg05018.html This series is an attempt to fix problems described. Regards, Yury Yury Kotov (2): monitor: Split monitor_can_read for QMP and HMP monitor: Add an input buffer for QMP reading monitor/hmp.c | 7 +++ monitor/monitor-internal.h | 12

[PATCH 1/2] monitor: Split monitor_can_read for QMP and HMP

2019-12-19 Thread Yury Kotov
This patch itself doesn't make sense, it is needed for the next patch. Signed-off-by: Yury Kotov --- monitor/hmp.c | 7 +++ monitor/monitor-internal.h | 1 - monitor/monitor.c | 7 --- monitor/qmp.c | 11 +-- 4 files changed, 16 inser

Re: [RFC PATCH 0/1] Removing RAMBlocks during migration

2019-12-23 Thread Yury Kotov
Hi! 11.12.2019, 14:17, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  Hi, >> >>  I found that it's possible to remove a RAMBlock during migration. >>  E.g. device hot-unplugging initiated by a guest (how to reproduce is

Re: [PATCH 0/2] Speed up QMP stream reading

2019-12-23 Thread Yury Kotov
Hi! 20.12.2019, 19:09, "Markus Armbruster" : > Yury Kotov writes: > >> Hi, >> >> This series is continuation of another one: >> [PATCH] monitor: Fix slow reading >> https://lists.gnu.org/archive/html/qemu-devel/2019-11/msg03722.html >> &g

[Qemu-devel] [PATCH] migration: fix migration shutdown

2019-04-03 Thread Yury Kotov
Intra object redzone:bb ASan internal: fe Left alloca redzone: ca Right alloca redzone:cb Shadow gap: cc ==31958==ABORTING Signed-off-by: Yury Kotov --- migration/migration.c | 30 -- 1 file changed, 24 insertions(+), 6 del

Re: [Qemu-devel] [PATCH] hostmem: Disable add/del memory during migration

2019-04-03 Thread Yury Kotov
25.03.2019, 14:58, "Juan Quintela" : > Yury Kotov wrote: >>  I found a bug in QEMU 2.12 with adding memory-backend while live migration >>  thread is running. >> >>  But it seems that this bug was implicitly fixed in this commit (QEMU 3.0): >>    

Re: [Qemu-devel] [PATCH] migration: fix migration shutdown

2019-04-04 Thread Yury Kotov
03.04.2019, 22:06, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  It fixes heap-use-after-free which was found by clang's ASAN. >> >>  Control flow of this use-after-free: >>  main_thread: >>  * Got

Re: [Qemu-devel] [RFC PATCH] QEMU may write to system_memory before guest starts

2019-04-04 Thread Yury Kotov
(yury-ko...@yandex-team.ru) wrote: >>  Ping > > Is this fixed by Catherine Ho's patch series? > > Dave > >>  21.03.2019, 19:27, "Yury Kotov" : >>  > Hi, >>  > >>  > 19.03.2019, 14:52, "Dr. David Alan Gilbert" : >>  

[Qemu-devel] [PATCH] migration: Fix use-after-free during process exit

2019-04-08 Thread Yury Kotov
ight alloca redzone: cb Shadow gap: cc ==31958==ABORTING Signed-off-by: Yury Kotov --- migration/migration.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 609e0df5d0..b9848d1030 100644 --- a/migr

Re: [Qemu-devel] [PATCH] migration: fix migration shutdown

2019-04-08 Thread Yury Kotov
Hi, I've sent another patch to fix this UAF: "migration: Fix use-after-free during process exit" It's more simple and fixes only the regression. Regards, Yury 05.04.2019, 12:07, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >&

[Qemu-devel] [PATCH] migration: Fix handling fd protocol

2019-04-10 Thread Yury Kotov
: remove-fd (fdset = 0, fd = 33): removes fd from fdset 0 and qemu_close() -> close(33) => double close For outgoing migration the case is the same but getfd instead of add-fd. Fix it by duping client's fd. Signed-off-by: Yury Kotov ---

  1   2   >