aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/xics.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2019-02-15 12:40:00 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-02-18 10:34:05 +1100
commit8e6e6efef7af41c4d809b6991927949f354836f7 (patch)
tree50dbc1baae03ddcd50d21aab2bd2841ecc58c9b6 /hw/intc/xics.c
parentd82f397183b41f25e5a2e41c4af887f102de60ef (diff)
downloadqemu-8e6e6efef7af41c4d809b6991927949f354836f7.zip
qemu-8e6e6efef7af41c4d809b6991927949f354836f7.tar.gz
qemu-8e6e6efef7af41c4d809b6991927949f354836f7.tar.bz2
xics: Handle KVM ICP realize from the common code
The realization of KVM ICP currently follows the parent_realize logic, which is a bit overkill here. Also we want to get rid of the KVM ICP class. Explicitely call icp_kvm_realize() from the base ICP realize function. Note that ICPStateClass::parent_realize is retained because powernv needs it. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <155023080049.1011724.15423463482790260696.stgit@bahia.lan> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc/xics.c')
-rw-r--r--hw/intc/xics.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 822d367..acd63ab 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -349,6 +349,14 @@ static void icp_realize(DeviceState *dev, Error **errp)
return;
}
+ if (kvm_irqchip_in_kernel()) {
+ icp_kvm_realize(dev, &err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
+ }
+ }
+
qemu_register_reset(icp_reset_handler, dev);
vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp);
}