diff options
author | Greg Kurz <groug@kaod.org> | 2017-06-08 15:42:59 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-06-09 12:15:57 +1000 |
commit | 9ed656631d73a7564dfe178ca8c48bf049098aaf (patch) | |
tree | 8b0121c4ade2d731e07e873ed64a6ea9ef80e4c2 /include | |
parent | 100f738850639a108d6767316ce4dcc1d1ea4ae4 (diff) |
xics: setup cpu at realize time
Until recently, spapr used to allocate ICPState objects for the lifetime
of the machine. They would only be associated to vCPUs in xics_cpu_setup()
when plugging a CPU core.
Now that ICPState objects have the same lifecycle as vCPUs, it is
possible to associate them during realization.
This patch hence open-codes xics_cpu_setup() in icp_realize(). The vCPU
is passed as a property. Note that vCPU now needs to be realized first
for the IRQs to be allocated. It also needs to resetted before ICPState
realization in order to synchronize with KVM.
Since ICPState objects are freed when unrealized, xics_cpu_destroy() isn't
needed anymore and can be safely dropped.
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/ppc/xics.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 797df82fef..37b8fb1e88 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -87,6 +87,7 @@ struct ICPState { }; #define ICP_PROP_XICS "xics" +#define ICP_PROP_CPU "cpu" struct PnvICPState { ICPState parent_obj; @@ -187,8 +188,6 @@ void spapr_dt_xics(int nr_servers, void *fdt, uint32_t phandle); qemu_irq xics_get_qirq(XICSFabric *xi, int irq); ICPState *xics_icp_get(XICSFabric *xi, int server); -void xics_cpu_setup(XICSFabric *xi, PowerPCCPU *cpu, ICPState *icp); -void xics_cpu_destroy(XICSFabric *xi, PowerPCCPU *cpu); /* Internal XICS interfaces */ void icp_set_cppr(ICPState *icp, uint8_t cppr); |