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".
24 #include <palacios/vmm_types.h>
25 #include <palacios/vmm_list.h>
30 uint32_t cpu_freq; // in kHZ
32 // Total number of guest run time cycles
35 // Cache value to help calculate the guest_tsc
36 ullong_t cached_host_tsc;
38 // The number of cycles pending for notification to the timers
39 //ullong_t pending_cycles;
43 struct list_head timers;
50 void (*update_time)(ullong_t cpu_cycles, ullong_t cpu_freq, void * priv_data);
56 struct vm_timer_ops * ops;
58 struct list_head timer_link;
64 int v3_add_timer(struct guest_info * info, struct vm_timer_ops * ops, void * private_data);
65 int v3_remove_timer(struct guest_info * info, struct vm_timer * timer);
68 void v3_update_time(struct guest_info * info, ullong_t cycles);
73 void v3_init_time(struct guest_info * info);