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

2019-04-10 Thread Yury Kotov
Hi, 10.04.2019, 16:58, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  Currently such case is possible for incoming: >>  QMP: add-fd (fdset = 0, fd of some file): >>  adds fd to fdset 0 and returns QEMU's fd (e.g. 33) >

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

2019-04-11 Thread Yury Kotov
11.04.2019, 15:04, "Daniel P. Berrangé" : > On Wed, Apr 10, 2019 at 12:26:52PM +0300, Yury Kotov wrote: >>  Currently such case is possible for incoming: >>  QMP: add-fd (fdset = 0, fd of some file): >>  adds fd to fdset 0 and returns QEMU's fd (e.g. 33) >

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

2019-04-11 Thread Yury Kotov
11.04.2019, 15:39, "Daniel P. Berrangé" : > On Thu, Apr 11, 2019 at 03:31:43PM +0300, Yury Kotov wrote: >>  11.04.2019, 15:04, "Daniel P. Berrangé" : >>  > On Wed, Apr 10, 2019 at 12:26:52PM +0300, Yury Kotov wrote: >>  >>  Currently such case is

[Qemu-devel] [PATCH 3/3] migration-test: Add a test for inline_fd protocol

2019-04-12 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/libqtest.c | 83 +++-- tests/libqtest.h | 51 +- tests/migration-test.c | 117 + 3 files changed, 236 insertions(+), 15 deletions(-) diff --git a/tests/libqtest.c b

[Qemu-devel] [PATCH 1/3] monitor: Add monitor_recv_fd function to work with sent fds

2019-04-12 Thread Yury Kotov
Signed-off-by: Yury Kotov --- include/monitor/monitor.h | 1 + monitor.c | 15 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index c1b40a9cac..9b9e593fb3 100644 --- a/include/monitor

[Qemu-devel] [PATCH 0/3] Add 'inline-fd:' protocol for migration

2019-04-12 Thread Yury Kotov
d-fd commands. If client doesn't want to work with this fd before or after migration then it's easier to send an fd with the migrate-* command. Also, client shouldn't maintain this fd. Usage: { 'execute': 'migrate', 'arguments': { 'uri': 

[Qemu-devel] [PATCH 2/3] migration: Add inline-fd protocol

2019-04-12 Thread Yury Kotov
d:' proto to work with sent fd. Usage: { 'execute': 'migrate', 'arguments': { 'uri': 'inline-fd:' } } { 'execute': 'migrate-incoming', 'arguments': { 'uri': 'inline-fd:' } } Signed-off-by: Yur

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

2019-04-15 Thread Yury Kotov
fd), so adding additional logic might not be a very good idea. I don't see any other solution, but I might miss something. What do you think? Regards, Yury 11.04.2019, 15:58, "Yury Kotov" : > 11.04.2019, 15:39, "Daniel P. Berrangé" : >>  On Thu, Apr 11, 2019 at 03:

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

2019-04-15 Thread Yury Kotov
15.04.2019, 13:11, "Daniel P. Berrangé" : > On Mon, Apr 15, 2019 at 12:50:08PM +0300, Yury Kotov wrote: >>  Hi, >> >>  Just to clarify. I see two possible solutions: >> >>  1) Since the migration code doesn't receive fd, it isn't respon

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

2019-04-15 Thread Yury Kotov
15.04.2019, 13:17, "Yury Kotov" : > 15.04.2019, 13:11, "Daniel P. Berrangé" : >>  On Mon, Apr 15, 2019 at 12:50:08PM +0300, Yury Kotov wrote: >>>   Hi, >>> >>>   Just to clarify. I see two possible solutions: >>> >>>

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

2019-04-15 Thread Yury Kotov
15.04.2019, 13:25, "Daniel P. Berrangé" : > On Mon, Apr 15, 2019 at 01:17:06PM +0300, Yury Kotov wrote: >>  15.04.2019, 13:11, "Daniel P. Berrangé" : >>  > On Mon, Apr 15, 2019 at 12:50:08PM +0300, Yury Kotov wrote: >>  >>  Hi, >>  

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

2019-04-15 Thread Yury Kotov
15.04.2019, 14:30, "Dr. David Alan Gilbert" : > * Daniel P. Berrangé (berra...@redhat.com) wrote: >>  On Mon, Apr 15, 2019 at 12:15:12PM +0100, Dr. David Alan Gilbert wrote: >>  > * Daniel P. Berrangé (berra...@redhat.com) wrote: >>  > > On Mon, Apr 15, 20

