Skip to content

whpx: i386: Windows 10 and performance fixes

Mohamed Mediouni qemu-devel 3 versions – Applied

Status from this message: Queued, thanks. Perhaps you can make target/i386/emulate remember

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest12 patches 2 repliesApplied
  2. v213 patches 0 repliesSuperseded
  3. v112 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Remove ad-hoc workaround in segment fetching and replace it by something more proper.
The affected commits are "whpx: i386: fetch segments on-demand". The old workaround separate commit is no longer present (or needed)

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/12whpx: i386: workaround for Windows 10 supporttarget/i386/whpx/whpx-all.c+28 -150 replies
2/12whpx: i386: enable exceptions VM exit only when neededtarget/i386/whpx/whpx-all.c+20 -30 replies
3/12whpx: i386: skip TSC read for MMIO exitstarget/i386/whpx/whpx-all.c+1 -10 replies
4/12whpx: i386: skip XCRs read for MMIO exitstarget/i386/whpx/whpx-all.c+3 -10 replies
5/12whpx: i386: don't restore segment registers after MMIO handlingtarget/i386/whpx/whpx-all.c+12 -100 replies
6/12target/i386: emulate: add new callbackstarget/i386/emulate/x86_emu.h target/i386/emulate/x86_helpers.c target/i386/emulate/x86_mmu.c+12 -00 replies
7/12whpx: i386: add implementation of new x86_emul_opstarget/i386/whpx/whpx-all.c+23 -10 replies
8/12target/i386: emulate: indirect access to CRstarget/i386/emulate/x86_emu.h target/i386/emulate/x86_helpers.c target/i386/emulate/x86_mmu.c +1 more+32 -170 replies
9/12whpx: i386: indirect access to CRstarget/i386/whpx/whpx-all.c+31 -10 replies
10/12target/i386: emulate: segmentation reworktarget/i386/emulate/x86_helpers.c+19 -310 replies
11/12whpx: i386: fetch segments on-demandtarget/i386/whpx/whpx-all.c+60 -110 replies
12/12whpx: i386: fast runtime state readstarget/i386/whpx/whpx-all.c+70 -70 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 00/12] whpx: i386: Windows 10 and performance fixes

On Windows 10, the paravirtualisation enlightenments aren't available. And neither is performance monitoring. Using the former as a gate to operate in a reduced-functionality mode on Windows 10.

And on the performance side, some state is really expensive to fetch or write with Hyper-V so switch some less-essential state to on demand.

The effect of this is magnified on Windows 10 because Hyper-V enlightenments are not available there.

Side note: On Windows 11, use WHP with kernel-irqchip=on. On Windows 10, looks like issues there are still lingering, with issues #289 and #346 still problematic.

v1 -> v2:
- fix x86 HVF compatibility
- small nits
- added workaround for an issue that showed up during 32-bit Linux boot on AMD

v2 -> v3:
- Remove ad-hoc workaround in segment fetching and replace it by something more proper.
The affected commits are "whpx: i386: fetch segments on-demand". The old workaround separate commit is no longer present (or needed)

Issue number: https://gitlab.com/qemu-project/qemu/-/work_items/3349

Mohamed Mediouni (12):
whpx: i386: workaround for Windows 10 support
whpx: i386: enable exceptions VM exit only when needed
whpx: i386: skip TSC read for MMIO exits
whpx: i386: skip XCRs read for MMIO exits
whpx: i386: don't restore segment registers after MMIO handling target/i386: emulate: add new callbacks
whpx: i386: add implementation of new x86_emul_ops target/i386: emulate: indirect access to CRs
whpx: i386: indirect access to CRs
target/i386: emulate: segmentation rework
whpx: i386: fetch segments on-demand
whpx: i386: fast runtime state reads

 target/i386/emulate/x86_emu.h     |   6 +
 target/i386/emulate/x86_helpers.c |  83 +++++----
 target/i386/emulate/x86_mmu.c     |  11 +-
 target/i386/hvf/x86.c             |  11 ++
 target/i386/whpx/whpx-all.c       | 280 +++++++++++++++++++++++++-----
 5 files changed, 302 insertions(+), 89 deletions(-)
Signature · 1 line
2.50.1 (Apple Git-155)