X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_time.h;h=74c7584318bc8b1c202161bd72afa61983a41e27;hb=58ea47f1e53d66fae94afb18a314bdfd8862948e;hp=43643589888a7699d278aab545d374c3ed87c6f1;hpb=cd3edffa0e451af761b9dcee021ca06ebb301345;p=palacios.git diff --git a/palacios/include/palacios/vmm_time.h b/palacios/include/palacios/vmm_time.h index 4364358..74c7584 100644 --- a/palacios/include/palacios/vmm_time.h +++ b/palacios/include/palacios/vmm_time.h @@ -48,9 +48,6 @@ struct vm_time { struct list_head timers; }; - - - struct vm_timer_ops { void (*update_timer)(struct guest_info * info, ullong_t cpu_cycles, ullong_t cpu_freq, void * priv_data); void (*advance_timer)(struct guest_info * info, void * private_data); @@ -63,19 +60,17 @@ struct vm_timer { struct list_head timer_link; }; +// Basic functions for handling passage of time in palacios +void v3_init_time(struct guest_info * info); +int v3_start_time(struct guest_info * info); +int v3_adjust_time(struct guest_info * info); - - +// Basic functions for attaching timers to the passage of time int v3_add_timer(struct guest_info * info, struct vm_timer_ops * ops, void * private_data); int v3_remove_timer(struct guest_info * info, struct vm_timer * timer); void v3_update_timers(struct guest_info * info); - -void v3_init_time(struct guest_info * info); -int v3_start_time(struct guest_info * info); -int v3_adjust_time(struct guest_info * info); - -// Returns host time +// Functions to return the different notions of time in Palacios. static inline uint64_t v3_get_host_time(struct vm_time *t) { uint64_t tmp; rdtscll(tmp); @@ -97,13 +92,17 @@ static inline sint64_t v3_tsc_host_offset(struct vm_time *time_state) { return time_state->guest_host_offset + time_state->tsc_guest_offset; } - +// Functions for handling exits on the TSC when fully virtualizing +// the timestamp counter. #define TSC_MSR 0x10 #define TSC_AUX_MSR 0xC0000103 int v3_handle_rdtscp(struct guest_info *info); int v3_handle_rdtsc(struct guest_info *info); + + + #endif // !__V3VEE__ #endif