Re: [Qemu-devel] [PATCH v3] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-27 Thread Yury Kotov
Ping 23.05.2019, 12:45, "Yury Kotov" : > monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() > return mon_fdset->id which is int64_t. Downcasting from int64_t to int > leads to a bug with removing fd from fdset with id >= 2^32. > So, fix return types fo

[Qemu-devel] [PATCH 0/2] Deferred incoming migration through fd

2019-05-27 Thread Yury Kotov
:"fd-mig") 4. Source VM: getfd("fd-mig") 5. Source VM: migrate("fd-mig") Currently, it's not possible to do the step 3, because for incoming migration "fd:" protocol expects an integer, not the name of fd. Yury Kotov (2): migration: Fix fd protocol

[Qemu-devel] [PATCH 1/2] migration: Fix fd protocol for incoming defer

2019-05-27 Thread Yury Kotov
icular fds. To work with getfd in incoming defer it's enough to use monitor_fd_param instead of strtol. monitor_fd_param supports both cases: * fd:123 * fd:fd_name (added by getfd). Signed-off-by: Yury Kotov --- migration/fd.c | 8 +--- migration/fd.h | 2 +- 2 files changed, 6 i

[Qemu-devel] [PATCH 2/2] migration-test: Add a test for fd protocol

2019-05-27 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/libqtest.c | 83 ++-- tests/libqtest.h | 51 +++- tests/migration-test.c | 107 +++-- 3 files changed, 233 insertions(+), 8 deletions(-) diff --git a/tests

Re: [Qemu-devel] [PATCH 2/2] migration-test: Add a test for fd protocol

2019-05-27 Thread Yury Kotov
27.05.2019, 12:35, "Yury Kotov" : > Signed-off-by: Yury Kotov > --- >  tests/libqtest.c | 83 ++-- >  tests/libqtest.h | 51 +++- >  tests/migration-test.c | 107 +++-- >  3 files c

[Qemu-devel] [PATCH v2 1/2] migration: Fix fd protocol for incoming defer

2019-05-28 Thread Yury Kotov
icular fds. To work with getfd in incoming defer it's enough to use monitor_fd_param instead of strtol. monitor_fd_param supports both cases: * fd:123 * fd:fd_name (added by getfd). And also the use of monitor_fd_param improves error messages. Signed-off-by: Yury Kotov Reviewed-by: Juan

[Qemu-devel] [PATCH v2 2/2] migration-test: Add a test for fd protocol

2019-05-28 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/libqtest.c | 80 ++-- tests/libqtest.h | 51 - tests/migration-test.c | 101 + 3 files changed, 227 insertions(+), 5 deletions(-) diff --git a/tests

[Qemu-devel] [PATCH v2 0/2] Deferred incoming migration through fd

2019-05-28 Thread Yury Kotov
incoming migration "fd:" protocol expects an integer, not the name of fd. Yury Kotov (2): migration: Fix fd protocol for incoming defer migration-test: Add a test for fd protocol migration/fd.c | 8 ++-- migration/fd.h | 2 +- tests/libqt

Re: [Qemu-devel] [RFC PATCH 2/2] cpus: Fix throttling during vm_stop

2019-07-15 Thread Yury Kotov
Hi, 10.07.2019, 12:26, "Yury Kotov" : > Throttling thread sleeps in VCPU thread. For high throttle percentage > this sleep is more than 10ms. E.g. for 60% - 15ms, for 99% - 990ms. > vm_stop() kicks all VCPUs and waits for them. It's called at the end of > migration an

Re: [Qemu-devel] [RFC PATCH 2/2] cpus: Fix throttling during vm_stop

2019-07-15 Thread Yury Kotov
15.07.2019, 14:00, "Paolo Bonzini" : > On 15/07/19 11:40, Yury Kotov wrote: >>  Hi, >> >>  10.07.2019, 12:26, "Yury Kotov" : >>>  Throttling thread sleeps in VCPU thread. For high throttle percentage >>>  this sleep is more than 10ms. E.g

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

2019-07-16 Thread Yury Kotov
ck. I tried to fix 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_stop tests/migration: Add a test for auto converge cpus.c | 2

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

2019-07-16 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 | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index ffc57119ca..c8817c9da7 100644

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

2019-07-16 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 v2 3/3] tests/migration: Add a test for auto converge

