[PATCH 0/7] whpx: x86 updates (2026-02)

Mohamed Mediouni posted 7 patches 1 month, 4 weeks ago
Failed in applying to current master (apply log)
There is a newer version of this series
accel/whpx/whpx-accel-ops.c     |   8 +
accel/whpx/whpx-common.c        |  62 ++++---
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 |   1 +
target/i386/mshv/meson.build    |   4 +
target/i386/whpx/whpx-all.c     | 308 ++++++++++++++++++++------------
11 files changed, 252 insertions(+), 196 deletions(-)
[PATCH 0/7] whpx: x86 updates (2026-02)
Posted by Mohamed Mediouni 1 month, 4 weeks ago
x86_64 WHPX updates:

- 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

Mohamed Mediouni (7):
  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

 accel/whpx/whpx-accel-ops.c     |   8 +
 accel/whpx/whpx-common.c        |  62 ++++---
 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 |   1 +
 target/i386/mshv/meson.build    |   4 +
 target/i386/whpx/whpx-all.c     | 308 ++++++++++++++++++++------------
 11 files changed, 252 insertions(+), 196 deletions(-)

-- 
2.50.1 (Apple Git-155)
Re: [PATCH 0/7] whpx: x86 updates (2026-02)
Posted by Bernhard Beschow 1 month, 4 weeks ago

Am 11. Februar 2026 05:53:45 UTC schrieb Mohamed Mediouni <mohamed@unpredictable.fr>:
>x86_64 WHPX updates:
>
>- 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

Hi Mohamed,

I really like this series because it replaces proprietary code with already existing open-source one. So I gave it a spin. Unfortunately I have to report that I noticed some problematic performance regressions when booting x86_64 Linux with Grub: Before this series it takes ~20 seconds until the first Linux output is visible, and with this series applied it takes a bit more than 2 minutes, i.e. about 6 times as slow. Also, when using a GUI, mouse button presses easily take a second until reaction which is rather unusable. So I think this series needs more work and I'm happy to help with testing.

Best regards,
Bernhard

>
>Mohamed Mediouni (7):
>  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
>
> accel/whpx/whpx-accel-ops.c     |   8 +
> accel/whpx/whpx-common.c        |  62 ++++---
> 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 |   1 +
> target/i386/mshv/meson.build    |   4 +
> target/i386/whpx/whpx-all.c     | 308 ++++++++++++++++++++------------
> 11 files changed, 252 insertions(+), 196 deletions(-)
>
Re: [PATCH 0/7] whpx: x86 updates (2026-02)
Posted by Mohamed Mediouni 1 month, 3 weeks ago

> On 12. Feb 2026, at 23:52, Bernhard Beschow <shentey@gmail.com> wrote:
> 
> I really like this series because it replaces proprietary code with already existing open-source one. So I gave it a spin. Unfortunately I have to report that I noticed some problematic performance regressions when booting x86_64 Linux with Grub: Before this series it takes ~20 seconds until the first Linux output is visible, and with this series applied it takes a bit more than 2 minutes, i.e. about 6 times as slow. Also, when using a GUI, mouse button presses easily take a second until reaction which is rather unusable. So I think this series needs more work and I'm happy to help with testing.

Hello,

Should be a bit faster now :-) (just sent over the v2)

Turns out that MMU lookups through the Hyper-V API were slower than I anticipated,
so moved the HVF x86 MMU translation bits over to common code and switched to using
those.

Thank you,
-Mohamed
Re: [PATCH 0/7] whpx: x86 updates (2026-02)
Posted by Paolo Bonzini 1 month, 4 weeks ago
Queued, thanks.

Paolo
Re: [PATCH 0/7] whpx: x86 updates (2026-02)
Posted by Mohamed Mediouni 1 month, 4 weeks ago
Oops, forgot to note:

This is to apply on top of target-arm.next (which includes the arm64 WHPX support).
It won’t apply on top of current master.

> On 11. Feb 2026, at 06:53, Mohamed Mediouni <mohamed@unpredictable.fr> wrote:
> 
> x86_64 WHPX updates:
> 
> - 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
> 
> Mohamed Mediouni (7):
>  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
> 
> accel/whpx/whpx-accel-ops.c     |   8 +
> accel/whpx/whpx-common.c        |  62 ++++---
> 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 |   1 +
> target/i386/mshv/meson.build    |   4 +
> target/i386/whpx/whpx-all.c     | 308 ++++++++++++++++++++------------
> 11 files changed, 252 insertions(+), 196 deletions(-)
> 
> -- 
> 2.50.1 (Apple Git-155)
>