From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDGgY-0006YO-GP for qemu-devel@nongnu.org; Thu, 29 Mar 2012 10:50:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDGgP-0005Hm-Oj for qemu-devel@nongnu.org; Thu, 29 Mar 2012 10:50:46 -0400 Received: from cantor2.suse.de ([195.135.220.15]:41415 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDGgP-0005HV-FB for qemu-devel@nongnu.org; Thu, 29 Mar 2012 10:50:37 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 29 Mar 2012 16:50:29 +0200 Message-Id: <1333032631-13533-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 v7 0/2] QOM'ify ARM CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Max Filippov , Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paul Brook Hello Peter, Here's an improved mini-conversion. Please apply to target-arm.next tree. Available at: https://github.com/afaerber/qemu-cpu/commits/qom-cpu-arm.v7 Regards, Andreas Cc: Peter Maydell Cc: Paul Brook Cc: Andrzej Zaborowski Cc: Max Filippov v6 -> v7: * Fix TODO comment and add a corresponding TODO in helper.c. * Avoid klass/class by using oc for ObjectClass, cc for CPUClass, acc for= ARMCPUClass. v5 -> v6: * By dropping some of the patches in the series, cpu_reset() would no lon= ger reset the CPUARMState. Fix this by re-adding a reset handler and callin= g cpu_state_reset() for now. v4 -> v5: * Use only one non-abstract CPU type for now, leave everything else as is= . * Drop cpu_arm_close() instead of converting it. * Still make available cpu-qom.h through cpu.h for convenience. v3 -> v4: * Rebased on top of type_init() v2, object_class_get_list() v2, qom-cpu v= 4. * Rename cpu-core.h to cpu-qom.h. While the term "ARM core" is quite comm= on, it is less so for other architectures like s390x so use a neutral term. * Use container_of() for CPUState -> CPU macros (suggested by Anthony). * Rework arm_env_get_object() -> arm_env_get_cpu(), avoids some casts (suggested by Anthony). Also rename ENV_GET_OBJECT() -> ENV_GET_CPU(). * Sort -cpu ? list. * Use object_class_get_list() and sort ourselves rather than using object_class_foreach_ordered() with callbacks (suggested by Anthony). * Drop ARMCPUClass jtag_id since it turned out unneeded in QEMU (Peter+An= drzej). * Drop experimental "halted" property since that should be in common code= . * Introduce "cpuid-variant" and "cpuid-revision" properties. * Use CPU properties to drop unneeded pxa270-* classes. * Move "/cpu" child property to integratorcp machine. v2 -> v3: * Rebased against qom-upstream.14 branch (and that against master). * Rename target-arm/cpu-core.c to cpu.c now that we no longer need VPATH. * Leave cpu-core.h as is to separate from legacy cpu.h. * Fix -cpu alias "pxa270": handled in cpu_arm_init(). * Use proper GPL headers. * Start removing CPUID uses in cpu_reset_model_id() and cpu.h. * Fully convert cpu_reset_model_id() to ARMCPUInfo or per-model code. * Experiment with adding properties ("halted"). * For testing, add a "/cpu" child property (HACK). v1 -> v2: * Cherry-pick Anthony's object_class_foreach() patch. * 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 (2): target-arm: Drop cpu_arm_close() target-arm: Minimalistic CPU QOM'ification Makefile.target | 1 + target-arm/cpu-qom.h | 70 ++++++++++++++++++++++++++++++++++++++++++++= ++++++ target-arm/cpu.c | 60 ++++++++++++++++++++++++++++++++++++++++++ target-arm/cpu.h | 2 +- target-arm/helper.c | 13 +++++---- 5 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 target-arm/cpu-qom.h create mode 100644 target-arm/cpu.c --=20 1.7.7