X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm.c;h=be9b074ed8cc057685c22cf0aca656f391231173;hb=d19b2db7746aafcc6cce5374a4537da454919827;hp=aeed691b9c1cea440241989a801b747317d4b7f7;hpb=48aeb8816a1633ab97dd145289d5d0acd75387bb;p=palacios.git diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index aeed691..be9b074 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -441,8 +441,8 @@ int v3_svm_enter(struct guest_info * info) { guest_state->rip = info->rip; guest_state->rsp = info->vm_regs.rsp; -#ifdef CONFIG_SYMBIOTIC - if (info->vm_info->sym_state.symcalls[info->cpu_id].sym_call_active == 0) { +#ifdef CONFIG_SYMCALL + if (info->sym_core_state.symcall_state.sym_call_active == 0) { update_irq_entry_state(info); } #else @@ -458,8 +458,8 @@ int v3_svm_enter(struct guest_info * info) { (void *)(addr_t)info->rip); */ -#ifdef CONFIG_SYMBIOTIC - if (info->vm_info->sym_state.symcalls[info->cpu_id].sym_call_active == 1) { +#ifdef CONFIG_SYMCALL + if (info->sym_core_state.symcall_state.sym_call_active == 1) { if (guest_ctrl->guest_ctrl.V_IRQ == 1) { V3_Print("!!! Injecting Interrupt during Sym call !!!\n"); } @@ -467,8 +467,10 @@ int v3_svm_enter(struct guest_info * info) { #endif + rdtscll(tmp_tsc); + v3_update_time(info, (tmp_tsc - info->time_state.cached_host_tsc)); 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_Print("Calling v3_svm_launch\n"); @@ -479,13 +481,14 @@ int v3_svm_enter(struct guest_info * info) { v3_last_exit = (uint32_t)(guest_ctrl->exit_code); - rdtscll(tmp_tsc); + //rdtscll(tmp_tsc); + // v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc); //PrintDebug("SVM Returned\n"); info->num_exits++; - v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc); + // Save Guest state from VMCB @@ -517,8 +520,8 @@ int v3_svm_enter(struct guest_info * info) { exit_info2 = guest_ctrl->exit_info2; -#ifdef CONFIG_SYMBIOTIC - if (info->vm_info->sym_state.symcalls[info->cpu_id].sym_call_active == 0) { +#ifdef CONFIG_SYMCALL + if (info->sym_core_state.symcall_state.sym_call_active == 0) { update_irq_exit_state(info); } #else