2019-07-16 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/migration-test.c | 119 + 1 file changed, 108 insertions(+), 11 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index e0407576cb..8a755dfaf2 100644 --- a/tests/migration-test.c +++ b/tests

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

2019-07-17 Thread Yury Kotov
Hi, I'm a bit worried that this patch might have been forgotten. Is it queued? Thanks! 14.06.2019, 19:56, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  Currently, there is no information about error if outgoing migration was >&

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

2019-07-18 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 | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index 927a00aa90..3baedd554c 100644

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

2019-07-18 Thread Yury Kotov
tle 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_stop tests/mi

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

2019-07-18 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 v3 3/3] tests/migration: Add a test for auto converge

2019-07-18 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/migration-test.c | 119 + 1 file changed, 108 insertions(+), 11 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index a4feb9545d..bb69517fc8 100644 --- a/tests/migration-test.c +++ b/tests

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

2019-07-23 Thread Yury Kotov
22.07.2019, 20:35, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  Signed-off-by: Yury Kotov > > This looks OK to me, but have you tried it on a really really overloaded > host? > I worry that you might skip some of the percentage s

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

2019-07-23 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 | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index 927a00aa90..3baedd554c 100644

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

2019-07-23 Thread Yury Kotov
hrottle_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_cond_time

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

2019-07-23 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 v4 3/3] tests/migration: Add a test for auto converge

2019-07-23 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/migration-test.c | 103 - 1 file changed, 92 insertions(+), 11 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index a4feb9545d..b783ae47b3 100644 --- a/tests/migration-test.c +++ b/tests

[Qemu-devel] [RFC PATCH 1/2] qemu-thread: Add qemu_cond_timedwait

2019-07-10 Thread Yury Kotov
Signed-off-by: Yury Kotov --- include/qemu/thread.h| 12 util/qemu-thread-posix.c | 40 util/qemu-thread-win32.c | 16 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/include/qemu/thread.h b/include/qemu

[Qemu-devel] [RFC PATCH 0/2] High downtime with 95+ throttle pct

2019-07-10 Thread Yury Kotov
using qemu_bql_mutex_lock_func function which could be anything. This is why the series is RFC. What do you think? Thanks! Yury Kotov (2): qemu-thread: Add qemu_cond_timedwait cpus: Fix throttling during vm_stop cpus.c | 27 +++ include/qemu/thread.h

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

2019-07-10 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 | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index ffc57119ca..3c069cdc33 100644

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

2019-07-10 Thread Yury Kotov
10.07.2019, 12:57, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  Hi, >> >>  I wrote a test for migration auto converge and found out a strange thing: >>  1. Enable auto converge >>  2. Set max-bandwidth 1Gb/s >>  3

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

2019-04-16 Thread Yury Kotov
15.04.2019, 15:21, "Yury Kotov" : > 15.04.2019, 14:30, "Dr. David Alan Gilbert" : >>  * Daniel P. Berrangé (berra...@redhat.com) wrote: >>>   On Mon, Apr 15, 2019 at 12:15:12PM +0100, Dr. David Alan Gilbert wrote: >>>   > * Daniel P. Berrangé (be

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

2019-04-16 Thread Yury Kotov
15.04.2019, 14:30, "Dr. David Alan Gilbert" : > * Daniel P. Berrangé (berra...@redhat.com) wrote: >>  On Mon, Apr 15, 2019 at 12:15:12PM +0100, Dr. David Alan Gilbert wrote: >>  > * Daniel P. Berrangé (berra...@redhat.com) wrote: >>  > > On Mon, Apr 15, 20

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

2019-04-17 Thread Yury Kotov
Ping 08.04.2019, 14:34, "Yury Kotov" : > It fixes heap-use-after-free which was found by clang's ASAN. > > Control flow of this use-after-free: > main_thread: > * Got SIGTERM and completes main loop > * Calls migration_shutdown >   - migrate_fd_ca

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

2019-04-17 Thread Yury Kotov
Ping 04.04.2019, 13:01, "Yury Kotov" : > I saw Catherine Ho's patch series and it seems ok to me, but in this RFC I > asked > about a way how to detect other writes which may not be covered by particular > fixes. > Perhaps this is excessive caution... > > R

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

2019-04-18 Thread Yury Kotov
18.04.2019, 17:20, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  15.04.2019, 14:30, "Dr. David Alan Gilbert" : >>  > * Daniel P. Berrangé (berra...@redhat.com) wrote: >>  >>  On Mon, Apr 15, 2019

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

2019-04-18 Thread Yury Kotov
18.04.2019, 19:03, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  18.04.2019, 17:20, "Dr. David Alan Gilbert" : >>  > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  >>  15.04.2019, 14:30, "Dr. Davi

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

2019-04-18 Thread Yury Kotov
18.04.2019, 20:01, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  18.04.2019, 19:03, "Dr. David Alan Gilbert" : >>  > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  >>  18.04.2019, 17:20, "Dr. David Al

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

2019-04-22 Thread Yury Kotov
or_obj/qemu_file_set_error_obj 3) And finally using of qemu_file_get_error_obj in migration.c And now, the status for the mentioned fail will be: -> { "execute": "query-migrate" } <- { "return": { "status": "failed", "erro

[Qemu-devel] [PATCH] trace: fix runstate tracing

2019-04-26 Thread Yury Kotov
Signed-off-by: Yury Kotov --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index ff5dfb6fbc..ad9b181e57 100644 --- a/vl.c +++ b/vl.c @@ -725,7 +725,7 @@ void runstate_set(RunState new_state) assert(new_state < RUN_STATE__

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

2019-02-04 Thread Yury Kotov
t;, "state": true } ] } } 4. Start migration. Another use case I keep in mind is to migrate to file. Usage is very similar. V1 to V2: * Keep migration stream compatibility * Reuse the existing code to ignore unwanted RAMBlocks * Add capability validation feature * ignore-external ->

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

