diff options
author | Cédric Le Goater <clg@kaod.org> | 2018-06-25 11:17:18 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-07-03 09:56:51 +1000 |
commit | abe82ebb2005eef846fd62652b0107d268c8e06f (patch) | |
tree | c183c53bfc7369861344c0129d145370d51e9bcf /hw/intc | |
parent | c8b1846f238ea5702ccbc0c3e2760c8fee875808 (diff) | |
download | qemu-abe82ebb2005eef846fd62652b0107d268c8e06f.zip |
ppc/xics: rework the ICS classes inheritance tree
With the previous changes, we can now let the ICS_KVM class inherit
directly from ICS_BASE class and not from the intermediate ICS_SIMPLE.
It makes the class hierarchy much cleaner.
What is left in the top classes is the low level interface to access
the KVM XICS device in ICS_KVM and the XICS emulating handlers in
ICS_SIMPLE.
This should not break migration compatibility.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/xics_kvm.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index b314eb7d16..30c3769a20 100644 --- a/hw/intc/xics_kvm.c +++ b/hw/intc/xics_kvm.c @@ -359,12 +359,10 @@ static void ics_kvm_class_init(ObjectClass *klass, void *data) ICSStateClass *icsc = ICS_BASE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass); - /* - * Use device_class_set_parent_realize() when ics-kvm inherits - * directly from ics-base and not from ics-simple anymore. - */ - dc->realize = ics_kvm_realize; - dc->reset = ics_kvm_reset; + device_class_set_parent_realize(dc, ics_kvm_realize, + &icsc->parent_realize); + device_class_set_parent_reset(dc, ics_kvm_reset, + &icsc->parent_reset); icsc->pre_save = ics_get_kvm_state; icsc->post_load = ics_set_kvm_state; @@ -373,7 +371,7 @@ static void ics_kvm_class_init(ObjectClass *klass, void *data) static const TypeInfo ics_kvm_info = { .name = TYPE_ICS_KVM, - .parent = TYPE_ICS_SIMPLE, + .parent = TYPE_ICS_BASE, .instance_size = sizeof(ICSState), .class_init = ics_kvm_class_init, }; |