Re: [Qemu-devel] [PATCH v14 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-07-17 Thread Fei Li
在 2019/7/17 下午1:53, David Gibson 写道: On Wed, Jul 17, 2019 at 10:33:00AM +0800, Fei Li wrote: From: Fei Li qemu_thread_create() abort()s on error. Not nice. Give it a return value and an Error ** argument, so it can return success/failure. Considering qemu_thread_create() is quite widely

[Qemu-devel] [PATCH v14 10/11] qemu_thread: supplement error handling for vnc_start_worker_thread

2019-07-16 Thread Fei Li
From: Fei Li Supplement the error handling for vnc_thread_worker_thread: add an Error parameter for it to propagate the error to its caller to handle in case it fails, and make it return a Boolean to indicate whether it succeeds. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li

[Qemu-devel] [PATCH v14 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-07-16 Thread Fei Li
From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter for it to propagate the error to its caller to do the handling in case it fails. Cc: Markus Armbruster Signed-off-by: Fei Li --- util/oslib-posix.c | 35 ++- 1 file changed

[Qemu-devel] [PATCH v14 08/11] qemu_thread: supplement error handling for qemu_signalfd_compat

2019-07-16 Thread Fei Li
Set errno, do some cleanup, and return -1 to replace the temporary _abort when failing to create sigwait_compat. Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- util/compatfd.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions

[Qemu-devel] [PATCH v14 09/11] qemu_thread: supplement error handling for migration

2019-07-16 Thread Fei Li
From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state

[Qemu-devel] [PATCH v14 04/11] qemu_thread: supplement error handling for pci_edu_realize

2019-07-16 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Jiri Slaby Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- hw/misc/edu.c | 11 --- 1 file changed, 8 insertions(+), 3

[Qemu-devel] [PATCH v14 07/11] qemu_thread: supplement error handling for iothread_complete

2019-07-16 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- iothread.c | 18 -- 1 file

[Qemu-devel] [PATCH v14 03/11] qemu_thread: supplement error handling for qmp_dump_guest_memory

2019-07-16 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error instead of the temporary _abort. Cc: Markus Armbruster Cc: Marc-André Lureau Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- dump/dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dump/dump.c b

[Qemu-devel] [PATCH v14 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-07-16 Thread Fei Li
From: Fei Li qemu_thread_create() abort()s on error. Not nice. Give it a return value and an Error ** argument, so it can return success/failure. Considering qemu_thread_create() is quite widely used in qemu, split this into two steps: this patch passes the _abort to qemu_thread_create

[Qemu-devel] [PATCH v14 00/11] qemu_thread_create: propagate the error to callers to handle

2019-07-16 Thread Fei Li
function succeeds - Merge v1's last two patches into one to avoid the compile error - Fix one omitted error in patch1 and update some error messages Fei Li (11): qemu_thread: make qemu_thread_create() take Error ** argument qemu_thread: supplement error handling for qemu_X_start_vcpu qemu_t

[Qemu-devel] [PATCH v14 05/11] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-07-16 Thread Fei Li
From: Fei Li Add a local_err to hold the error, and return the corresponding error code to replace the temporary _abort. Cc: Markus Armbruster Cc: David Gibson Signed-off-by: Fei Li Acked-by: David Gibson Reviewed-by: Markus Armbruster --- hw/ppc/spapr_hcall.c | 12 1 file

[Qemu-devel] [PATCH v14 02/11] qemu_thread: supplement error handling for qemu_X_start_vcpu

2019-07-16 Thread Fei Li
From: Fei Li The callers of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to qemu_init_vcpu() and all qemu_X_start_vcpu() functions called by qemu_init_vcpu() to propagate the error and let the further callers check it. Besides, make

[Qemu-devel] [PATCH v14 06/11] qemu_thread: supplement error handling for emulated_realize

2019-07-16 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. If the second thread fails to be created, use a VEvent to cancel the first thread before the join(). Cc: Markus Armbruster Cc: Gerd Hoffmann Cc: Christophe Fergeau

Re: [Qemu-devel] [PATCH v13 for-4.1 00/11] qemu_thread_create: propagate the error to callers to handle

2019-03-27 Thread Fei Li
Hi all, Sorry for mynegligence.. I will do the same update for the qemu_thread_create() in test-char.c in next version. Have a nice day, thanks Fei 在 2019/3/25 下午10:17, no-re...@patchew.org 写道: Patchew URL: https://patchew.org/QEMU/20190325135411.26506-1-shirley17...@gmail.com/ Hi, This

[Qemu-devel] [PATCH v13 for-4.1 09/11] qemu_thread: supplement error handling for migration

2019-03-25 Thread Fei Li
From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state

[Qemu-devel] [PATCH v13 for-4.1 10/11] qemu_thread: supplement error handling for vnc_start_worker_thread

2019-03-25 Thread Fei Li
From: Fei Li Supplement the error handling for vnc_thread_worker_thread: add an Error parameter for it to propagate the error to its caller to handle in case it fails, and make it return a Boolean to indicate whether it succeeds. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li

[Qemu-devel] [PATCH v13 for-4.1 05/11] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-03-25 Thread Fei Li
From: Fei Li Add a local_err to hold the error, and return the corresponding error code to replace the temporary _abort. Cc: Markus Armbruster Cc: David Gibson Signed-off-by: Fei Li Acked-by: David Gibson Reviewed-by: Markus Armbruster --- hw/ppc/spapr_hcall.c | 12 1 file

[Qemu-devel] [PATCH v13 for-4.1 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-03-25 Thread Fei Li
From: Fei Li qemu_thread_create() abort()s on error. Not nice. Give it a return value and an Error ** argument, so it can return success/failure. Considering qemu_thread_create() is quite widely used in qemu, split this into two steps: this patch passes the _abort to qemu_thread_create

[Qemu-devel] [PATCH v13 for-4.1 00/11] qemu_thread_create: propagate the error to callers to handle

2019-03-25 Thread Fei Li
update some error messages Fei Li (11): qemu_thread: make qemu_thread_create() take Error ** argument qemu_thread: supplement error handling for qemu_X_start_vcpu qemu_thread: supplement error handling for qmp_dump_guest_memory qemu_thread: supplement error handling for pci_edu_realize qemu_t

[Qemu-devel] [PATCH v13 for-4.1 07/11] qemu_thread: supplement error handling for iothread_complete

2019-03-25 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- iothread.c | 18 -- 1 file

[Qemu-devel] [PATCH v13 for-4.1 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-03-25 Thread Fei Li
From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter for it to propagate the error to its caller to do the handling in case it fails. Cc: Markus Armbruster Signed-off-by: Fei Li --- util/oslib-posix.c | 35 ++- 1 file changed

[Qemu-devel] [PATCH v13 for-4.1 08/11] qemu_thread: supplement error handling for qemu_signalfd_compat

2019-03-25 Thread Fei Li
Set errno, do some cleanup, and return -1 to replace the temporary _abort when failing to create sigwait_compat. Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- util/compatfd.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions

[Qemu-devel] [PATCH v13 for-4.1 04/11] qemu_thread: supplement error handling for pci_edu_realize

2019-03-25 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Jiri Slaby Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- hw/misc/edu.c | 11 --- 1 file changed, 8 insertions(+), 3

[Qemu-devel] [PATCH v13 for-4.1 02/11] qemu_thread: supplement error handling for qemu_X_start_vcpu

2019-03-25 Thread Fei Li
From: Fei Li The callers of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to qemu_init_vcpu() and all qemu_X_start_vcpu() functions called by qemu_init_vcpu() to propagate the error and let the further callers check it. Besides, make

[Qemu-devel] [PATCH v13 for-4.1 06/11] qemu_thread: supplement error handling for emulated_realize

2019-03-25 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Gerd Hoffmann Cc: Christophe Fergeau Cc: Marc-André Lureau Signed-off-by: Fei Li --- hw/usb/ccid-card-emulated.c | 17

[Qemu-devel] [PATCH v13 for-4.1 03/11] qemu_thread: supplement error handling for qmp_dump_guest_memory

2019-03-25 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error instead of the temporary _abort. Cc: Markus Armbruster Cc: Marc-André Lureau Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dump.c b/dump.c

Re: [Qemu-devel] [PATCH v12 for-4.1 02/11] qemu_thread: supplement error handling for qemu_X_start_vcpu

2019-03-25 Thread Fei Li
在 2019/3/25 上午9:45, David Gibson 写道: On Mon, Mar 25, 2019 at 12:51:57AM +0800, Fei Li wrote: From: Fei Li The callers of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to qemu_init_vcpu() and all qemu_X_start_vcpu() functions called

Re: [Qemu-devel] [PATCH v12 for-4.1 00/11] qemu_thread_create: propagate the error to callers to handle

2019-03-24 Thread Fei Li
Emm, the order seems a mess.. I will resend this patch series later as v13. So sorry for the trouble! Have a nice day Fei 在 2019/3/25 上午1:21, Fei Li 写道: Hi, This idea comes from BiteSizedTasks, and this patch series implement the error checking of qemu_thread_create: make qemu_thread_create

[Qemu-devel] [PATCH v12 for-4.1 09/11] qemu_thread: supplement error handling for migration

2019-03-24 Thread Fei Li
From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state

[Qemu-devel] [PATCH v12 for-4.1 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-03-24 Thread Fei Li
From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter for it to propagate the error to its caller to do the handling in case it fails. Cc: Markus Armbruster Signed-off-by: Fei Li --- util/oslib-posix.c | 35 ++- 1 file changed

[Qemu-devel] [PATCH v12 for-4.1 10/11] qemu_thread: supplement error handling for vnc_start_worker_thread

2019-03-24 Thread Fei Li
From: Fei Li Supplement the error handling for vnc_thread_worker_thread: add an Error parameter for it to propagate the error to its caller to handle in case it fails, and make it return a Boolean to indicate whether it succeeds. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li

[Qemu-devel] [PATCH v12 for-4.1 02/11] qemu_thread: supplement error handling for qemu_X_start_vcpu

2019-03-24 Thread Fei Li
From: Fei Li The callers of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to qemu_init_vcpu() and all qemu_X_start_vcpu() functions called by qemu_init_vcpu() to propagate the error and let the further callers check it. Besides, make

[Qemu-devel] [PATCH v12 for-4.1 06/11] qemu_thread: supplement error handling for emulated_realize

2019-03-24 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Gerd Hoffmann Cc: Christophe Fergeau Cc: Marc-André Lureau Signed-off-by: Fei Li --- hw/usb/ccid-card-emulated.c | 17

[Qemu-devel] [PATCH v12 for-4.1 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-03-24 Thread Fei Li
From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter for it to propagate the error to its caller to do the handling in case it fails. Cc: Markus Armbruster Signed-off-by: Fei Li --- util/oslib-posix.c | 35 ++- 1 file changed

[Qemu-devel] [PATCH v12 for-4.1 04/11] qemu_thread: supplement error handling for pci_edu_realize

2019-03-24 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Jiri Slaby Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- hw/misc/edu.c | 11 --- 1 file changed, 8 insertions(+), 3

[Qemu-devel] [PATCH v12 for-4.1 05/11] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-03-24 Thread Fei Li
From: Fei Li Add a local_err to hold the error, and return the corresponding error code to replace the temporary _abort. Cc: Markus Armbruster Cc: David Gibson Signed-off-by: Fei Li Acked-by: David Gibson Reviewed-by: Markus Armbruster --- hw/ppc/spapr_hcall.c | 12 1 file

[Qemu-devel] [PATCH v12 for-4.1 07/11] qemu_thread: supplement error handling for iothread_complete

2019-03-24 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- iothread.c | 18 -- 1 file

[Qemu-devel] [PATCH v12 for-4.1 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-03-24 Thread Fei Li
From: Fei Li qemu_thread_create() abort()s on error. Not nice. Give it a return value and an Error ** argument, so it can return success/failure. Considering qemu_thread_create() is quite widely used in qemu, split this into two steps: this patch passes the _abort to qemu_thread_create

[Qemu-devel] [PATCH v12 for-4.1 00/11] qemu_thread_create: propagate the error to callers to handle

2019-03-24 Thread Fei Li
g a local_err & error_propagate - Return a bool: false/true to indicate if one function succeeds - Merge v1's last two patches into one to avoid the compile error - Fix one omitted error in patch1 and update some error messages Fei Li (11): qemu_thread: make qemu_thread_create() take Error ** argum

[Qemu-devel] [PATCH v12 for-4.1 08/11] qemu_thread: supplement error handling for qemu_signalfd_compat

2019-03-24 Thread Fei Li
From: Fei Li Set errno, do some cleanup, and return -1 to replace the temporary _abort when failing to create sigwait_compat. Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- util/compatfd.c | 13 ++--- 1 file changed, 10 insertions

[Qemu-devel] [PATCH v12 for-4.1 03/11] qemu_thread: supplement error handling for qmp_dump_guest_memory

2019-03-24 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error instead of the temporary _abort. Cc: Markus Armbruster Cc: Marc-André Lureau Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dump.c b/dump.c

Re: [Qemu-devel] [PATCH v12 for-4.1 00/11] qemu_thread_create: propagate the error to callers to handle

2019-03-24 Thread Fei Li
Please ignore this incomplete patch series, it seems there's something wrong with my email client.. :( Sorry for this! 在 2019/3/25 上午12:51, Fei Li 写道: Hi, This idea comes from BiteSizedTasks, and this patch series implement the error checking of qemu_thread_create: make qemu_thread_create

[Qemu-devel] [PATCH v12 for-4.1 02/11] qemu_thread: supplement error handling for qemu_X_start_vcpu

2019-03-24 Thread Fei Li
From: Fei Li The callers of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to qemu_init_vcpu() and all qemu_X_start_vcpu() functions called by qemu_init_vcpu() to propagate the error and let the further callers check it. Besides, make

[Qemu-devel] [PATCH v12 for-4.1 05/11] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-03-24 Thread Fei Li
From: Fei Li Add a local_err to hold the error, and return the corresponding error code to replace the temporary _abort. Cc: Markus Armbruster Cc: David Gibson Signed-off-by: Fei Li Acked-by: David Gibson Reviewed-by: Markus Armbruster --- hw/ppc/spapr_hcall.c | 12 1 file

[Qemu-devel] [PATCH v12 for-4.1 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-03-24 Thread Fei Li
From: Fei Li qemu_thread_create() abort()s on error. Not nice. Give it a return value and an Error ** argument, so it can return success/failure. Considering qemu_thread_create() is quite widely used in qemu, split this into two steps: this patch passes the _abort to qemu_thread_create

[Qemu-devel] [PATCH v12 for-4.1 03/11] qemu_thread: supplement error handling for qmp_dump_guest_memory

2019-03-24 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error instead of the temporary _abort. Cc: Markus Armbruster Cc: Marc-André Lureau Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dump.c b/dump.c

[Qemu-devel] [PATCH v12 for-4.1 06/11] qemu_thread: supplement error handling for emulated_realize

2019-03-24 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li --- hw/usb/ccid-card-emulated.c | 17 - 1 file changed, 12 insertions(+), 5 deletions

[Qemu-devel] [PATCH v12 for-4.1 04/11] qemu_thread: supplement error handling for pci_edu_realize

2019-03-24 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Jiri Slaby Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- hw/misc/edu.c | 11 --- 1 file changed, 8 insertions(+), 3

[Qemu-devel] [PATCH v12 for-4.1 00/11] qemu_thread_create: propagate the error to callers to handle

2019-03-24 Thread Fei Li
g a local_err & error_propagate - Return a bool: false/true to indicate if one function succeeds - Merge v1's last two patches into one to avoid the compile error - Fix one omitted error in patch1 and update some error messages Fei Li (11): qemu_thread: make qemu_thread_create() take Error ** argum

[Qemu-devel] [PATCH v12 for-4.1 07/11] qemu_thread: supplement error handling for iothread_complete

2019-03-24 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li Reviewed-by: Markus Armbruster --- iothread.c | 18 -- 1 file

Re: [Qemu-devel] [PATCH v11 for-4.0 06/11] qemu_thread: supplement error handling for emulated_realize

2019-03-24 Thread Fei Li
在 2019/2/15 下午8:35, Fei Li 写道: 在 2019/2/4 下午9:30, Markus Armbruster 写道: Fei Li writes: 在 2019/2/1 下午9:04, Markus Armbruster 写道: Fei Li writes: From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus

Re: [Qemu-devel] [PATCH v11 for-4.0 09/11] qemu_thread: supplement error handling for migration

2019-03-24 Thread Fei Li
在 2019/2/5 上午12:34, Dr. David Alan Gilbert 写道: * Markus Armbruster (arm...@redhat.com) wrote: Dave, I tried to review the error paths, in particular resource cleanup, but there's a lot going on, and I'm not feeling confident. Please have a close look. Fei Li writes: From: Fei Li Update

Re: [Qemu-devel] [PATCH v11 for-4.0 09/11] qemu_thread: supplement error handling for migration

2019-02-15 Thread Fei Li
在 2019/2/5 上午12:34, Dr. David Alan Gilbert 写道: * Markus Armbruster (arm...@redhat.com) wrote: Dave, I tried to review the error paths, in particular resource cleanup, but there's a lot going on, and I'm not feeling confident. Please have a close look. Fei Li writes: From: Fei Li Update

Re: [Qemu-devel] [PATCH v11 for-4.0 06/11] qemu_thread: supplement error handling for emulated_realize

2019-02-15 Thread Fei Li
在 2019/2/4 下午9:30, Markus Armbruster 写道: Fei Li writes: 在 2019/2/1 下午9:04, Markus Armbruster 写道: Fei Li writes: From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Gerd Hoffmann

Re: [Qemu-devel] [PATCH v11 for-4.0 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-02-03 Thread Fei Li
在 2019/2/1 下午11:03, Markus Armbruster 写道: Cc: Paolo for preexisting issues due to commit 1e356fc14be. Fei Li writes: From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter for it to propagate the error to its caller to do the handling in case it fails. Cc

Re: [Qemu-devel] [PATCH v11 for-4.0 09/11] qemu_thread: supplement error handling for migration

2019-02-02 Thread Fei Li
在 2019/2/1 下午11:34, Markus Armbruster 写道: Dave, I tried to review the error paths, in particular resource cleanup, but there's a lot going on, and I'm not feeling confident. Please have a close look. Fei Li writes: From: Fei Li Update qemu_thread_create()'s callers by - setting an error

Re: [Qemu-devel] [PATCH v11 for-4.0 06/11] qemu_thread: supplement error handling for emulated_realize

2019-02-02 Thread Fei Li
在 2019/2/1 下午9:04, Markus Armbruster 写道: Fei Li writes: From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li --- hw/usb/ccid-card-emulated.c | 15

Re: [Qemu-devel] [PATCH v11 for-4.0 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-01-31 Thread Fei Li
It seems that this poor patch is left alone. :( I sent all, but this patch failed to join them, so sorry for that.. Could we just let it be? Have a nice day, thanks Fei 在 2019/2/1 下午1:25, Fei Li 写道: From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter

Re: [Qemu-devel] [PATCH v11 for-4.0 09/11] qemu_thread: supplement error handling for migration

2019-01-31 Thread Fei Li
在 2019/2/1 下午1:18, Fei Li 写道: From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting

[Qemu-devel] [PATCH v11 for-4.0 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-01-31 Thread Fei Li
From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter for it to propagate the error to its caller to do the handling in case it fails. Cc: Markus Armbruster Signed-off-by: Fei Li --- util/oslib-posix.c | 26 -- 1 file changed, 16

[Qemu-devel] [PATCH v11 for-4.0 09/11] qemu_thread: supplement error handling for migration

2019-01-31 Thread Fei Li
From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state

[Qemu-devel] [PATCH v11 for-4.0 06/11] qemu_thread: supplement error handling for emulated_realize

2019-01-31 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li --- hw/usb/ccid-card-emulated.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions

[Qemu-devel] [PATCH v11 for-4.0 00/11] qemu_thread_create: propagate the error to callers to handle

2019-01-31 Thread Fei Li
bool: false/true to indicate if one function succeeds - Merge v1's last two patches into one to avoid the compile error - Fix one omitted error in patch1 and update some error messages Fei Li (11): qemu_thread: make qemu_thread_create() take Error ** argument qemu_thread: suppleme

[Qemu-devel] [PATCH v11 for-4.0 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-01-31 Thread Fei Li
From: Fei Li qemu_thread_create() abort()s on error. Not nice. Give it a return value and an Error ** argument, so it can return success/failure. Considering qemu_thread_create() is quite widely used in qemu, split this into two steps: this patch passes the _abort to qemu_thread_create

[Qemu-devel] [PATCH v11 for-4.0 08/11] qemu_thread: supplement error handling for qemu_signalfd_compat

2019-01-31 Thread Fei Li
From: Fei Li For qemu_signalfd_compat: set errno, do some cleanup, and return -1 to replace the temporary _abort when failing to create sigwait_compat. Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Fei Li --- util/compatfd.c | 13 ++--- 1 file changed, 10 insertions(+), 3

[Qemu-devel] [PATCH v11 for-4.0 05/11] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-01-31 Thread Fei Li
From: Fei Li Add a local_err to hold the error, and return the corresponding error code to replace the temporary _abort. Cc: Markus Armbruster Cc: David Gibson Signed-off-by: Fei Li Acked-by: David Gibson --- hw/ppc/spapr_hcall.c | 12 1 file changed, 8 insertions(+), 4

[Qemu-devel] [PATCH v11 for-4.0 03/11] qemu_thread: supplement error handling for qmp_dump_guest_memory

2019-01-31 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error instead of the temporary _abort. Cc: Markus Armbruster Cc: Marc-André Lureau Signed-off-by: Fei Li --- dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dump.c b/dump.c index e4886bc9c3..92cc277015

[Qemu-devel] [PATCH v11 for-4.0 07/11] qemu_thread: supplement error handling for iothread_complete

2019-01-31 Thread Fei Li
From: Fei Li For iothread_complete: utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li --- iothread.c | 19 +-- 1 file changed, 13

[Qemu-devel] [PATCH v11 for-4.0 10/11] qemu_thread: supplement error handling for vnc_start_worker_thread

2019-01-31 Thread Fei Li
From: Fei Li Supplement the error handling for vnc_thread_worker_thread: add an Error parameter for it to propagate the error to its caller to handle in case it fails, and make it return a Boolean to indicate whether it succeeds. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li

[Qemu-devel] [PATCH v11 for-4.0 04/11] qemu_thread: supplement error handling for pci_edu_realize

2019-01-31 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Jiri Slaby Signed-off-by: Fei Li --- hw/misc/edu.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/misc

[Qemu-devel] [PATCH v11 for-4.0 02/11] qemu_thread: supplement error handling for qemu_X_start_vcpu

2019-01-31 Thread Fei Li
From: Fei Li The callers of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to qemu_init_vcpu() and all qemu_X_start_vcpu() functions called by qemu_init_vcpu() to propagate the error and let the further callers check it. Besides, make

Re: [Qemu-devel] [PATCH v11 for-4.0 00/11] qemu_thread_create: propagate the error to callers to handle

2019-01-31 Thread Fei Li
Sorry again! Please omit this email. It seems there's something wrong with my send-email.. :( Have a nice day Fei 在 2019/2/1 下午1:09, Fei Li 写道: Hi, This idea comes from BiteSizedTasks, and this patch series implement the error checking of qemu_thread_create: make qemu_thread_create return

[Qemu-devel] [PATCH v11 for-4.0 00/11] qemu_thread_create: propagate the error to callers to handle

2019-01-31 Thread Fei Li
bool: false/true to indicate if one function succeeds - Merge v1's last two patches into one to avoid the compile error - Fix one omitted error in patch1 and update some error messages Fei Li (11): qemu_thread: make qemu_thread_create() take Error ** argument qemu_thread: suppleme

Re: [Qemu-devel] [PATCH for-4.0 00/11] qemu_thread_create: propagate the error to callers to handle

2019-01-31 Thread Fei Li
在 2019/2/1 上午2:05, Markus Armbruster 写道: I'm afraid you made a bit of a mess :) "[PATCH for-4.0 00/11]" suggests this is v1 of eleven patches. Awkward, I forgot the v10.. =-O Fei Li writes: Hi, This idea comes from BiteSizedTasks, and this patch series implement the erro

[Qemu-devel] [PATCH for-4.0 09/11] qemu_thread: supplement error handling for migration

2019-01-28 Thread Fei Li
From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state

[Qemu-devel] [PATCH for-4.0 11/11] qemu_thread: supplement error handling for touch_all_pages

2019-01-28 Thread Fei Li
From: Fei Li Supplement the error handling for touch_all_pages: add an Error parameter for it to propagate the error to its caller to do the handling in case it fails. Cc: Markus Armbruster Signed-off-by: Fei Li --- util/oslib-posix.c | 26 -- 1 file changed, 16

[Qemu-devel] [PATCH for-4.0 10/11] qemu_thread: supplement error handling for vnc_start_worker_thread

2019-01-28 Thread Fei Li
From: Fei Li Supplement the error handling for vnc_thread_worker_thread: add an Error parameter for it to propagate the error to its caller to handle in case it fails, and make it return a Boolean to indicate whether it succeeds. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li

[Qemu-devel] [PATCH for-4.0 09/11] qemu_thread: supplement error handling for migration

2019-01-28 Thread Fei Li
From: Fei Li Update qemu_thread_create()'s callers by - setting an error on qemu_thread_create() failure for callers that set an error on failure; - reporting the error and returning failure for callers that return an error code on failure; - reporting the error and setting some state

[Qemu-devel] [PATCH for-4.0 07/11] qemu_thread: supplement error handling for iothread_complete

2019-01-28 Thread Fei Li
From: Fei Li For iothread_complete: utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li --- iothread.c | 19 +-- 1 file changed, 13

[Qemu-devel] [PATCH for-4.0 07/11] qemu_thread: supplement error handling for iothread_complete

2019-01-28 Thread Fei Li
From: Fei Li For iothread_complete: utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li --- iothread.c | 19 +-- 1 file changed, 13

[Qemu-devel] [PATCH for-4.0 08/11] qemu_thread: supplement error handling for qemu_signalfd_compat

2019-01-28 Thread Fei Li
From: Fei Li For qemu_signalfd_compat: set errno, do some cleanup, and return -1 to replace the temporary _abort when failing to create sigwait_compat. Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Fei Li --- util/compatfd.c | 13 ++--- 1 file changed, 10 insertions(+), 3

[Qemu-devel] [PATCH for-4.0 08/11] qemu_thread: supplement error handling for qemu_signalfd_compat

2019-01-28 Thread Fei Li
From: Fei Li For qemu_signalfd_compat: set errno, do some cleanup, and return -1 to replace the temporary _abort when failing to create sigwait_compat. Cc: Markus Armbruster Cc: Eric Blake Signed-off-by: Fei Li --- util/compatfd.c | 13 ++--- 1 file changed, 10 insertions(+), 3

[Qemu-devel] [PATCH for-4.0 02/11] qemu_thread: supplement error handling for qemu_X_start_vcpu

2019-01-28 Thread Fei Li
From: Fei Li The callers of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to qemu_init_vcpu() and all qemu_X_start_vcpu() functions called by qemu_init_vcpu() to propagate the error and let the further callers check it. Besides, make

[Qemu-devel] [PATCH for-4.0 06/11] qemu_thread: supplement error handling for emulated_realize

2019-01-28 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Gerd Hoffmann Signed-off-by: Fei Li --- hw/usb/ccid-card-emulated.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions

[Qemu-devel] [PATCH for-4.0 05/11] qemu_thread: supplement error handling for h_resize_hpt_prepare

2019-01-28 Thread Fei Li
From: Fei Li Add a local_err to hold the error, and return the corresponding error code to replace the temporary _abort. Cc: Markus Armbruster Cc: David Gibson Signed-off-by: Fei Li Acked-by: David Gibson --- hw/ppc/spapr_hcall.c | 12 1 file changed, 8 insertions(+), 4

[Qemu-devel] [PATCH for-4.0 01/11] qemu_thread: make qemu_thread_create() take Error ** argument

2019-01-28 Thread Fei Li
From: Fei Li qemu_thread_create() abort()s on error. Not nice. Give it a return value and an Error ** argument, so it can return success/failure. Considering qemu_thread_create() is quite widely used in qemu, split this into two steps: this patch passes the _abort to qemu_thread_create

[Qemu-devel] [PATCH for-4.0 03/11] qemu_thread: supplement error handling for qmp_dump_guest_memory

2019-01-28 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error instead of the temporary _abort. Cc: Markus Armbruster Cc: Marc-André Lureau Signed-off-by: Fei Li --- dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dump.c b/dump.c index e4886bc9c3..92cc277015

[Qemu-devel] [PATCH for-4.0 04/11] qemu_thread: supplement error handling for pci_edu_realize

2019-01-28 Thread Fei Li
From: Fei Li Utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Jiri Slaby Signed-off-by: Fei Li --- hw/misc/edu.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/misc

[Qemu-devel] [PATCH for-4.0 00/11] qemu_thread_create: propagate the error to callers to handle

2019-01-28 Thread Fei Li
rge v1's last two patches into one to avoid the compile error - Fix one omitted error in patch1 and update some error messages Fei Li (11): qemu_thread: make qemu_thread_create() take Error ** argument qemu_thread: supplement error handling for qemu_X_start_vcpu qemu_thread: suppleme

[Qemu-devel] [PATCH for-4.0 07/11] qemu_thread: supplement error handling for iothread_complete

2019-01-28 Thread Fei Li
From: Fei Li For iothread_complete: utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. Cc: Markus Armbruster Cc: Stefan Hajnoczi Cc: Eric Blake Signed-off-by: Fei Li --- iothread.c | 19 +-- 1 file changed, 13

Re: [Qemu-devel] [PATCH for-4.0 0/5] fix some segmentation faults and migration issues

2019-01-15 Thread Fei Li
Fei 在 2019/1/13 下午10:08, Fei Li 写道: All these five patches have gotten the Reviewed-by: the first patch is to fix one segmentation fault and the other four are to fix some migration issues. To be more detail, they are extracted from previous "[PATCH for-4.0 v9 16/16] qemu_thread_create: prop

Re: [Qemu-devel] [PATCH for-4.0 v9 09/16] qemu_thread: supplement error handling for pci_edu_realize

2019-01-15 Thread Fei Li
在 2019/1/15 下午8:55, Markus Armbruster 写道: Fei Li writes: 在 2019/1/14 下午8:36, Markus Armbruster 写道: Fei Li writes: Just to make sure about how to do the cleanup. I notice that in device_set_realized(), the current code does not call "dc->unrealize(dev, NULL);" when dc->

Re: [Qemu-devel] [PATCH for-4.0 v9 12/16] qemu_thread: supplement error handling for iothread_complete/qemu_signalfd_compat

2019-01-14 Thread Fei Li
在 2019/1/14 下午8:53, Markus Armbruster 写道: Fei Li writes: 在 2019/1/9 上午12:18, fei 写道: 在 2019年1月8日,01:50,Markus Armbruster 写道: Fei Li writes: For iothread_complete: utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort

Re: [Qemu-devel] [PATCH for-4.0 v9 09/16] qemu_thread: supplement error handling for pci_edu_realize

2019-01-14 Thread Fei Li
在 2019/1/14 下午8:36, Markus Armbruster 写道: Fei Li writes: Just to make sure about how to do the cleanup. I notice that in device_set_realized(), the current code does not call "dc->unrealize(dev, NULL);" when dc->realize() fails. Sorry that I am still uncertain.. I guess

[Qemu-devel] [PATCH v2] hw/misc/edu: add msi_uninit() for pci_edu_uninit()

2019-01-14 Thread Fei Li
From: Fei Li Let's supplement the msi_uninit() when failing to realize the pci edu device. Reported-by: Markus Armbruster Signed-off-by: Fei Li Reviewed-by: Marcel Apfelbaum Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu --- hw/misc/edu.c | 1 + 1 file changed, 1 insertion

Re: [Qemu-devel] [PATCH] hw/misc/edu: add msi_uninit() for pci_edu_uninit()

2019-01-14 Thread Fei Li
在 2019/1/14 下午6:40, Philippe Mathieu-Daudé 写道: On 1/14/19 8:18 AM, Peter Xu wrote: On Mon, Jan 14, 2019 at 08:02:23AM +0100, Markus Armbruster wrote: Peter Xu writes: On Sun, Jan 13, 2019 at 10:36:41PM +0800, Fei Li wrote: From: Fei Li Let's supplement the msi_uninit() when failing

Re: [Qemu-devel] [PATCH for-4.0 v9 12/16] qemu_thread: supplement error handling for iothread_complete/qemu_signalfd_compat

2019-01-13 Thread Fei Li
在 2019/1/9 上午12:18, fei 写道: 在 2019年1月8日,01:50,Markus Armbruster 写道: Fei Li writes: For iothread_complete: utilize the existed errp to propagate the error and do the corresponding cleanup to replace the temporary _abort. For qemu_signalfd_compat: add a local_err to hold the error

Re: [Qemu-devel] [PATCH for-4.0 v9 09/16] qemu_thread: supplement error handling for pci_edu_realize

2019-01-13 Thread Fei Li
在 2019/1/8 上午1:29, Markus Armbruster 写道: Fei Li writes: Utilize the existed errp to propagate the error instead of the temporary _abort. Cc: Markus Armbruster Cc: Jiri Slaby Signed-off-by: Fei Li --- hw/misc/edu.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PATCH] hw/misc/edu: add msi_uninit() for pci_edu_uninit()

2019-01-13 Thread Fei Li
From: Fei Li Let's supplement the msi_uninit() when failing to realize the pci edu device. Cc: Markus Armbruster Cc: Peter Xu Cc: Michael S. Tsirkin Cc: Marcel Apfelbaum Signed-off-by: Fei Li --- hw/misc/edu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/edu.c b/hw/misc

[Qemu-devel] [PATCH for-4.0 4/5] migration: add more error handling for postcopy_ram_enable_notify

2019-01-13 Thread Fei Li
From: Fei Li Call postcopy_ram_incoming_cleanup() to do the cleanup when postcopy_ram_enable_notify fails. Besides, report the error message when qemu_ram_foreach_migratable_block() fails. Cc: Dr. David Alan Gilbert Signed-off-by: Fei Li Reviewed-by: Dr. David Alan Gilbert --- migration

  1   2   3   >