Received: from eggs.gnu.org ([208.118.235.92]:45892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TY1hg-0004Ic-U8 for qemu-devel@nongnu.org; Mon, 12 Nov 2012 16:38:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TY1hd-0004gM-Qv for qemu-devel@nongnu.org; Mon, 12 Nov 2012 16:38:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TY1hd-0004fK-Hv for qemu-devel@nongnu.org; Mon, 12 Nov 2012 16:37:57 -0500 From: Eduardo Habkost Date: Mon, 12 Nov 2012 19:38:45 -0200 Message-Id: <1352756342-13716-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 00/17] target-i386: CPU init cleanup for CPU classes/properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= Cc: Don Slutz Hi, One of the problems when coordinating with the recent x86 CPU work (CPU properties, APIC ID topology fixes) is to have a sane x86 CPU initialization code to be used as base. To make things worse, the cleanups we're doing are buried inside series that do more intrusive work. This is an attempt to establish a saner base for further work. Except for additional error messages when initialization fails, this series should not introduce any behavior change, but just clean up cpu_x86_init() to look like this: name, features = g_strsplit(cpu_string, ",", 2); cpu = X86_CPU(object_new(TYPE_X86_CPU)); cpu_x86_find_cpudef(name, &def, &error) cpu_x86_parse_featurestr(&def, features, &error) cpudef_2_x86_cpu(cpu, &def, &error) x86_cpu_realize(OBJECT(cpu), &error); Basically, this isolates the parts of the code that do: - Splitting cpu_model string into CPU model and feature string; - CPU object creation; - CPU model lookup; - CPU feature string parsing. After this, I will send an additional patch to introduce CPU classes on target-i386, based on this series. Eduardo Habkost (16): target-i386/cpu.c: coding style fix target-i386: move cpu_x86_init() to cpu.c target-i386: cpu: rename x86_def_t to X86CPUDefinition target-i386: x86_cpudef_setup(): cosmetic change on comment target-i386: cpu_x86_init(): move error handling to end of function target-i386: cpu_x86_init(): print error message in case of error target-i386: cpu_x86_register(): report errors using Error parameter target-i386: cpu_x86_register(): reorder CPU property setting target-i386: kill cpu_x86_register() target-i386: return Error from cpu_x86_find_by_name() target-i386: cpu_x86_find_by_name(): split CPU model and feature string first target-i386: cpu: create cpu_x86_find_cpudef() function target-i386: cpu_x86_init(): rename cpu_model to cpu_string target-i386: cpu_x86_init(): eliminate extra 'def1' variable target-i386: cpu: separate cpudef lookup from feature string parsing target-i386: cpu_x86_init(): reorder split of CPU string and creation of CPU object Igor Mammedov (1): target-i386: move out CPU features initialization to separate func target-i386/cpu.c | 175 ++++++++++++++++++++++++++++++++++----------------- target-i386/cpu.h | 1 - target-i386/helper.c | 24 ------- 3 files changed, 118 insertions(+), 82 deletions(-) -- 1.7.11.7