diff options
author | Robert Mustacchi <rm@joyent.com> | 2011-06-03 11:22:04 -0700 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2011-06-03 11:22:04 -0700 |
commit | c2961b13f6ec3e0e0b41ceac918305c08c31784a (patch) | |
tree | 39495dd1186676416784baf3239d1085414b36e9 /kvm_timer.h | |
parent | 1d0aace8845e2ca28d79cfb97d6e104005c8abe6 (diff) | |
download | illumos-kvm-c2961b13f6ec3e0e0b41ceac918305c08c31784a.tar.gz |
HVM-280 timer should be defined in kvm_timer.h
Diffstat (limited to 'kvm_timer.h')
-rw-r--r-- | kvm_timer.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/kvm_timer.h b/kvm_timer.h new file mode 100644 index 0000000..1e535df --- /dev/null +++ b/kvm_timer.h @@ -0,0 +1,33 @@ +/* + * Ported from Linux by Joyent. + * Copyright 2011 Joyent, Inc. + */ + +#ifndef __KVM_TIMER_H__ +#define __KVM_TIMER_H__ + +#include <sys/types.h> +#include <sys/cyclic.h> + +typedef struct kvm_timer { + cyclic_id_t kvm_cyclic_id; + cyc_handler_t kvm_cyc_handler; + cyc_time_t kvm_cyc_when; + int active; + int intervals; + hrtime_t start; + int64_t period; /* unit: ns */ + int pending; /* accumulated triggered timers */ + int reinject; + struct kvm_timer_ops *t_ops; + struct kvm *kvm; + struct kvm_vcpu *vcpu; +} kvm_timer_t; + +typedef struct kvm_timer_ops { + int (*is_periodic)(struct kvm_timer *); +} kvm_timer_ops_t; + +extern void kvm_timer_fire(void *); + +#endif |