[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 01/16] target-or32: Add target stubs and QOM
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v8 01/16] target-or32: Add target stubs and QOM cpu |
Date: |
Thu, 05 Jul 2012 15:31:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
Il 05/07/2012 15:22, Andreas Färber ha scritto:
>> > +static void openrisc_any_initfn(Object *obj)
>> > +{
>> > + OpenRISCCPU *cpu = OPENRISC_CPU(obj);
>> > +
>> > + set_feature(cpu, OPENRISC_FEATURE_OB32S);
>> > + set_feature(cpu, OPENRISC_FEATURE_OF32S);
>> > +
>> > + cpu_reset(CPU(cpu));
>> > +}
> Paolo, could class_base_init or something help with this pattern of
> needing to do something in every derived initfn?
I guess what you're looking for is some instance_post_init that is
called at init time after instance_init?
> On the other hand I think we should move cpu_reset() into the realizefn
> instead, that would avoid this issue here.
Yep.
Paolo