From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsZnK-0004Gm-KT for qemu-devel@nongnu.org; Wed, 01 Feb 2012 08:00:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsZn5-0005KO-74 for qemu-devel@nongnu.org; Wed, 01 Feb 2012 08:00:12 -0500 Received: from cantor2.suse.de ([195.135.220.15]:37156 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsZn4-0005KA-PB for qemu-devel@nongnu.org; Wed, 01 Feb 2012 07:59:59 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 1 Feb 2012 13:57:17 +0100 Message-Id: <1328101045-10717-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 RFC v2 0/8] Introduce QOM CPU and use for ARM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= Hello, Here's an updated series on incrementally converting CPUState to QOM. Patch 1 is cherry-picked from Anthony's QOM series 3/4. Patch 2 rearranges module init for QOM. Patch 3 add QOM support to the user emulators. Patch 4 introduces QOM CPU. Patch 5-8 Derive and start using a QOM CPU for ARM. Regards, Andreas Cc: Anthony Liguori Cc: Peter Maydell v1 -> v2: * Cherry-pick Anthony's object_class_foreach() patch. * Don't introduce extra early_init(), just relocate former MODULE_INIT_DE= VICE. * Provide new type_init() macro to be used instead of device_init(). * Drop processor_init() and MODULE_INIT_CPU in favor of MODULE_INIT_DEVIC= E. * Prepare cast macros for CPU. * Add documentation. * Fix ARMCPUClass type name (arm-cpu-core -> arm-cpu). * Add documentation. * Rename ARMCPUDef to ARMCPUInfo. * Use a C99-style table for initializing the classes through class_data instead of individual class_init functions (suggested by Anthony). * Prepare reset callback. * Make ENV_GET_OBJECT() use an inline function for readability. * Invoke the CPU's reset method from cpu_reset(). * Do feature initialization via table where sensible. * Add feature flags to ARMCPU as well (suggested by PMM for future tweaki= ng, also simplifies load/save a bit) and initialize them from ARMCPUClass. * Make feature inference work for ARMCPU as well by not passing the ARMCP= UClass. Use function-local macros to avoid the ugliness of deferencing the feat= ures pointer. Andreas F=C3=A4rber (7): qom: Register QOM infrastructure early qom: Add QOM support to user emulators qom: Introduce CPU class target-arm: Introduce QOM CPU and use it for CPUID lookup target-arm: Embed CPUARMState in QOM ARMCPU target-arm: Prepare model-specific class_init function target-arm: Move CPU feature flags out of CPUState Anthony Liguori (1): qom: Allow object_class_foreach() to take additional parameters to refine search Makefile.objs | 1 + Makefile.target | 16 ++- Makefile.user | 1 + bsd-user/main.c | 2 + darwin-user/main.c | 3 + hw/cpu.c | 39 ++++++ include/qemu/cpu.h | 62 +++++++++ include/qemu/object.h | 1 + linux-user/main.c | 2 + module.h | 5 +- qom/object.c | 18 +++- target-arm/cpu-core.c | 358 +++++++++++++++++++++++++++++++++++++++++++= ++++++ target-arm/cpu-core.h | 68 ++++++++++ target-arm/cpu.h | 9 +- target-arm/helper.c | 184 ++++--------------------- target-arm/machine.c | 6 +- vl.c | 4 +- 17 files changed, 604 insertions(+), 175 deletions(-) create mode 100644 hw/cpu.c create mode 100644 include/qemu/cpu.h create mode 100644 target-arm/cpu-core.c create mode 100644 target-arm/cpu-core.h --=20 1.7.7