X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmx.c;h=2d75065cbc48b03381713c41e5b09033adfc9603;hb=39b4fae9c539fbd848edd786500e60aae17b84a0;hp=6ada30f2e72ecdddc6b08f1ceeb23577acbd0c47;hpb=925dd7f968e83f7b0181c0ade4bef6679361487b;p=palacios.git diff --git a/palacios/src/palacios/vmx.c b/palacios/src/palacios/vmx.c index 6ada30f..2d75065 100644 --- a/palacios/src/palacios/vmx.c +++ b/palacios/src/palacios/vmx.c @@ -650,6 +650,10 @@ int v3_vmx_enter(struct guest_info * info) { // Conditionally yield the CPU if the timeslice has expired v3_yield_cond(info); + /* If this guest is frequency-lagged behind host time, wait + * for the appropriate host time before resuming the guest. */ + v3_adjust_time(info); + // v3_print_guest_state(info); // disable global interrupts for vm state transition @@ -674,10 +678,6 @@ int v3_vmx_enter(struct guest_info * info) { 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); - tsc_offset_high = (uint32_t)((v3_tsc_host_offset(&info->time_state) >> 32) & 0xffffffff); tsc_offset_low = (uint32_t)(v3_tsc_host_offset(&info->time_state) & 0xffffffff); check_vmcs_write(VMCS_TSC_OFFSET_HIGH, tsc_offset_high);