From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMyL7-00033O-CC for qemu-devel@nongnu.org; Mon, 10 Mar 2014 07:25:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMyL2-00067Y-HR for qemu-devel@nongnu.org; Mon, 10 Mar 2014 07:25:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMyL2-00067C-9t for qemu-devel@nongnu.org; Mon, 10 Mar 2014 07:25:44 -0400 Date: Mon, 10 Mar 2014 12:25:39 +0100 From: Igor Mammedov Message-ID: <20140310122539.1046fad7@nial.usersys.redhat.com> In-Reply-To: <531C8C90.3050106@suse.de> References: <1393901749-5944-1-git-send-email-afaerber@suse.de> <1393901749-5944-2-git-send-email-afaerber@suse.de> <531C8C90.3050106@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu 1/6] cpu: Introduce CPUClass::parse_features() hook List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?ISO-8859-1?B?RuRyYmVy?= Cc: Alexey Kardashevskiy , qemu-devel@nongnu.org, Eduardo Habkost On Sun, 09 Mar 2014 16:45:20 +0100 Andreas F=E4rber wrote: > Am 04.03.2014 03:55, schrieb Andreas F=E4rber: > > Adapt the X86CPU implementation to suit the generic hook. > > This involves a cleanup of error handling to cope with NULL errp. > >=20 > > Signed-off-by: Andreas F=E4rber > > --- > > include/qom/cpu.h | 3 +++ > > target-i386/cpu.c | 36 +++++++++++++++++++++--------------- > > 2 files changed, 24 insertions(+), 15 deletions(-) >=20 > X86CPU subclasses require the following trivial rebase: >=20 > 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 >=20 > - cpu_x86_parse_featurestr(cpu, features, &error); > - /* Emulate per-model subclasses for global properties */ > - typename =3D 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 =3D x86_cpu_reset; > cc->reset_dump_flags =3D CPU_DUMP_FPU | CPU_DUMP_CCOP; >=20 > + cc->class_by_name =3D x86_cpu_class_by_name; > + cc->parse_features =3D x86_cpu_parse_featurestr; > cc->has_work =3D x86_cpu_has_work; > cc->do_interrupt =3D x86_cpu_do_interrupt; > cc->dump_state =3D x86_cpu_dump_state; >=20 > Andreas >=20 looks good, Reviewed-by: Igor Mammedov