Skip to content
This repository was archived by the owner on Jan 28, 2023. It is now read-only.

Commit 633e744

Browse files
authored
Merge pull request #239 from hyuan3/work
Add VM pause support
2 parents 1958f91 + dca031c commit 633e744

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/vcpu.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,14 @@ int vcpu_execute(struct vcpu_t *vcpu)
17111711
goto out;
17121712
}
17131713
}
1714+
1715+
// Check if Qemu pauses VM
1716+
if (htun->_exit_reason == HAX_EXIT_PAUSED) {
1717+
htun->_exit_status = HAX_EXIT_PAUSED;
1718+
hax_log(HAX_LOGD, "vcpu paused\n");
1719+
goto out;
1720+
}
1721+
17141722
err = cpu_vmx_execute(vcpu, htun);
17151723
vcpu_is_panic(vcpu);
17161724
out:

0 commit comments

Comments
 (0)