Skip to content

Introduce cpu die topology and enable CPUID.1F for i386

Like Xu qemu-devel 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 0 repliesNew
  2. v39 patches 14 repliesSuperseded
  3. v25 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches9 repliesSuperseded

Changes in v4 from the cover letter

- base commit: 22fa84da on github.com/ehabkost/qemu.git:machine-next
- refine comments for pc_smp_parse()
- remove the use of cpu->enable_cpuid_0x1f
- apply new logic for cpuid_min_level adjustment and drop the legacy one
- refine the way of MachineState casting in pc_smp_parse()
- [QUEUED] move test_topo_bits to the previous patch for bisectability

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3target/i386: Add CPUID.1F generation support for multi-dies PCMachinetarget/i386/cpu.c target/i386/cpu.h target/i386/kvm.c+54 -00 replies
2/3machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse()hw/core/machine.c hw/i386/pc.c include/hw/boards.h +2 more+163 -730 replies
3/3vl.c: Add -smp, dies=* command line support and update dochw/i386/pc.c qemu-options.hx vl.c+29 -210 replies

Reviews trailers per patch

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

PatchEduardo Habkost
1/3
2/3R-b
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] [PATCH v4 0/3] Introduce cpu die topology and enable CPUID.1F for i386

This patch series introduces a new cpu topolgy 'die' for PCMachine, which extends virtual cpu topology to the socket/die/core/thread model, allowing the setting of dies number per one socket via -smp qemu command.

For i386, it upgrades APIC-IDs generation and reversion functions with a new exposed leaf called CPUID.1F, which is a preferred superset to leaf 0BH. The CPUID.1F spec is on the latest Inetl SDM, 3-190 Vol 2A.

Guest system could discover multi-die/package topology through CPUID.1F. and its benefit is primarily for _reporting_ of the guest CPU topology. The guest kernel with multi-die/package support have no impact on its cache topology, NUMA topology, Linux scheduler, or system performance.

==changelog==

v4:

- base commit: 22fa84da on github.com/ehabkost/qemu.git:machine-next
- refine comments for pc_smp_parse()
- remove the use of cpu->enable_cpuid_0x1f
- apply new logic for cpuid_min_level adjustment and drop the legacy one
- refine the way of MachineState casting in pc_smp_parse()
- [QUEUED] move test_topo_bits to the previous patch for bisectability

v3: https://patchwork.kernel.org/cover/10989013/

- add a MachineClass::smp_parse function pointer
- place the PC-specific function inside hw/i386/pc.c
- introduce die_id in a separate patch with default value 0
- set env->nr_dies in pc_new_cpu() and pc_cpu_pre_plug()
- fix a circular dependency between target/i386/cpu.c and hw/i386/pc.c
- fix cpu->die_id check in pc_cpu_pre_plug()
- Based on "[PATCH v3 00/10] Refactor cpu topo into machine properties"
- Rebase to commit 219dca61ebf41625831d4f96a720852baf44b762

v2: https://patchwork.kernel.org/cover/10953191/

- Enable cpu die-level topolgy only for PCMachine and X86CPU
- Minimize cpuid.0.eax to the setting value actually used by guest
- Update cmd line -smps docs for die-level configurations
- Refactoring topo-bit tests for x86_apicid_from_cpu_idx() with nr_dies
- Based on "[PATCH v3 00/10] Refactor cpu topo into machine properties"
- Rebase to commit 2259637b95bef3116cc262459271de08e038cc66

v1: https://patchwork.kernel.org/cover/10876667/

Like Xu (3):
target/i386: Add CPUID.1F generation support for multi-dies PCMachine
machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse() vl.c: Add -smp, dies=* command line support and update doc

 hw/core/machine.c    | 76 ++++++++++++++++++++++++++++++++++++++++
 hw/i386/pc.c         | 83 ++++++++++++++++++++++++++++++++++++++++++++
 include/hw/boards.h  |  5 +++
 include/hw/i386/pc.h |  1 +
 qemu-options.hx      | 17 ++++-----
 target/i386/cpu.c    | 41 ++++++++++++++++++++++
 target/i386/cpu.h    |  1 +
 target/i386/kvm.c    | 12 +++++++
 vl.c                 | 78 +++--------------------------------------
 9 files changed, 233 insertions(+), 81 deletions(-)
Signature · 1 line
2.21.0