[PATCH v2 00/10] whpx: x86 updates (2026-02)

Mohamed Mediouni posted 10 patches 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260213034556.13471-1-mohamed@unpredictable.fr
Maintainers: Pedro Barbuda <pbarbuda@microsoft.com>, Mohamed Mediouni <mohamed@unpredictable.fr>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, Zhao Liu <zhao1.liu@intel.com>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>, Wei Liu <wei.liu@kernel.org>, Magnus Kulke <magnus.kulke@linux.microsoft.com>
There is a newer version of this series
accel/whpx/whpx-accel-ops.c            |   8 +
accel/whpx/whpx-common.c               |  62 ++--
include/system/whpx-accel-ops.h        |   8 +-
include/system/whpx-all.h              |   5 +
include/system/whpx-common.h           |   6 +-
include/system/whpx-internal.h         |  16 --
meson.build                            |   3 +-
target/arm/whpx/whpx-all.c             |  33 +--
target/i386/cpu.h                      |   2 +-
target/i386/emulate/meson.build        |   2 +
target/i386/{hvf => emulate}/x86_mmu.c |  14 +-
target/i386/{hvf => emulate}/x86_mmu.h |   0
target/i386/hvf/hvf.c                  |   6 +-
target/i386/hvf/meson.build            |   1 -
target/i386/hvf/x86.c                  |   2 +-
target/i386/hvf/x86_task.c             |   2 +-
target/i386/mshv/meson.build           |   4 +
target/i386/whpx/whpx-all.c            | 373 +++++++++----------------
18 files changed, 217 insertions(+), 330 deletions(-)
rename target/i386/{hvf => emulate}/x86_mmu.c (95%)
rename target/i386/{hvf => emulate}/x86_mmu.h (100%)
[PATCH v2 00/10] whpx: x86 updates (2026-02)
Posted by Mohamed Mediouni 1 month, 3 weeks ago
x86_64 WHPX updates:

- move HVF x86_mmu code to common code
- fixing debug support, which was broken since around: "gdbstub: move guest debug support check to ops"
a48e7d9e52f8fe8b47f4c74f3e99d9d677b87fe5
- switch over from winhvemulation to common x86 VM exit emulation code
- remove some log lines
- Remove WHPX CPUID traps as they're currently quite broken

Changes added since v1:
- move HVF x86_mmu code to common code
- Use x86_mmu in WHPX MMIO exits
- Remove WHPX CPUID traps as they're currently quite broken
- Optimise MMIO vmexits by not restoring the full state

Mohamed Mediouni (10):
  target/i386: emulate, hvf: move x86_mmu to common code
  whpx: re-enable guest debug support on x86
  whpx: preparatory changes before switching over from winhvemulation
  whpx: refactor whpx_destroy_vcpu to arch-specific function
  whpx: move whpx_get_reg/whpx_set_reg to generic code
  whpx: x86: switch over from winhvemulation to target/i386/emulate
  whpx: remove remaining winhvemulation support code
  whpx: x86: remove messages
  whpx: i386: remove CPUID trapping
  whpx: x86: optimise MMIO vmexit by only restoring needed registers

 accel/whpx/whpx-accel-ops.c            |   8 +
 accel/whpx/whpx-common.c               |  62 ++--
 include/system/whpx-accel-ops.h        |   8 +-
 include/system/whpx-all.h              |   5 +
 include/system/whpx-common.h           |   6 +-
 include/system/whpx-internal.h         |  16 --
 meson.build                            |   3 +-
 target/arm/whpx/whpx-all.c             |  33 +--
 target/i386/cpu.h                      |   2 +-
 target/i386/emulate/meson.build        |   2 +
 target/i386/{hvf => emulate}/x86_mmu.c |  14 +-
 target/i386/{hvf => emulate}/x86_mmu.h |   0
 target/i386/hvf/hvf.c                  |   6 +-
 target/i386/hvf/meson.build            |   1 -
 target/i386/hvf/x86.c                  |   2 +-
 target/i386/hvf/x86_task.c             |   2 +-
 target/i386/mshv/meson.build           |   4 +
 target/i386/whpx/whpx-all.c            | 373 +++++++++----------------
 18 files changed, 217 insertions(+), 330 deletions(-)
 rename target/i386/{hvf => emulate}/x86_mmu.c (95%)
 rename target/i386/{hvf => emulate}/x86_mmu.h (100%)

-- 
2.50.1 (Apple Git-155)
Re: [PATCH v2 00/10] whpx: x86 updates (2026-02)
Posted by Bernhard Beschow 1 month, 3 weeks ago

Am 13. Februar 2026 03:45:43 UTC schrieb Mohamed Mediouni <mohamed@unpredictable.fr>:
>x86_64 WHPX updates:
>
>- move HVF x86_mmu code to common code
>- fixing debug support, which was broken since around: "gdbstub: move guest debug support check to ops"
>a48e7d9e52f8fe8b47f4c74f3e99d9d677b87fe5
>- switch over from winhvemulation to common x86 VM exit emulation code
>- remove some log lines
>- Remove WHPX CPUID traps as they're currently quite broken
>
>Changes added since v1:
>- move HVF x86_mmu code to common code
>- Use x86_mmu in WHPX MMIO exits
>- Remove WHPX CPUID traps as they're currently quite broken

>- Optimise MMIO vmexits by not restoring the full state

Yes, that did the trick for me, so:

Tested-by: Bernhard Beschow shentey@gmail.com

I had to fix some compilation issues which I have submitted here: https://lore.kernel.org/qemu-devel/20260214131659.31378-1-shentey@gmail.com/ . Feel free to include in your next iteration, if any.

Best regards,
Bernhard

>
>Mohamed Mediouni (10):
>  target/i386: emulate, hvf: move x86_mmu to common code
>  whpx: re-enable guest debug support on x86
>  whpx: preparatory changes before switching over from winhvemulation
>  whpx: refactor whpx_destroy_vcpu to arch-specific function
>  whpx: move whpx_get_reg/whpx_set_reg to generic code
>  whpx: x86: switch over from winhvemulation to target/i386/emulate
>  whpx: remove remaining winhvemulation support code
>  whpx: x86: remove messages
>  whpx: i386: remove CPUID trapping
>  whpx: x86: optimise MMIO vmexit by only restoring needed registers
>
> accel/whpx/whpx-accel-ops.c            |   8 +
> accel/whpx/whpx-common.c               |  62 ++--
> include/system/whpx-accel-ops.h        |   8 +-
> include/system/whpx-all.h              |   5 +
> include/system/whpx-common.h           |   6 +-
> include/system/whpx-internal.h         |  16 --
> meson.build                            |   3 +-
> target/arm/whpx/whpx-all.c             |  33 +--
> target/i386/cpu.h                      |   2 +-
> target/i386/emulate/meson.build        |   2 +
> target/i386/{hvf => emulate}/x86_mmu.c |  14 +-
> target/i386/{hvf => emulate}/x86_mmu.h |   0
> target/i386/hvf/hvf.c                  |   6 +-
> target/i386/hvf/meson.build            |   1 -
> target/i386/hvf/x86.c                  |   2 +-
> target/i386/hvf/x86_task.c             |   2 +-
> target/i386/mshv/meson.build           |   4 +
> target/i386/whpx/whpx-all.c            | 373 +++++++++----------------
> 18 files changed, 217 insertions(+), 330 deletions(-)
> rename target/i386/{hvf => emulate}/x86_mmu.c (95%)
> rename target/i386/{hvf => emulate}/x86_mmu.h (100%)
>