2019-02-04 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 8352612364..485f42b2d2 100644 --- a/tests/migration-test.c +++ b/tests

[Qemu-devel] [PATCH v2 1/4] exec: Change RAMBlockIterFunc definition

2019-02-04 Thread Yury Kotov
assed. Signed-off-by: Yury Kotov --- exec.c| 21 + include/exec/cpu-common.h | 6 -- migration/postcopy-ram.c | 36 +--- migration/rdma.c | 7 +-- util/vfio-helpers.c | 6 +++--- 5 files change

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

2019-02-04 Thread Yury Kotov
uires access to the migration capabilities. Signed-off-by: Yury Kotov --- exec.c| 19 --- include/exec/cpu-common.h | 1 - migration/migration.c | 9 migration/migration.h | 5 +- migration/postcopy-ram.c | 12 ++--- migration/ram.c

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

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

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

2019-03-15 Thread Yury Kotov
15.03.2019, 12:46, "Daniel P. Berrangé" : > On Thu, Mar 14, 2019 at 03:31:47PM +0300, Yury Kotov wrote: >>  Hi, >> >>  14.03.2019, 14:44, "Daniel P. Berrangé" : >>  > On Thu, Mar 14, 2019 at 07:34:03AM -0400, Michael S. Tsirkin wrote: >>

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

2019-03-19 Thread Yury Kotov
19.03.2019, 12:39, "Dr. David Alan Gilbert" : > * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>  This patch isn't intended to merge. Just to reproduce a problem. >> >>  The test for x-ignore-shread capability fails on aarch64 + tcg: >>  Memory conten

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

2019-03-21 Thread Yury Kotov
Hi, 19.03.2019, 14:52, "Dr. David Alan Gilbert" : > * Peter Maydell (peter.mayd...@linaro.org) wrote: >>  On Tue, 19 Mar 2019 at 11:03, Dr. David Alan Gilbert >>   wrote: >>  > >>  > * Peter Maydell (peter.mayd...@linaro.org) wrote: >>  > > I didn't think migration distinguished between "main memo

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

2019-03-25 Thread Yury Kotov
64/clone.S:109 Signed-off-by: Yury Kotov --- backends/hostmem.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index f61093654e..5c71bd3f6b 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -18,6 +18,7 @@ #inc

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

