vmcb_saved_state_t * guest_state = GET_VMCB_SAVE_STATE_AREA((vmcb_t*)(info->vmm_data));
addr_t exit_code = 0, exit_info1 = 0, exit_info2 = 0;
+ v3_update_timers(info);
+ v3_adjust_time(info);
+
// Conditionally yield the CPU if the timeslice has expired
v3_yield_cond(info);
}
#endif
- v3_update_timers(info);
-
- /* If this guest is frequency-lagged behind host time, wait
- * for the appropriate host time before resuming the guest. */
- v3_adjust_time(info);
-
guest_ctrl->TSC_OFFSET = v3_tsc_host_offset(&info->time_state);
//V3_Print("Calling v3_svm_launch\n");
v3_start_time(info);
while (1) {
+
+ if (info->vm_info->run_state == VM_STOPPED) {
+ info->core_run_state = CORE_STOPPED;
+ break;
+ }
+
if (v3_svm_enter(info) == -1) {
vmcb_ctrl_t * guest_ctrl = GET_VMCB_CTRL_AREA((vmcb_t*)(info->vmm_data));
addr_t host_addr;
break;
}
+
+
+ if (info->vm_info->run_state == VM_STOPPED) {
+ info->core_run_state = CORE_STOPPED;
+ break;
+ }
+
/*
if ((info->num_exits % 5000) == 0) {