X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm.c;h=acb535383ed24aa19a33dfd6609a62dd9ca7096f;hp=7dcd68d4bdac36ab7eca00c357b1e9fc1b32f158;hb=0121a4503305424096e2b5c5bd3b6c3af2d813e5;hpb=5bf6d0c260240e314876a2fca8e3fd56bd6a1029 diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index 7dcd68d..acb5353 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -44,6 +44,8 @@ #include +uint32_t v3_last_exit; + // This is a global pointer to the host's VMCB static addr_t host_vmcbs[CONFIG_MAX_CPUS] = { [0 ... CONFIG_MAX_CPUS - 1] = 0}; @@ -463,10 +465,15 @@ int v3_svm_enter(struct guest_info * info) { rdtscll(info->time_state.cached_host_tsc); - // guest_ctrl->TSC_OFFSET = info->time_state.guest_tsc - info->time_state.cached_host_tsc; + guest_ctrl->TSC_OFFSET = info->time_state.guest_tsc - info->time_state.cached_host_tsc; v3_svm_launch((vmcb_t *)V3_PAddr(info->vmm_data), &(info->vm_regs), (vmcb_t *)host_vmcbs[info->cpu_id]); + + v3_last_exit = (uint32_t)(guest_ctrl->exit_code); + + // v3_print_cond("SVM Returned: Exit Code: %x\n", (uint32_t)(guest_ctrl->exit_code)); + rdtscll(tmp_tsc); //PrintDebug("SVM Returned\n"); @@ -583,13 +590,12 @@ int v3_start_svm_guest(struct guest_info *info) { break; } +/* if ((info->num_exits % 5000) == 0) { V3_Print("SVM Exit number %d\n", (uint32_t)info->num_exits); } - - +*/ - } return 0; }