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 // Total number of guest run time cycles
36 // Cache value to help calculate the guest_tsc
37 uint64_t cached_host_tsc;
39 // The number of cycles pending for notification to the timers
40 //ullong_t pending_cycles;
44 struct list_head timers;
51 void (*update_time)(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);
68 void v3_advance_time(struct guest_info * info);
70 void v3_update_time(struct guest_info * info, ullong_t cycles);
73 void v3_init_time(struct guest_info * info);