This series is a sequel to the discussion on a patch from Ben's powernv patchset:
http://patchwork.ozlabs.org/patch/597153/ Indeed, since the DT is a machine abstraction, it should definitely sit under hw/ppc and not in the target code: - all machine types are forced to share the same numbering logic - user mode does not need that => there are #ifdef everywhere So this series moves all the current numbering logic to the machine code. The patchset was completely re-written according to Igor's valuable suggestions. The main change is that cpu_dt_id is now computed out of a cpu_index provided by the machine, instead of bending the code to use cs->cpu_index. I resend Bharata's patch without any modification because patch 6 is based on it (pseries-2.7 support). I did not see any regression on pseries-2.6, pseries-2.7 and CPU hotplug. Migration is not impacted because the new cpu_index has the same value as cs->cpu_index, and thus gives the same guest visible cpu_dt_id. TODO: find a way for machines to provide their own cpu_dt_id logic. --- Bharata B Rao (1): spapr: Ensure thread0 of CPU core is always realized first Greg Kurz (6): ppc: simplify max_smt initialization in ppc_cpu_realizefn() ppc: different creation paths for cpus in system and user mode ppc: open code cpu creation for machine types ppc: introduce ppc_set_vcpu_dt_id() spapr: use ppc_set_vcpu_dt_id() in CPU hotplug code ppc: move the cpu_dt_id logic to machine code hw/ppc/e500.c | 2 + hw/ppc/mac_newworld.c | 2 + hw/ppc/mac_oldworld.c | 2 + hw/ppc/ppc.c | 78 +++++++++++++++++++++++++++++++++++++++++++ hw/ppc/ppc440_bamboo.c | 2 + hw/ppc/ppc4xx_devs.c | 2 + hw/ppc/prep.c | 2 + hw/ppc/spapr.c | 2 + hw/ppc/spapr_cpu_core.c | 36 +++++++++++++------- hw/ppc/virtex_ml507.c | 2 + include/hw/ppc/ppc.h | 2 + target-ppc/cpu.h | 5 ++- target-ppc/translate_init.c | 35 ------------------- 13 files changed, 114 insertions(+), 58 deletions(-) -- Greg