X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_time.c;h=86eaa022dc25e45569cb930ca32483eb5c125fdc;hb=29056b18227989f85d7cc6ba4cbb3165e78be3b5;hp=82a50eb35deab5eeed3f31c51b7905687d97563b;hpb=e70e95962c26832628d586e07f9cd1a2e1852d72;p=palacios.git diff --git a/palacios/src/palacios/vmm_time.c b/palacios/src/palacios/vmm_time.c index 82a50eb..86eaa02 100644 --- a/palacios/src/palacios/vmm_time.c +++ b/palacios/src/palacios/vmm_time.c @@ -22,54 +22,54 @@ void v3_init_time(struct guest_info * info) { - struct vm_time * time_state = &(info->time_state); + struct vm_time * time_state = &(info->time_state); - time_state->cpu_freq = V3_CPU_KHZ(); + time_state->cpu_freq = V3_CPU_KHZ(); - time_state->guest_tsc = 0; - time_state->cached_host_tsc = 0; - // time_state->pending_cycles = 0; + time_state->guest_tsc = 0; + time_state->cached_host_tsc = 0; + // time_state->pending_cycles = 0; - INIT_LIST_HEAD(&(time_state->timers)); - time_state->num_timers = 0; + INIT_LIST_HEAD(&(time_state->timers)); + time_state->num_timers = 0; } int v3_add_timer(struct guest_info * info, struct vm_timer_ops * ops, void * private_data) { - struct vm_timer * timer = NULL; - timer = (struct vm_timer *)V3_Malloc(sizeof(struct vm_timer)); - V3_ASSERT(timer != NULL); + struct vm_timer * timer = NULL; + timer = (struct vm_timer *)V3_Malloc(sizeof(struct vm_timer)); + V3_ASSERT(timer != NULL); - timer->ops = ops; - timer->private_data = private_data; + timer->ops = ops; + timer->private_data = private_data; - list_add(&(timer->timer_link), &(info->time_state.timers)); - info->time_state.num_timers++; + list_add(&(timer->timer_link), &(info->time_state.timers)); + info->time_state.num_timers++; - return 0; + return 0; } int v3_remove_timer(struct guest_info * info, struct vm_timer * timer) { - list_del(&(timer->timer_link)); - info->time_state.num_timers--; + list_del(&(timer->timer_link)); + info->time_state.num_timers--; - V3_Free(timer); - return 0; + V3_Free(timer); + return 0; } void v3_update_time(struct guest_info * info, ullong_t cycles) { - struct vm_timer * tmp_timer; + struct vm_timer * tmp_timer; - info->time_state.guest_tsc += cycles; + info->time_state.guest_tsc += cycles; - list_for_each_entry(tmp_timer, &(info->time_state.timers), timer_link) { - tmp_timer->ops->update_time(cycles, info->time_state.cpu_freq, tmp_timer->private_data); - } + list_for_each_entry(tmp_timer, &(info->time_state.timers), timer_link) { + tmp_timer->ops->update_time(cycles, info->time_state.cpu_freq, tmp_timer->private_data); + } - //info->time_state.pending_cycles = 0; + //info->time_state.pending_cycles = 0; }