From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1R7M-00010x-M0 for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:38:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1R7K-0007r9-KL for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:38:04 -0500 Received: from cantor2.suse.de ([195.135.220.15]:51141 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1R7K-0007UJ-Ah for qemu-devel@nongnu.org; Fri, 01 Feb 2013 19:38:02 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sat, 2 Feb 2013 01:37:04 +0100 Message-Id: <1359765428-27805-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] [PATCH qom-cpu-next v3 0/4] target-i386: X86CPU subclasses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: ehabkost@redhat.com, blauwirbel@gmail.com, anthony@codemonkey.ws, imammedo@redhat.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Richard Henderson Hello, Long announced, here it is after the freeze: My 3rd attempt at CPU subcla= sses. v3 is closer to v1 again, slimmed down not to touch x86_def_t much. It was noticed that in theory a QOM class enumeration could lead to the h= ost CPU class_init running before kvm_init(). My proposal is to make the clas= s_init reentrant and to re-run it from target-i386's kvm_arch_init() if necessar= y. Similar to target-ppc, -cpu host code is placed into kvm.c rather than cp= u.c. This conversion is an interim solution to get the code structured in a QOM-friendly way and to reach a hot-plug friendly and cross-target aligne= d CPU initialization. It decouples the work of introducing subclasses (to h= ide object initialization from cpu_init() and device_add) from any x86-intern= al improvements (like Igor's global compat properties set from pc-x.y machin= es). The -cpu ? and QMP support is still based on array iteration. Based on qom-cpu-next queue, which contains some cpu_init() cleanups alre= ady. Available for testing here: git://github.com/afaerber/qemu-cpu.git qom-cpu-x86-subclasses.v3 https://github.com/afaerber/qemu-cpu/commits/qom-cpu-x86-subclasses.v3 Regards, Andreas v2 -> v3: * Instead of re-coding all CPU definitions as class_init functions, leave the built-in definition array in place and place x86_def_t in the class= . * Use kvm_arch_init() hook to assure class_init succeeds for -cpu host. Suggested by Eduardo. v1-> v2: * Instead of turning x86_def_t into X86CPUInfo to initialize classes, drop it completely and register types manually with customizable TypeIn= fos * Use new list facilities for printing -cpu ? models * Adopt new name scheme suggested by Eduardo and ideas from my alpha seri= es * Keep short names in -cpu ? output for alignment reasons * Merge cpu_x86_init() into cpu.c:cpu_x86_register() * Append patch showing Haswell as subclass of SandyBridge Cc: Anthony Liguori Cc: Eduardo Habkost Cc: Igor Mammedov Cc: Blue Swirl Cc: Richard Henderson Andreas F=C3=A4rber (4): target-i386: Move cpu_x86_init() target-i386: Split command line parsing out of cpu_x86_register() target-i386: Slim conversion to X86CPU subclasses Remove cpudef_setup() hooks arch_init.c | 7 - bsd-user/main.c | 3 - include/sysemu/arch_init.h | 1 - linux-user/main.c | 3 - target-i386/cpu-qom.h | 24 ++++ target-i386/cpu.c | 326 ++++++++++++++++++--------------------= ------ target-i386/cpu.h | 3 - target-i386/helper.c | 24 ---- target-i386/kvm.c | 93 +++++++++++++ vl.c | 7 - 10 Dateien ge=C3=A4ndert, 247 Zeilen hinzugef=C3=BCgt(+), 244 Zeilen ent= fernt(-) --=20 1.7.10.4