aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_irq.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2019-02-15 12:40:06 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-02-18 10:34:56 +1100
commit56af66566dc728d951cba9b9d6b9772259d43d8d (patch)
tree20bf69fbe512980682b039a14fd9261874088dac /hw/ppc/spapr_irq.c
parent8e6e6efef7af41c4d809b6991927949f354836f7 (diff)
downloadqemu-56af66566dc728d951cba9b9d6b9772259d43d8d.zip
qemu-56af66566dc728d951cba9b9d6b9772259d43d8d.tar.gz
qemu-56af66566dc728d951cba9b9d6b9772259d43d8d.tar.bz2
spapr/irq: Use the base ICP class for KVM
The base ICP class knows how to interact with KVM. Adapt sPAPR to use it instead of the ICP KVM class. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <155023080638.1011724.792095453419098948.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/ppc/spapr_irq.c')
-rw-r--r--hw/ppc/spapr_irq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
index 48d6b2d..e6893df 100644
--- a/hw/ppc/spapr_irq.c
+++ b/hw/ppc/spapr_irq.c
@@ -102,7 +102,6 @@ static void spapr_irq_init_xics(sPAPRMachineState *spapr, int nr_irqs,
if (kvm_enabled()) {
if (machine_kernel_irqchip_allowed(machine) &&
!xics_kvm_init(spapr, &local_err)) {
- spapr->icp_type = TYPE_KVM_ICP;
spapr->ics = spapr_ics_create(spapr, TYPE_ICS_KVM, nr_irqs,
&local_err);
}
@@ -117,7 +116,6 @@ static void spapr_irq_init_xics(sPAPRMachineState *spapr, int nr_irqs,
if (!spapr->ics) {
xics_spapr_init(spapr);
- spapr->icp_type = TYPE_ICP;
spapr->ics = spapr_ics_create(spapr, TYPE_ICS_SIMPLE, nr_irqs,
&local_err);
}
@@ -199,7 +197,7 @@ static void spapr_irq_cpu_intc_create_xics(sPAPRMachineState *spapr,
Object *obj;
sPAPRCPUState *spapr_cpu = spapr_cpu_state(cpu);
- obj = icp_create(OBJECT(cpu), spapr->icp_type, XICS_FABRIC(spapr),
+ obj = icp_create(OBJECT(cpu), TYPE_ICP, XICS_FABRIC(spapr),
&local_err);
if (local_err) {
error_propagate(errp, local_err);