[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access |
Date: |
Tue, 18 Jun 2013 20:20:26 +1000 |
Hi Andreas,
On Tue, Jun 18, 2013 at 8:12 PM, Andreas Färber <address@hidden> wrote:
> Hi Peter,
>
> Am 18.06.2013 11:43, schrieb address@hidden:
>> From: Peter Crosthwaite <address@hidden>
>>
>>
>> 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.
>>
>> 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.
>>
>> 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
>>
>>
>> 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 ...
>
Sure thing,
Its likely that ARMCPUClass (being an abstraction in its own right)
will pick up a few abstractions in full QOMificiation so that one is
very likely to come back to life. Microblaze I doubt will every become
an abstraction due to its very dynamic nature - our plan is to use
static properties to differentiate Microblaze variants rather than
(ARM style) sub-classes.
>> 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".
>
Ok,
I'll wait on Anthonys comments before a respin anyways.
Regards,
Peter
> 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(-)
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
>
- [Qemu-devel] [RFC PATCH v1 1/7] target-arm/cpu.c: delete un-needed instance/class sizes, (continued)
- [Qemu-devel] [RFC PATCH v1 1/7] target-arm/cpu.c: delete un-needed instance/class sizes, peter . crosthwaite, 2013/06/18
- [Qemu-devel] [RFC PATCH v1 2/7] qom: Add super class accessor, peter . crosthwaite, 2013/06/18
- [Qemu-devel] [RFC PATCH v1 3/7] qdev-core: Introduce DEVICE super class cast macros, peter . crosthwaite, 2013/06/18
- [Qemu-devel] [RFC PATCH v1 4/7] qom/cpu: Introduce CPU super class cast macros, peter . crosthwaite, 2013/06/18
- [Qemu-devel] [RFC PATCH v1 5/7] target-arm: Remove ARMCPUClass, peter . crosthwaite, 2013/06/18
- [Qemu-devel] [RFC PATCH v1 6/7] target-microblaze: Remove MicroblazeCPUClass, peter . crosthwaite, 2013/06/18
- [Qemu-devel] [RFC PATCH v1 7/7] i8254: Remove [KVM]PITClass, peter . crosthwaite, 2013/06/18
- Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access, Andreas Färber, 2013/06/18
- Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access,
Peter Crosthwaite <=
- Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access, Michael S. Tsirkin, 2013/06/18
- Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access, Andreas Färber, 2013/06/18