//PrintDebugVMCB((vmcb_t*)(info->vmm_data));
info->run_state = VM_RUNNING;
-
+ rdtscll(info->yield_start_cycle);
+
+
while (1) {
ullong_t tmp_tsc;
+ // Conditionally yield the CPU if the timeslice has expired
+ v3_yield_cond(info);
/*
PrintDebug("SVM Entry to CS=%p rip=%p...\n",
// reenable global interrupts after vm exit
v3_stgi();
+
+ // Conditionally yield the CPU if the timeslice has expired
+ v3_yield_cond(info);
+
+
v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc);
num_exits++;
if ((num_exits % 5000) == 0) {
PrintDebug("SVM Exit number %d\n", num_exits);
+#ifdef CONFIG_PROFILE_VMM
if (info->enable_profiler) {
v3_print_profile(info);
}
+#endif
}
-
if (v3_handle_svm_exit(info) != 0) {
vmcb_ctrl_t * guest_ctrl = GET_VMCB_CTRL_AREA((vmcb_t*)(info->vmm_data));
addr_t host_addr;