QOM Super class access
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 0 repliesNew
- v25 patches 8 repliesSuperseded
- v1 RFC7 patches 13 repliesSuperseded
Changes in v3 from the cover letter
Removed object_class_get_parent_by_name
introduce FOO_PARENT_CLASS macros
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | target-arm/cpu.c: delete un-needed instance/class sizestarget-arm/ | +0 | 0 replies | |
| 2/4 | target-arm: Use parent classes for reset + realizetarget-arm/ target-arm/ | +7 | 0 replies | |
| 3/4 | target-microblaze: Use parent class for reset + realizetarget-microblaze/ target-microblaze/ | +6 | 0 replies | |
| 4/4 | i8254: Use parent class for realizehw/ hw/ | +8 | 0 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Andreas Färber |
|---|---|
| 1/4 | R-b |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH qom-next v3 0/4] QOM Super class access
From: Peter Crosthwaite <[email protected]>
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.
The main future work to the series is to apply the change pattern to the reset of the tree
changed since V2:
Removed object_class_get_parent_by_name
introduce FOO_PARENT_CLASS macros
changed since V1:
Simplified to use object_class_get_parent_by_type (suggest by Hu Tao)
Peter Crosthwaite (4):
target-arm/cpu.c: delete un-needed instance/class sizes
target-arm: Use parent classes for reset + realize
target-microblaze: Use parent class for reset + realize
i8254: Use parent class for realize
hw/i386/kvm/i8254.c | 19 ++++--------------- hw/timer/i8254.c | 17 ++++------------- target-arm/cpu-qom.h | 22 ++-------------------- target-arm/cpu.c | 16 +++++----------- target-microblaze/cpu-qom.h | 22 ++-------------------- target-microblaze/cpu.c | 14 ++++---------- 6 files changed, 21 insertions(+), 89 deletions(-)
Signature · 1 line
1.8.3.rc1.44.gb387c77.dirty