[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 0/7] ppc: compute cpu_dt_id in the machine code
From: |
Greg Kurz |
Subject: |
[Qemu-devel] [PATCH v3 0/7] ppc: compute cpu_dt_id in the machine code |
Date: |
Wed, 06 Jul 2016 14:12:19 +0200 |
User-agent: |
StGit/0.17.1-dirty |
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.
This v3 is nearly a total rewrite (only patches 1/7 and 4/7 come from
v2). The most notable changes are:
- vcpu_dt_id is computed earlier instead of passing a cpu_index and
a function pointer to the generic code
- parse cpu features only once (*)
- consolidate the vcpu_dt_id logic in sPAPR
(*) this depends on recent work by Igor. The code is not upstream yet,
but should be in Eduardo Habkost's next pull request, later this
week according to:
https://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg00543.html
In the meantime, I've merged Eduardo's branch into master, added my
patches and pushed that to:
git://github.com/gkurz/qemu.git ppc-vcpu-dt-id-rework
Please comment.
---
Greg Kurz (7):
ppc: different creation paths for cpus in system and user mode
ppc: move smp_threads sanity checks to spapr
ppc: parse cpu features once
ppc: open code cpu creation for machine types
ppc: each machine type to provide vcpu_dt_id
ppc: drop vcpu_idt_id bits from the target code
spapr: consolidate the logic of core cpu_dt_id
hw/ppc/e500.c | 4 ++
hw/ppc/mac_newworld.c | 3 +-
hw/ppc/mac_oldworld.c | 3 +-
hw/ppc/ppc.c | 64 +++++++++++++++++++++++++++++++++++++++
hw/ppc/ppc440_bamboo.c | 3 +-
hw/ppc/ppc4xx_devs.c | 3 +-
hw/ppc/prep.c | 3 +-
hw/ppc/spapr.c | 30 +++++++++++++-----
hw/ppc/spapr_cpu_core.c | 33 +++++++++++++++-----
hw/ppc/virtex_ml507.c | 3 +-
include/hw/ppc/ppc.h | 2 +
include/hw/ppc/spapr_cpu_core.h | 9 +++++
target-ppc/cpu.h | 5 ++-
target-ppc/translate_init.c | 35 ---------------------
14 files changed, 139 insertions(+), 61 deletions(-)
--
Greg