Patchwork [v5,03/14] spapr: move cpu_setup after kvmppc_set_papr

login
register
mail settings
Submitter Alexey Kardashevskiy
Date Sept. 26, 2013, 6:18 a.m.
Message ID <1380176328-21320-4-git-send-email-aik@ozlabs.ru>
Download mbox | patch
Permalink /patch/278098/
State New
Headers show

Comments

Alexey Kardashevskiy - Sept. 26, 2013, 6:18 a.m.
This moves the xics_cpu_setup() call after kvmppc_set_papr()
in order to get VCPUs initialized as this is required by upcoming
XICS-KVM.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 hw/ppc/spapr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
David Gibson - Sept. 27, 2013, 5:15 a.m.
On Thu, Sep 26, 2013 at 04:18:37PM +1000, Alexey Kardashevskiy wrote:
> This moves the xics_cpu_setup() call after kvmppc_set_papr()
> in order to get VCPUs initialized as this is required by upcoming
> XICS-KVM.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Acked-by: David Gibson <david@gibson.dropbear.id.au>

Patch

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 004184d..1814b97 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1175,8 +1175,6 @@  static void ppc_spapr_init(QEMUMachineInitArgs *args)
         }
         env = &cpu->env;
 
-        xics_cpu_setup(spapr->icp, cpu);
-
         /* Set time-base frequency to 512 MHz */
         cpu_ppc_tb_init(env, TIMEBASE_FREQ);
 
@@ -1190,6 +1188,8 @@  static void ppc_spapr_init(QEMUMachineInitArgs *args)
             kvmppc_set_papr(cpu);
         }
 
+        xics_cpu_setup(spapr->icp, cpu);
+
         qemu_register_reset(spapr_cpu_reset, cpu);
     }