[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] qom: Reimplement Interfaces
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] qom: Reimplement Interfaces |
Date: |
Fri, 10 Aug 2012 20:43:11 +1000 |
On Fri, Aug 10, 2012 at 7:15 PM, Andreas Färber <address@hidden> wrote:
> Am 10.08.2012 05:16, schrieb Peter A. G. Crosthwaite:
>> From: Anthony Liguori <address@hidden>
>>
>> The current implementation of Interfaces is poorly designed. Each interface
>> that an object implements ends up being an object that's tracked by the
>> implementing object. There's all sorts of gymnastics to deal with casting
>> between these objects.
>>
>> But an interface shouldn't be associated with an Object. Interfaces are
>> global
>> to a class. This patch moves all Interface knowledge to ObjectClass
>> eliminating
>> the relationship between Object and Interfaces.
>>
>> Interfaces are now abstract (as they should be) but this is okay. Interfaces
>> essentially act as additional parents for the classes and are treated as
>> such.
>>
>> With this new implementation, we should fully support derived interfaces
>> including reimplementing an inherited interface.
>>
>> PC: Rebased against qom-next merge Jun-2012.
>>
>> PC: Removed replication of cast logic for interfaces, i.e. there is only
>> one cast function - object_dynamic_cast() (and object_dynamic_cast_assert())
>>
>> Signed-off-by: Anthony Liguori <address@hidden>
>> Signed-off-by: Peter A. G. Crosthwaite <address@hidden>
>> Acked-by: Paolo Bonzini <address@hidden>
>
> Anthony, didn't you have a whole series to refactor interfaces and add
> test cases?
>
This is patch 1 from that series. I have refactored it a little (as
indicated in the comments). Unless theres been another series since I
missed?
> /-F
>
> --
> 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] [PATCH 2/2] xilinx_axi*: Re-implemented interconnect, (continued)
- [Qemu-devel] [PATCH 2/2] xilinx_axi*: Re-implemented interconnect, Peter A. G. Crosthwaite, 2012/08/05
- [Qemu-devel] [PULL 0/2] QOMify AXI stream for Xilinx AXI ethernet/DMA, Peter A. G. Crosthwaite, 2012/08/09
- [Qemu-devel] [PULL 0/2] QOMify AXI stream for Xilinx AXI ethernet/DMA, Peter A. G. Crosthwaite, 2012/08/09
- [Qemu-devel] [PATCH 2/2] xilinx_axi*: Re-implemented interconnect, Peter A. G. Crosthwaite, 2012/08/09
- Re: [Qemu-devel] [PULL 0/2] QOMify AXI stream for Xilinx AXI ethernet/DMA, Edgar E. Iglesias, 2012/08/13