Hello,
I think that'll be it for QEMU 11.0. This one contains some additional set of patches on top of the v1 of "whpx: i386: even more changes".
This is to be applied on top of https://patchew.org/QEMU/20260223233950.96076-1-mohamed@unpredictable.fr/
followed by https://patchew.org/QEMU/20260226181930.53170-1-mohamed@unpredictable.fr/
I think the missing bits now for WHPX on x86 are mainly:
- incomplete and/or sometimes erroneous emulation in target/i386/emulate - it's nowhere near passing the kvm-unit-tests
emulator test but hopefully will be good enough for this release. HVF relied on it for a long time after all :)
- and save/restore is the other big one. This one is missing from the Arm backend too. I won't have that ready in time
for the 11.0 window closing unfortunately. On the x86 side, I'm tempted to wait until it's done for MSHV and then pick
up the pieces from there.
And on that note, the layout returned by WHvGetVirtualProcessorState(WHvVirtualProcessorStateTypeInterruptControllerState2)
is this:
typedef struct _HV_X64_INTERRUPT_CONTROLLER_STATE
{
UINT32 ApicId;
UINT32 ApicVersion;
UINT32 ApicLdr;
UINT32 ApicDfr;
UINT32 ApicSpurious;
UINT32 ApicIsr[8];
UINT32 ApicTmr[8];
UINT32 ApicIrr[8];
UINT32 ApicEsr;
UINT32 ApicIcrHigh;
UINT32 ApicIcrLow;
UINT32 ApicLvtTimer;
UINT32 ApicLvtThermal;
UINT32 ApicLvtPerfmon;
UINT32 ApicLvtLint0;
UINT32 ApicLvtLint1;
UINT32 ApicLvtError;
UINT32 ApicLvtCmci;
UINT32 ApicErrorStatus;
UINT32 ApicInitialCount;
UINT32 ApicCounterValue;
UINT32 ApicDivideConfiguration;
UINT32 ApicRemoteRead;
} HV_X64_INTERRUPT_CONTROLLER_STATE, *PHV_X64_INTERRUPT_CONTROLLER_STATE;
which matches the hv_local_interrupt_controller_state structure in the hvgdk_mini.h present for MSHV.
Side note: probably want to add a KVM capability to skip the instruction emulator - and whatever plumbing might be needed
to pass all the instruction fault info given by the hardware. And fallback execution too, which would allow stabilising
the set of instructions supported by the in-KVM emulator going forward once target/x86/emulate is more complete.
Happy hacking :)
This series is pretty small:
- the first patch is a fixup for "whpx: x86: kick out of HLT manually when using the kernel-irqchip"
It can be squashed with it and fixes the "sti; hlt" KVM unit test case.
- enable all supported host features
This enables the nested virt capability too when marked as supported (although without nested virt enlightenments).
- enable synthetic processor features
QEMU assumes that those are a property of the CPU, but Hyper-V needs that info at partition init time, so just
enable them unconditionally for now.
- warn on unsupported MSR accesses
This applies on top of the "whpx: x86 updates (2026-02)" and "whpx: i386: interrupt-related updates" series.
- target/i386/emulate: more 64-bit register handling
- whpx: i386: enable PMU
- whpx: i386: expose HV_X64_MSR_APIC_FREQUENCY for kernel-irqchip=off
Instead of having it be handled as zeroing...
- target/i386: emulate: fix scas
Based-on: <20260223233950.96076-1-mohamed@unpredictable.fr>
Mohamed Mediouni (8):
whpx: i386: move whpx_vcpu_kick_out_of_hlt() invocation to interrupt
raise time
whpx: i386: enable all supported host features
whpx: i386: enable synthetic processor features
whpx: i386: warn on unsupported MSR access instead of failing silently
target/i386: emulate: more 64-bit register handling
whpx: i386: enable PMU
whpx: i386: expose HV_X64_MSR_APIC_FREQUENCY when kernel-irqchip=off
target/i386: emulate: fix scas
target/i386/emulate/x86_emu.c | 19 ++++
target/i386/emulate/x86_flags.c | 47 +++++++++
target/i386/emulate/x86_flags.h | 20 ++++
target/i386/whpx/whpx-all.c | 162 ++++++++++++++++++++++++++------
4 files changed, 220 insertions(+), 28 deletions(-)
--
2.50.1 (Apple Git-155)