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.


Fixed the FS/GS save/restore problem
[palacios.git] / palacios / include / palacios / vmm_time.h
1 #ifndef __VMM_TIME_H
2 #define __VMM_TIME_H
3
4
5 #include <palacios/vmm_types.h>
6 #include <palacios/vmm_list.h>
7
8 struct guest_info;
9
10 struct vm_time {
11   uint32_t cpu_freq; // in kHZ
12
13   // Total number of guest run time cycles
14   ullong_t guest_tsc;
15
16   // Cache value to help calculate the guest_tsc
17   ullong_t cached_host_tsc;
18
19   // The number of cycles pending for notification to the timers
20   //ullong_t pending_cycles;
21
22   // Installed Timers 
23   uint_t num_timers;
24   struct list_head timers;
25 };
26
27
28 struct vm_timer_ops {
29  void (*update_time)(ullong_t cpu_cycles, ullong_t cpu_freq, void * priv_data);
30
31 };
32
33 struct vm_timer {
34   void * private_data;
35   struct vm_timer_ops * ops;
36
37   struct list_head timer_link;
38 };
39
40
41 void v3_init_time(struct vm_time * time_state);
42
43
44
45
46 int v3_add_timer(struct guest_info * info, struct vm_timer_ops * ops, void * private_data);
47 int v3_remove_timer(struct guest_info * info, struct vm_timer * timer);
48
49
50 void v3_update_time(struct guest_info * info, ullong_t cycles);
51
52 #endif