• G
    xics: setup cpu at realize time · 9ed65663
    Greg Kurz 提交于
    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: NGreg Kurz <groug@kaod.org>
    Reviewed-by: NCédric Le Goater <clg@kaod.org>
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    9ed65663
pnv_core.c 7.3 KB