2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
11 * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Jack Lange <jarusl@cs.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
25 #include <palacios/vmm_types.h>
26 #include <palacios/vmm_list.h>
31 uint32_t cpu_freq; // in kHZ
33 // Last time (in guest time) the timers were updated
36 // Cache value to help calculate the guest_tsc
39 // Offset of guest time from host time.
44 struct list_head timers;
51 void (*update_timer)(struct guest_info * info, ullong_t cpu_cycles, ullong_t cpu_freq, void * priv_data);
52 void (*advance_timer)(struct guest_info * info, void * private_data);
57 struct vm_timer_ops * ops;
59 struct list_head timer_link;
65 int v3_add_timer(struct guest_info * info, struct vm_timer_ops * ops, void * private_data);
66 int v3_remove_timer(struct guest_info * info, struct vm_timer * timer);
67 void v3_update_timers(struct guest_info * info);
70 void v3_init_time(struct guest_info * info);
71 int v3_start_time(struct guest_info * info);
72 int v3_pause_time(struct guest_info * info);
73 int v3_resume_time(struct guest_info * info);
74 uint64_t v3_get_host_time(struct guest_info * info);
75 uint64_t v3_get_guest_time(struct guest_info * info);