Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


almost done with the namespace protection via -D__V3VEE__ header wrappers
[palacios.releases.git] / palacios / include / palacios / vmm_time.h
1 /* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
2 /* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
3
4 #ifndef __VMM_TIME_H
5 #define __VMM_TIME_H
6
7 #ifdef __V3VEE__
8
9 #include <palacios/vmm_types.h>
10 #include <palacios/vmm_list.h>
11
12 struct guest_info;
13
14 struct vm_time {
15   uint32_t cpu_freq; // in kHZ
16
17   // Total number of guest run time cycles
18   ullong_t guest_tsc;
19
20   // Cache value to help calculate the guest_tsc
21   ullong_t cached_host_tsc;
22
23   // The number of cycles pending for notification to the timers
24   //ullong_t pending_cycles;
25
26   // Installed Timers 
27   uint_t num_timers;
28   struct list_head timers;
29 };
30
31
32
33
34 struct vm_timer_ops {
35  void (*update_time)(ullong_t cpu_cycles, ullong_t cpu_freq, void * priv_data);
36
37 };
38
39 struct vm_timer {
40   void * private_data;
41   struct vm_timer_ops * ops;
42
43   struct list_head timer_link;
44 };
45
46
47
48
49 int v3_add_timer(struct guest_info * info, struct vm_timer_ops * ops, void * private_data);
50 int v3_remove_timer(struct guest_info * info, struct vm_timer * timer);
51
52
53 void v3_update_time(struct guest_info * info, ullong_t cycles);
54
55 #endif // !__V3VEE__
56
57
58 void v3_init_time(struct guest_info * info);
59
60
61
62 #endif