From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMfuu-0000p4-Ok for qemu-devel@nongnu.org; Sun, 09 Mar 2014 11:45:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMfuk-00062C-UC for qemu-devel@nongnu.org; Sun, 09 Mar 2014 11:45:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35734 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMfuk-00061l-ON for qemu-devel@nongnu.org; Sun, 09 Mar 2014 11:45:22 -0400 Message-ID: <531C8C90.3050106@suse.de> Date: Sun, 09 Mar 2014 16:45:20 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1393901749-5944-1-git-send-email-afaerber@suse.de> <1393901749-5944-2-git-send-email-afaerber@suse.de> In-Reply-To: <1393901749-5944-2-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 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: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Igor Mammedov , Eduardo Habkost Am 04.03.2014 03:55, schrieb Andreas F=C3=A4rber: > 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=C3=A4rber > --- > 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 =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; + 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; Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg