Skip to content

Support QEMU cpu models in MSHV accelerator

Magnus Kulke qemu-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest9 patches 14 repliesIn review
  2. v59 patches 1 replySuperseded
  3. v49 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v39 patches8 repliesSuperseded
v29 patches11 repliesSuperseded
v110 patches16 repliesSuperseded

Changes in v6 from the cover letter

- Remove leftover masking of CET shadowstack bit

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9accel/mshv: use mshv_create_partition_v2 payloadaccel/mshv/mshv-all.c include/hw/hyperv/hvgdk_mini.h include/hw/hyperv/hvhdk.h+261 -71 reply
2/9target/i386/mshv: fix cpuid propagation bugtarget/i386/mshv/mshv-cpu.c+4 -44 replies
3/9target/i386/mshv: fix various cpuid traversal bugstarget/i386/mshv/mshv-cpu.c+61 -271 reply
4/9target/i386/mshv: change cpuid mask to UINT32_MAXtarget/i386/mshv/mshv-cpu.c+6 -111 reply
5/9target/i386/mshv: set cpu model name on -cpu hosttarget/i386/mshv/mshv-cpu.c+31 -01 reply
6/9target/i386: query mshv accel for supported cpuidsinclude/system/mshv.h target/i386/cpu.c target/i386/mshv/mshv-cpu.c+38 -03 replies
7/9target/i386/mshv: populate xsave area offsetstarget/i386/mshv/mshv-cpu.c+31 -01 reply
8/9target/i386/mshv: use hv-provided [0xD,1+2].EBXtarget/i386/mshv/mshv-cpu.c+21 -21 reply
9/9accel/mshv: disable la57 (5lvl paging)accel/mshv/mshv-all.c include/system/mshv_int.h target/i386/mshv/mshv-cpu.c+24 -01 reply

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchWei LiuAnirudh Rayabharam (Microsoft)Philippe Mathieu-DaudéDoru Blânzeanu
1/9A-b R-b R-b
2/9R-b R-b R-b
3/9A-b R-b
4/9A-b R-b
5/9A-b R-b
6/9R-b
7/9R-b R-b
8/9R-b
9/9R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/9] Support QEMU cpu models in MSHV accelerator

Hey all,

In the current MSHV accelerator code passing CPU features via the -cpu flag doesn't work as intended yet. When using the MSHV hypervisor we either silently discard the specified model/features and leave it up to the hypervisor to provide a sensible set of features or if the user selects -cpu host, the hypervisor might refuse to create a partition.

This changeset introduces a more comprehensive support for passing desired guest cpu features to the hypervisor. It's also a prerequisite for Live Migration support.

Changes since v5:

- Remove leftover masking of CET shadowstack bit

Changes since v4:

- Use hypervisor-provided values in CPUID[0xD,{1,2}].EBX to get proper XSAVE sizes via EBX mask:
- Drop masking of CET feature bits (workaround not required anymore)

Changes since v3:

- Rebased onto current master

Changes since v2:

- move disabling of la57 to arch specific code
- assert MSHV_NUM_CPU_FEATURES_BANKS == 2
- dropped QEMU_PACKED changes to hv headers (address in individal patch)

Changes since v1:

- query hypervisor for supported processor features instead of the host OS
- disable la57 (5 level page tables)

best,

magnus

Magnus Kulke (9):
accel/mshv: use mshv_create_partition_v2 payload target/i386/mshv: fix cpuid propagation bug target/i386/mshv: fix various cpuid traversal bugs target/i386/mshv: change cpuid mask to UINT32_MAX target/i386/mshv: set cpu model name on -cpu host target/i386: query mshv accel for supported cpuids target/i386/mshv: populate xsave area offsets target/i386/mshv: use hv-provided [0xD,1+2].EBX accel/mshv: disable la57 (5lvl paging)

 accel/mshv/mshv-all.c          |  78 ++++++++++-
 include/hw/hyperv/hvgdk_mini.h |   2 +
 include/hw/hyperv/hvhdk.h      | 195 +++++++++++++++++++++++++++
 include/system/mshv.h          |   3 +
 include/system/mshv_int.h      |   2 +
 target/i386/cpu.c              |   8 ++
 target/i386/mshv/mshv-cpu.c    | 238 +++++++++++++++++++++++++++------
 7 files changed, 476 insertions(+), 50 deletions(-)
Signature · 1 line
2.34.1