2019-05-14 Thread Yury Kotov
Ping 18.04.2019, 20:46, "Yury Kotov" : > 18.04.2019, 20:01, "Dr. David Alan Gilbert" : >>  * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>>   18.04.2019, 19:03, "Dr. David Alan Gilbert" : >>>   > * Yury Kotov (yury-ko...@yandex-

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

2019-05-14 Thread Yury Kotov
Ping ping 17.04.2019, 15:44, "Yury Kotov" : > Ping > > 08.04.2019, 14:34, "Yury Kotov" : >>  It fixes heap-use-after-free which was found by clang's ASAN. >> >>  Control flow of this use-after-free: >>  main_thread: >>  * Got SI

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

2019-05-14 Thread Yury Kotov
Ping ping 17.04.2019, 15:46, "Yury Kotov" : > Ping > > 04.04.2019, 13:01, "Yury Kotov" : >>  I saw Catherine Ho's patch series and it seems ok to me, but in this RFC I >> asked >>  about a way how to detect other writes which may not be cove

[Qemu-devel] [PATCH RESEND] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-14 Thread Yury Kotov
monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() returns mon_fdset->id which is int64_t. Downcast from int64_t to int leads to a bug with removing fd from fdset which id >= 2^32. So, fix return types for these function. Signed-off-by: Yury Kotov --- include/monitor/mon

Re: [Qemu-devel] [PATCH RESEND] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-14 Thread Yury Kotov
14.05.2019, 17:05, "Eric Blake" : > On 5/14/19 8:15 AM, Yury Kotov wrote: >>  monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() >>  returns mon_fdset->id which is int64_t. Downcast from int64_t to int leads >> to >>  a bug with removing fd

Re: [Qemu-devel] [Qemu-trivial] [PATCH RESEND] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-14 Thread Yury Kotov
14.05.2019, 17:01, "Markus Armbruster" : > Yury Kotov writes: > >>  monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() >>  returns mon_fdset->id which is int64_t. Downcast from int64_t to int leads >> to > > Grammar nits: > >  

[Qemu-devel] [PATCH v2] monitor: Fix fdset_id & fd types for corresponding QMP commands

2019-05-14 Thread Yury Kotov
d-off-by: Yury Kotov --- include/monitor/monitor.h | 6 +++--- monitor.c | 18 +- qapi/misc.json| 10 +- stubs/fdset.c | 4 ++-- util/osdep.c | 4 ++-- vl.c | 2 +- 6 files changed, 22 inser

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

2019-05-20 Thread Yury Kotov
se cases in > the future? > > On Tue, May 14, 2019 at 12:42:14PM +0300, Yury Kotov wrote: >>  Ping ping >> >>  17.04.2019, 15:46, "Yury Kotov" : >>  > Ping >>  > >>  > 04.04.2019, 13:01, "Yury Kotov" : >>  >>  I

Re: [Qemu-devel] [PATCH v2] monitor: Fix fdset_id & fd types for corresponding QMP commands

2019-05-21 Thread Yury Kotov
Ping 14.05.2019, 18:20, "Yury Kotov" : > Now, fdset_id is int64, but in some places we work with it as int. > It seems that there is no sense to use int64 for fdset_id, so it's > better to fix inconsistency by changing fdset_id type to int and by > fixing the ref

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

2019-05-21 Thread Yury Kotov
Ping 14.05.2019, 12:36, "Yury Kotov" : > Ping > > 18.04.2019, 20:46, "Yury Kotov" : >>  18.04.2019, 20:01, "Dr. David Alan Gilbert" : >>>   * Yury Kotov (yury-ko...@yandex-team.ru) wrote: >>>>    18.04.2019, 19:03, "Dr.

Re: [Qemu-devel] [PATCH v2] monitor: Fix fdset_id & fd types for corresponding QMP commands

2019-05-23 Thread Yury Kotov
22.05.2019, 19:40, "Markus Armbruster" : > Yury Kotov writes: > >>  Now, fdset_id is int64, but in some places we work with it as int. >>  It seems that there is no sense to use int64 for fdset_id, so it's >>  better to fix inconsistency by changing fds

[Qemu-devel] [PATCH v3] monitor: Fix return type of monitor_fdset_dup_fd_find

2019-05-23 Thread Yury Kotov
monitor_fdset_dup_fd_find_remove() and monitor_fdset_dup_fd_find() return mon_fdset->id which is int64_t. Downcasting from int64_t to int leads to a bug with removing fd from fdset with id >= 2^32. So, fix return types for these function. Signed-off-by: Yury Kotov Reviewed-by: Markus Armb

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

2019-01-21 Thread Yury Kotov
Hi, Just want to clarify your suggestions. 1) migrate=off/share=on I'm not sure that adding new flag 'migrate=off' is a good idea. I think that share=on as you suggested at first is enough. * It's a new flag which has sense only with share=on * It seems to that the meaning of this flag isn't cle

<    1   2