Skip to content

Add CPU topology extension support for mshv guests

Doru Blânzeanu qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v12 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Enable SMT support in the mshv partition

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3i386/cpu.c: Adjust minimum xlevel to 0x8000_001E when TOPOEXT is enabledtarget/i386/cpu.c+5 -01 reply
2/3mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache subleavestarget/i386/mshv/mshv-cpu.c+33 -80 replies
3/3accel/mshv: Enable SMT support for the mshv partitionaccel/mshv/mshv-all.c+2 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] Add CPU topology extension support for mshv guests

This patch changes how MSHV constructs and registers the guest CPUID table. It consists of three commits:

1. i386/cpu.c: Adjust minimum xlevel to 0x8000_001E when TOPOEXT is enabled
2. mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache subleaves
3. accel/mshv: Enable SMT support for the mshv partition

The first commit changes the extended CPUID level to 0x8000_001E when the TOPOEXT feature is enabled.
This fix correctly reports CPU topology and cache leaves when TOPOEXT is enabled.

Previous to the second commit, collect_cpuid_entries treated 0x0b and 0x1f like ordinary leaves and collected only sub-leaf zero. But these Intel topology leaves contain one sub-leaf per topology level.
With this patch, now it repeatedly calls cpu_x86_cpuid and stores every result until ECX[15:8] becomes zero (same as kvm does).

Changes since V1:
- Enable SMT support in the mshv partition

Doru Blânzeanu (3):
i386/cpu.c: Adjust minimum xlevel to 0x8000_001E when TOPOEXT is
enabled
mshv/mshv-cpu.c: Collect all Intel topology subleaves and AMD cache
subleaves
accel/mshv: Enable SMT support for the mshv partition

 accel/mshv/mshv-all.c       |  3 ++-
 target/i386/cpu.c           |  5 +++++
 target/i386/mshv/mshv-cpu.c | 41 +++++++++++++++++++++++++++++--------
 3 files changed, 40 insertions(+), 9 deletions(-)
Signature · 1 line
2.54.0