Skip to content

Commit 70e7fd2

Browse files
committed
Try not take timer
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
1 parent 0c5d82c commit 70e7fd2

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

  • src/hyperlight_host/src/hypervisor/virtual_machine

src/hyperlight_host/src/hypervisor/virtual_machine/whp.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -719,13 +719,11 @@ impl VirtualMachine for WhpVm {
719719
}
720720

721721
fn reset_partition(&mut self) -> std::result::Result<(), RegisterError> {
722-
// Stop any active timer before reset — WHvResetPartition wipes the
723-
// LAPIC, so stale WHvRequestInterrupt calls from the timer thread
724-
// would hit an unconfigured interrupt controller.
725-
#[cfg(feature = "hw-interrupts")]
726-
if let Some(mut t) = self.timer.take() {
727-
t.stop();
728-
}
722+
// Note: we intentionally do NOT stop the timer here. The timer
723+
// thread's inject closure uses `let _ =` so any WHvRequestInterrupt
724+
// that lands during the brief LAPIC-unconfigured window is silently
725+
// ignored. Destroying the timer would be permanent — the guest
726+
// configured it during init and won't reconfigure after restore.
729727

730728
unsafe {
731729
WHvResetPartition(self.partition)

0 commit comments

Comments
 (0)