From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO72Y-0005NW-Kd for qemu-devel@nongnu.org; Thu, 13 Mar 2014 10:55:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO72S-0005wm-M9 for qemu-devel@nongnu.org; Thu, 13 Mar 2014 10:55:22 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59690 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO72S-0005wQ-CY for qemu-devel@nongnu.org; Thu, 13 Mar 2014 10:55:16 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 13 Mar 2014 15:54:15 +0100 Message-Id: <1394722501-32326-13-git-send-email-afaerber@suse.de> In-Reply-To: <1394722501-32326-1-git-send-email-afaerber@suse.de> References: <1394722501-32326-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL for-2.0-rc0 12/58] target-i386: Call x86_cpu_load_def() earlier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost , =?UTF-8?q?Andreas=20F=C3=A4rber?= From: Eduardo Habkost As we will initialize the X86CPU fields on instance_init eventually, move the code that initializes the X86CPU data based on the CPU model name closer to the object_new() call. Signed-off-by: Eduardo Habkost Signed-off-by: Andreas F=C3=A4rber --- target-i386/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 241b4b2..fa56b8a 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1893,6 +1893,11 @@ X86CPU *cpu_x86_create(const char *cpu_model, Devi= ceState *icc_bridge, features =3D model_pieces[1]; =20 cpu =3D X86_CPU(object_new(TYPE_X86_CPU)); + x86_cpu_load_def(cpu, name, &error); + if (error) { + goto out; + } + #ifndef CONFIG_USER_ONLY if (icc_bridge =3D=3D NULL) { error_setg(&error, "Invalid icc-bridge value"); @@ -1902,11 +1907,6 @@ X86CPU *cpu_x86_create(const char *cpu_model, Devi= ceState *icc_bridge, object_unref(OBJECT(cpu)); #endif =20 - x86_cpu_load_def(cpu, name, &error); - if (error) { - goto out; - } - /* 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); --=20 1.8.4.5