[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/22] target-i386: split out CPU creation and f
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 03/22] target-i386: split out CPU creation and features parsing into cpu_x86_create() |
Date: |
Tue, 9 Apr 2013 12:33:47 +0200 |
On Tue, 09 Apr 2013 12:30:21 +0200
Paolo Bonzini <address@hidden> wrote:
> Il 08/04/2013 20:30, Eduardo Habkost ha scritto:
> >> > - cpu_x86_register(cpu, name, &error);
> >> > - if (error) {
> >> > + cpu_x86_register(cpu, name, errp);
> >> > + if (error_is_set(errp)) {
> > So the function now does error checking properly if and only if errp is
> > not NULL. Do we really want to do that?
>
> No, using error_propagate is the correct idiom indeed.
Ok, I'll use error_propagate() in next version.
>
> Paolo
>
> >> > goto out;
> >> > }
> >> >
> >> > - cpu_x86_parse_featurestr(cpu, features, &error);
> >> > - if (error) {
> >> > + cpu_x86_parse_featurestr(cpu, features, errp);
> >> > + if (error_is_set(errp)) {
> >> > goto out;
> >> > }
> >> >
> >> > - object_property_set_bool(OBJECT(cpu), true, "realized", &error);
> >> > +out:
> >> > + g_strfreev(model_pieces);
> > Any specific reason you didn't choose to keep 'Error *error = NULL'
> > inside cpu_x86_create() as well, and use error_propagate() here? I
> > believe it would make the patch simpler and easier to review, and at the
> > same time make cpu_x86_init() check for errors properly even if errp is
> > NULL. This is the opposite of what you did on x86_cpu_realizefn() at
> > patch 01/22.
>
- Re: [Qemu-devel] [PATCH 01/22] target-i386: consolidate error propagation in x86_cpu_realizefn(), (continued)
[Qemu-devel] [PATCH 07/22] target-i386: kvmvapic: replace FROM_SYSBUS() with QOM type cast, Igor Mammedov, 2013/04/05
[Qemu-devel] [PATCH 08/22] target-i386: ioapic: replace FROM_SYSBUS() with QOM type cast, Igor Mammedov, 2013/04/05
- Re: [Qemu-devel] [PATCH 08/22] target-i386: ioapic: replace FROM_SYSBUS() with QOM type cast, li guang, 2013/04/07
- Re: [Qemu-devel] [PATCH 08/22] target-i386: ioapic: replace FROM_SYSBUS() with QOM type cast, Igor Mammedov, 2013/04/08
- Re: [Qemu-devel] [PATCH 08/22] target-i386: ioapic: replace FROM_SYSBUS() with QOM type cast, Paolo Bonzini, 2013/04/09
- Re: [Qemu-devel] [PATCH 08/22] target-i386: ioapic: replace FROM_SYSBUS() with QOM type cast, li guang, 2013/04/09
- Re: [Qemu-devel] [PATCH 08/22] target-i386: ioapic: replace FROM_SYSBUS() with QOM type cast, Paolo Bonzini, 2013/04/10
- Re: [Qemu-devel] [PATCH 08/22] target-i386: ioapic: replace FROM_SYSBUS() with QOM type cast, Igor Mammedov, 2013/04/10