Skip to content
Permalink
Browse files

Add VM pause support

Check if Qemu wants to pause VM. If yes, don't enter guest. This is
used in snapshot scenario that Qemu pauses VM and tell HAXM not to
enter guest after it finishes the last guest IO/MMIO instruction.

Signed-off-by: Hang Yuan <hang.yuan@intel.com>
  • Loading branch information...
hyuan3 committed Sep 24, 2019
1 parent 1958f91 commit dca031c05ce18d5423908613106dedd84f6f8e23
Showing with 8 additions and 0 deletions.
  1. +8 −0 core/vcpu.c
@@ -1711,6 +1711,14 @@ int vcpu_execute(struct vcpu_t *vcpu)
goto out;
}
}

// Check if Qemu pauses VM
if (htun->_exit_reason == HAX_EXIT_PAUSED) {
htun->_exit_status = HAX_EXIT_PAUSED;
hax_log(HAX_LOGD, "vcpu paused\n");
goto out;
}

err = cpu_vmx_execute(vcpu, htun);
vcpu_is_panic(vcpu);
out:

0 comments on commit dca031c

Please sign in to comment.
You can’t perform that action at this time.