On 8/4/25 7:23 AM, Mohamed Mediouni wrote:
Signed-off-by: Mohamed Mediouni <moha...@unpredictable.fr>
---
accel/whpx/whpx-common.c | 1 +
meson.build | 21 +-
target/arm/meson.build | 1 +
target/arm/whpx/meson.build | 3 +
target/arm/whpx/whpx-all.c | 845 ++++++++++++++++++++++++++++++++++++
5 files changed, 864 insertions(+), 7 deletions(-)
create mode 100644 target/arm/whpx/meson.build
create mode 100644 target/arm/whpx/whpx-all.c
...
+ case WHvRunVpExitReasonCanceled:
+ cpu->exception_index = EXCP_INTERRUPT;
+ ret = 1;
+ break;
+ case WHvRunVpExitReasonArm64Reset:
+ if (vcpu->exit_ctx.Arm64Reset.ResetType ==
WHvArm64ResetTypePowerOff) {
+ qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
+ } else if (vcpu->exit_ctx.Arm64Reset.ResetType ==
WHvArm64ResetTypeReboot) {
+ qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
+ } else {
+ abort();
Just a nit about style: would be better to use a switch (as this is a
propert enum), and g_assert_not_reached() for default case..
---------------
The rest of the code is pretty clear and straightforward, congrats.
For other reviewers, most of the constants and functions used can be
found here:
https://github.com/MicrosoftDocs/Virtualization-Documentation/blob/main/virtualization/api/hypervisor-platform/headers/WinHvPlatformDefs.h
Reviewed-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>
Thanks,
Pierrick