From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uostn-00017L-19 for qemu-devel@nongnu.org; Tue, 18 Jun 2013 06:12:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uostj-00073v-D7 for qemu-devel@nongnu.org; Tue, 18 Jun 2013 06:12:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58139 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uostj-00073Z-4X for qemu-devel@nongnu.org; Tue, 18 Jun 2013 06:12:23 -0400 Message-ID: <51C03284.7050101@suse.de> Date: Tue, 18 Jun 2013 12:12:20 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.crosthwaite@xilinx.com Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, mst@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, edgar.iglesias@gmail.com Hi Peter, Am 18.06.2013 11:43, schrieb peter.crosthwaite@xilinx.com: > From: Peter Crosthwaite >=20 >=20 > This series enables QOM super class access and demostrates some usages. > Replaces the save->override->call via FooClass technique, to reduce > some of the boiler plate in recently fully QOMified devices. >=20 > Applied the change to ARM CPU, MB CPU and some of Andreas's recently > QOMified i386 devices, all which have the save->override->call issue. > ARMCPU I've done a brief test on and seems to work. >=20 > ARM CPU was particularly difficult, as it has 3 layers of heirachy, > where a non-concrete class (TYPE_ARM_CPU) need to super class itself > (to TYPE_CPU). This sees the need for super-classers to specify their > expected base class level. See patches for illustration. Thanks for experimenting with this. Anthony had asked to give him more review time on my virtio series before choosing a path to pursue there. > The main future work to the series is to apply the change pattern to > the reset of the tree >=20 >=20 > Peter Crosthwaite (7): > target-arm/cpu.c: delete un-needed instance/class sizes > qom: Add super class accessor > qdev-core: Introduce DEVICE super class cast macros > qom/cpu: Introduce CPU super class cast macros > target-arm: Remove ARMCPUClass > target-microblaze: Remove MicroblazeCPUClass Still need to review the new macros in-depth, but I'm skeptical about removing *CPUClass'es while CPUState conversions are still ongoing ... > i8254: Remove [KVM]PITClass ... whereas this one was purely introduced for QOM realize, so OK. Also the subjects are a bit misleading, suggest something like "...: Use super class macro". Cheers, Andreas > hw/i386/kvm/i8254.c | 17 ++--------------- > hw/timer/i8254.c | 16 ++-------------- > include/hw/qdev-core.h | 4 ++++ > include/qom/cpu.h | 4 ++++ > include/qom/object.h | 18 ++++++++++++++++++ > qom/object.c | 15 +++++++++++++++ > target-arm/cpu-qom.h | 20 -------------------- > target-arm/cpu.c | 16 +++++----------- > target-microblaze/cpu-qom.h | 20 -------------------- > target-microblaze/cpu.c | 13 ++++--------- > 10 files changed, 54 insertions(+), 89 deletions(-) --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg