From: Markus Armbruster <armbru@redhat.com>
To: Fei Li <fli@suse.com>
Cc: peterx@redhat.com, famz@redhat.com, qemu-devel@nongnu.org,
dgilbert@redhat.com, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH RFC v5 3/7] qemu_init_vcpu: add a new Error parameter to propagate
Date: Fri, 12 Oct 2018 10:24:49 +0200 [thread overview]
Message-ID: <87r2gvshbi.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <dc2502f6-b288-05aa-dfed-7799a283616a@suse.com> (Fei Li's message of "Fri, 12 Oct 2018 13:55:08 +0800")
Fei Li <fli@suse.com> writes:
> On 10/11/2018 09:19 PM, Markus Armbruster wrote:
>> Fei Li <fli@suse.com> writes:
>>
>>> The caller of qemu_init_vcpu() already passed the **errp to handle
>> Which caller? There are many. Or do you mean "The callers"?
> Oh, sorry, I mean "The callers" :)
>>
>>> errors. In view of this, add a new Error parameter to the following
>>> call trace to propagate the error and let the further caller check it.
>> Which "call trace"?
> Actually, I want to say all functions called by qemu_init_vcpu()..
>>
>>> Besides, make qemu_init_vcpu() return a Boolean value to let its
>>> callers know whether it succeeds.
>>>
>>> Signed-off-by: Fei Li <fli@suse.com>
>>> Reviewed-by: Fam Zheng <famz@redhat.com>
>>> ---
>>> accel/tcg/user-exec-stub.c | 2 +-
>>> cpus.c | 34 +++++++++++++++++++++-------------
>>> include/qom/cpu.h | 2 +-
>>> target/alpha/cpu.c | 4 +++-
>>> target/arm/cpu.c | 4 +++-
>>> target/cris/cpu.c | 4 +++-
>>> target/hppa/cpu.c | 4 +++-
>>> target/i386/cpu.c | 4 +++-
>>> target/lm32/cpu.c | 4 +++-
>>> target/m68k/cpu.c | 4 +++-
>>> target/microblaze/cpu.c | 4 +++-
>>> target/mips/cpu.c | 4 +++-
>>> target/moxie/cpu.c | 4 +++-
>>> target/nios2/cpu.c | 4 +++-
>>> target/openrisc/cpu.c | 4 +++-
>>> target/ppc/translate_init.inc.c | 4 +++-
>>> target/riscv/cpu.c | 4 +++-
>>> target/s390x/cpu.c | 4 +++-
>>> target/sh4/cpu.c | 4 +++-
>>> target/sparc/cpu.c | 4 +++-
>>> target/tilegx/cpu.c | 4 +++-
>>> target/tricore/cpu.c | 4 +++-
>>> target/unicore32/cpu.c | 4 +++-
>>> target/xtensa/cpu.c | 4 +++-
>>> 24 files changed, 86 insertions(+), 36 deletions(-)
>>>
>>> diff --git a/accel/tcg/user-exec-stub.c b/accel/tcg/user-exec-stub.c
>>> index a32b4496af..38f6b928d4 100644
>>> --- a/accel/tcg/user-exec-stub.c
>>> +++ b/accel/tcg/user-exec-stub.c
>>> @@ -10,7 +10,7 @@ void cpu_resume(CPUState *cpu)
>>> {
>>> }
>>> -void qemu_init_vcpu(CPUState *cpu)
>>> +bool qemu_init_vcpu(CPUState *cpu, Error **errp)
>>> {
>> You need to return a value here. Sure you compile-tested this?
> Oops! I forget the TCG case.. The `return true` should be added.
> Thanks for pointing this out!
You're welcome.
>>> }
>>> diff --git a/cpus.c b/cpus.c
[...]
>> I see how you changed the code to pass an Error from the
>> qemu_FOO_start_vcpu() through qemu_init_vcpu() to its callers. I can't
>> see how such errors can be created. Without a way to create any, the
>> patch is pointless. What am I missing?
> This patch is also the pre-patch for the updated qemu_thread_create()
> in patch 7/7
> just as I explained in patch 2/7 [Issue1].
Patches that make little sense on their own, but pave the way for a
later patch are okay. But they should explain that purpose in their
commit message.
next prev parent reply other threads:[~2018-10-12 8:25 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 12:08 [Qemu-devel] [PATCH RFC v5 0/7] qemu_thread_create: propagate errors to callers to check Fei Li
2018-10-10 12:08 ` [Qemu-devel] [PATCH RFC v5 1/7] Fix segmentation fault when qemu_signal_init fails Fei Li
2018-10-11 10:02 ` Markus Armbruster
2018-10-12 4:24 ` Fei Li
2018-10-12 7:56 ` Markus Armbruster
2018-10-12 9:42 ` Fei Li
2018-10-12 13:26 ` Markus Armbruster
2018-10-17 8:17 ` Fei Li
2018-10-19 3:14 ` Fei Li
2018-10-10 12:08 ` [Qemu-devel] [PATCH RFC v5 2/7] ui/vnc.c: polish vnc_init_func Fei Li
2018-10-11 13:13 ` Markus Armbruster
2018-10-12 5:40 ` Fei Li
2018-10-12 8:18 ` Markus Armbruster
2018-10-12 10:23 ` Fei Li
2018-10-12 10:50 ` Fei Li
2018-10-10 12:08 ` [Qemu-devel] [PATCH RFC v5 3/7] qemu_init_vcpu: add a new Error parameter to propagate Fei Li
2018-10-11 13:19 ` Markus Armbruster
2018-10-12 5:55 ` Fei Li
2018-10-12 8:24 ` Markus Armbruster [this message]
2018-10-12 10:25 ` Fei Li
2018-10-10 12:08 ` [Qemu-devel] [PATCH RFC v5 4/7] qemu_thread_join: fix segmentation fault Fei Li
2018-10-10 12:08 ` [Qemu-devel] [PATCH RFC v5 5/7] migration: fix the multifd code Fei Li
2018-10-11 13:28 ` Markus Armbruster
2018-10-10 12:08 ` [Qemu-devel] [PATCH RFC v5 6/7] migration: fix some error handling Fei Li
2018-10-10 12:08 ` [Qemu-devel] [PATCH RFC v5 7/7] qemu_thread_create: propagate the error to callers to handle Fei Li
2018-10-11 13:45 ` Markus Armbruster
2018-10-12 6:00 ` Fei Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r2gvshbi.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=famz@redhat.com \
--cc=fli@suse.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.