From 2192a9303d43ee5e1b2b65f5ed9a93922bcdd1df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Mon, 27 Feb 2017 15:29:29 +0100 Subject: ppc/xics: export the XICS init routines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is nothing left related to the XICS object in the realize functions of the KVMXICSState and XICSState class. So adapt the interfaces to call these routines directly from the sPAPR machine init sequence. Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/ppc/spapr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/ppc') diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 47eb503..b81c95b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -161,7 +161,8 @@ static XICSState *xics_system_init(MachineState *machine, if (kvm_enabled()) { Error *err = NULL; - if (machine_kernel_irqchip_allowed(machine)) { + if (machine_kernel_irqchip_allowed(machine) && + !xics_kvm_init(SPAPR_MACHINE(machine), errp)) { xics = try_create_xics(SPAPR_MACHINE(machine), TYPE_XICS_SPAPR_KVM, TYPE_ICS_KVM, TYPE_KVM_ICP, nr_servers, nr_irqs, &err); @@ -175,6 +176,7 @@ static XICSState *xics_system_init(MachineState *machine, } if (!xics) { + xics_spapr_init(SPAPR_MACHINE(machine), errp); xics = try_create_xics(SPAPR_MACHINE(machine), TYPE_XICS_SPAPR, TYPE_ICS_SIMPLE, TYPE_ICP, nr_servers, nr_irqs, errp); -- cgit v1.1