On Sun, 09 Mar 2014 16:45:20 +0100 Andreas Färber <afaer...@suse.de> wrote:
> Am 04.03.2014 03:55, schrieb Andreas Färber: > > Adapt the X86CPU implementation to suit the generic hook. > > This involves a cleanup of error handling to cope with NULL errp. > > > > Signed-off-by: Andreas Färber <afaer...@suse.de> > > --- > > include/qom/cpu.h | 3 +++ > > target-i386/cpu.c | 36 +++++++++++++++++++++--------------- > > 2 files changed, 24 insertions(+), 15 deletions(-) > > X86CPU subclasses require the following trivial rebase: > > diff --cc target-i386/cpu.c > index 3c3a987,653840a..0000000 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu.c > @@@ -1941,7 -1923,15 +1946,7 @@@ X86CPU *cpu_x86_create(const char *cpu_ > object_unref(OBJECT(cpu)); > #endif > > - cpu_x86_parse_featurestr(cpu, features, &error); > - /* Emulate per-model subclasses for global properties */ > - typename = g_strdup_printf("%s-" TYPE_X86_CPU, name); > - qdev_prop_set_globals_for_type(DEVICE(cpu), typename, &error); > - g_free(typename); > - if (error) { > - goto out; > - } > - > + x86_cpu_parse_featurestr(CPU(cpu), features, &error); > if (error) { > goto out; > } > @@@ -2790,7 -2753,7 +2795,8 @@@ static void x86_cpu_common_class_init(O > cc->reset = x86_cpu_reset; > cc->reset_dump_flags = CPU_DUMP_FPU | CPU_DUMP_CCOP; > > + cc->class_by_name = x86_cpu_class_by_name; > + cc->parse_features = x86_cpu_parse_featurestr; > cc->has_work = x86_cpu_has_work; > cc->do_interrupt = x86_cpu_do_interrupt; > cc->dump_state = x86_cpu_dump_state; > > Andreas > looks good, Reviewed-by: Igor Mammedov <imamm...@redhat.com>