Skip to content

RFC prebuild cpu QOM tree /machine/node/socket/core ->link-cpu

Chen Fan qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 RFC Latest3 patches 2 repliesIn review
  2. v3 RFC3 patches 3 repliesSuperseded
  3. v2 RFC2 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC2 patches5 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3cpu: introduce CpuTopoInfo structure for argument simplificationtarget-i386/topology.h+17 -1610 replies
2/3i386: use CpuTopoInfo instead apic_id as argument for pc_new_cpu()hw/i386/pc.c target-i386/cpu.c target-i386/cpu.h +1 more+60 -161 reply
3/3i386: introduce cpu QOM hierarchy treehw/i386/pc.c target-i386/Makefile.objs target-i386/cpu-topology.c +3 more+290 -10 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchEduardo Habkost
1/3R-b R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [Qemu-devel] [RFC v4 0/3] prebuild cpu QOM tree /machine/node/socket/core ->link-cpu

at present, after hotplug a discontinuous cpu id on source, then done migration, on target, it will fail to add the unoccupied cpu id which was skipped at source, this cause is on target Qemu prebuild CPU with continuous cpu_index. so after migration, the cpu infrastructure bewteen source and target are different.

I suppose we could use apic_id as instance_id which was used at registering vmstate when create cpu. on target, we prebuild the specified cpu topology using comand line:
-device /machine/node[]/socket[]/core[]/cpu[], then migration, we could keep the same
cpu infrastructure on both side.

V4: rename CpuTopoInfo to X86CPUTopoInfo. and move cpu_exsit() to pc_new_cpu().

V3: get rid of thread object and tie link<cpu> to <core> directly. and prebuild full
core[] and thread[] as init socket[] according to smp_cores and smp_threads.

TODO:
1. add cpu "path" property which used for specifying the QOM path.
2. add -device cpu-foo.path supported.
3. then we could introduce hot-remove cpu probably.

I don't know wether this way is right or not. pls tell me. :)

Chen Fan (3):
i386: introduce cpu QOM hierarchy tree
cpu: introduce X86CPUTopoInfo structure for argument simplification
i386: use CpuTopoInfo instead apic_id as argument for pc_new_cpu()

 hw/i386/pc.c               |  28 ++++---
 target-i386/Makefile.objs  |   2 +-
 target-i386/cpu-topology.c | 199 +++++++++++++++++++++++++++++++++++++++++++++
 target-i386/cpu-topology.h |  71 ++++++++++++++++
 target-i386/cpu.c          |  41 ++++++++--
 target-i386/cpu.h          |   8 ++
 target-i386/topology.h     |  51 ++++++++----
 7 files changed, 367 insertions(+), 33 deletions(-)
 create mode 100644 target-i386/cpu-topology.c
 create mode 100644 target-i386/cpu-topology.h
Signature · 1 line
1.8.1.4