[PATCH v5 2/3] job: introduce dump guest memory job

2022-08-01 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. Introduce dump guest memory job type, and add an optional 'job-id' argument for dump-guest-memory QMP to make use of jobs framew

[PATCH v5 1/3] dump: support cancel dump process

2022-08-01 Thread Hogan Wang via
Break saving pages or dump iterate when dump job in cancel state, make sure dump process exits as soon as possible. Signed-off-by: Hogan Wang --- dump/dump.c | 23 +++ include/sysemu/dump.h | 2 ++ 2 files changed, 25 insertions(+) diff --git a/dump/dump.c b/dump/

[PATCH v5 3/3] dump: use jobs framework for dump guest memory

2022-08-01 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. When caller pass the 'job-id' argument, create a job for dump process. And then caller can use job-cancel QMP command to cancel

[PATCH v4 2/3] job: introduce dump guest memory job

2022-08-01 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. Introduce dump guest memory job type, and add an optional 'job-id' argument for dump-guest-memory QMP to make use of jobs framew

[PATCH v4 1/3] dump: support cancel dump process

2022-08-01 Thread Hogan Wang via
Break saving pages or dump iterate when dump job in cancel state, make sure dump process exits as soon as possible. Signed-off-by: Hogan Wang --- dump/dump.c | 23 +++ include/sysemu/dump.h | 2 ++ 2 files changed, 25 insertions(+) diff --git a/dump/dump.c b/dump/

[PATCH v4 3/3] dump: use jobs framework for dump guest memory

2022-08-01 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. When caller pass the 'job-id' argument, create a job for dump process. And then caller can use job-cancel QMP command to cancel

[PATCH v3 3/3] dump: use jobs framework for dump guest memory

2022-07-29 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. When caller pass the 'job-id' argument, create a job for dump process. And then caller can use job-cancel QMP command to cancel

[PATCH v3 2/3] job: introduce dump guest memory job

2022-07-29 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. Introduce dump guest memory job type, and add an optional 'job-id' argument for dump-guest-memory QMP to make use of jobs framew

[PATCH v3 1/3] dump: support cancel dump process

2022-07-29 Thread Hogan Wang via
Break saving pages or dump iterate when dump job in cancel state, make sure dump process exits as soon as possible. Signed-off-by: Hogan Wang --- dump/dump.c | 23 +++ include/sysemu/dump.h | 2 ++ 2 files changed, 25 insertions(+) diff --git a/dump/dump.c b/dump/

[PATCH 1/3] job: introduce dump guest memory job

2022-07-27 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. Introduce dump guest memory job type, and add an optional 'job-id' argument for dump-guest-memory QMP to make use of jobs framew

[PATCH 2/3] dump: use jobs framework for dump guest memory

2022-07-27 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. Use default job id 'dump-guest-memory' to create a job object for dump process. Signed-off-by: Hogan Wang --- dump/dump.c | 6

[PATCH 3/3] dump: support cancel dump process

2022-07-27 Thread Hogan Wang via
Break saving pages or dump iterate when dump job in cancel state, make sure dump process exits as soon as possible. Signed-off-by: Hogan Wang --- dump/dump.c | 24 include/sysemu/dump.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/dump/dump.c b/dump

[PATCH] dump: introduce dump-cancel QMP command

2022-07-20 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. Add the 'cancelling' and 'cancelled' dump states. Use 'dump-cancel' qmp command Set the dump state as 'cancelling'. The dump pr

[PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Hogan Wang via
IOWatchPoll object did not hold the @ioc and @src objects reference, then io_watch_poll_prepare execute in IO thread, if IOWatchPoll removed by mian thread, then io_watch_poll_prepare access @ioc or @src concurrently lead to coredump. In IO thread monitor scene, the IO thread used to accept client

Re: [PATCH] chardev: avoid use-after-free when client disconnect

2022-04-18 Thread Hogan Wang via
> Hi > > On Mon, Mar 28, 2022 at 12:22 PM Hogan Wang via wrote: > > IOWatchPoll object did not hold the @ioc and @src objects reference, > > then io_watch_poll_prepare execute in IO thread, if IOWatchPoll > > removed by mian thread, io_watch_poll_prepare may execute at

[PATCH] chardev: avoid use-after-free when client disconnect

2022-03-28 Thread Hogan Wang via
IOWatchPoll object did not hold the @ioc and @src objects reference, then io_watch_poll_prepare execute in IO thread, if IOWatchPoll removed by mian thread, io_watch_poll_prepare may execute at last chance and access the freed @ioc or @src object. In IO thread monitor scene, the IO thread used to