Skip to content

Conversation

tjones60
Copy link
Contributor

@tjones60 tjones60 commented Aug 25, 2025

Add support for guest resets for the Hyper-V petri backend. Refactors some of the framebuffer code to make this possible. Enables Hyper-V reboot tests that are now possible due to this change. Also includes some other minor Petri refactoring to move more logic into backend-agnostic code.

@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 22:41
@tjones60 tjones60 requested a review from a team as a code owner August 25, 2025 22:41
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for guest resets in the Hyper-V petri backend, enabling Hyper-V to handle VM reset operations automatically. The implementation refactors framebuffer code to be compatible with the reset feature and enables reboot tests that were previously only possible with OpenVMM.

  • Refactors VM halt handling to distinguish between different halt reasons (PowerOff, Reset, TripleFault, etc.)
  • Adds automatic reset handling for VMs that require initial reboots
  • Enables Hyper-V reboot tests across multiple test configurations

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vmm_tests/vmm_tests/tests/tests/*.rs Updates test assertions to use new PetriHaltReason enum instead of HaltReason
vmm_tests/petri_artifacts_vmm_test/src/lib.rs Adds guest quirks for VMs requiring initial reboots
petri/src/vm/mod.rs Introduces PetriHaltReason enum and refactors halt handling with reset support
petri/src/vm/openvmm/*.rs Updates OpenVMM backend to support new halt reason handling
petri/src/vm/hyperv/*.rs Implements Hyper-V reset support with halt event monitoring and framebuffer refactoring
petri/petri_artifacts_common/src/lib.rs Adds initial_reboot_required quirk to guest configuration

@tjones60 tjones60 force-pushed the hyperv_petri_restart_3 branch from 470b2e7 to c1f38cc Compare August 25, 2025 22:44
@tjones60 tjones60 force-pushed the hyperv_petri_restart_3 branch from c1f38cc to ac95724 Compare August 25, 2025 23:04
@tjones60 tjones60 requested a review from a team as a code owner August 25, 2025 23:04
Copy link

Copy link

Copy link

Copy link

@tjones60 tjones60 merged commit aab6cfe into microsoft:main Aug 28, 2025
49 of 51 checks passed
tjones60 added a commit to tjones60/openvmm that referenced this pull request Sep 2, 2025
Add support for guest resets for the Hyper-V petri backend. Refactors
some of the framebuffer code to make this possible. Enables Hyper-V
reboot tests that are now possible due to this change. Also includes
some other minor Petri refactoring to move more logic into
backend-agnostic code.
@tjones60 tjones60 added the backport_2505 Change should be backported to the release/2505 branch label Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport_2505 Change should be backported to the release/2505 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants