xen-vtx-unstable

view xen/include/asm-x86/vmx_virpit.h @ 6568:dd668f7527cb

merge?
author cl349@firebug.cl.cam.ac.uk
date Thu Sep 01 10:16:14 2005 +0000 (2005-09-01)
parents 38312fe7ec38 f0dc15fd3c1b
children 3feb7fa331ed 4d899a738d59 e7c7196fa329
line source
1 #ifndef _VMX_VIRPIT_H
2 #define _VMX_VIRPIT_H
3 #include <xen/config.h>
4 #include <xen/init.h>
5 #include <xen/lib.h>
6 #include <xen/time.h>
7 #include <xen/errno.h>
8 #include <xen/ac_timer.h>
9 #include <asm/vmx_vmcs.h>
11 #define PIT_FREQ 1193181
13 #define LSByte 0
14 #define MSByte 1
15 #define LSByte_multiple 2
16 #define MSByte_multiple 3
18 struct vmx_virpit_t {
19 /* for simulation of counter 0 in mode 2*/
20 int vector; /* the pit irq vector */
21 unsigned int period; /* the frequency. e.g. 10ms*/
22 s_time_t scheduled; /* scheduled timer interrupt */
23 unsigned int channel; /* the pit channel, counter 0~2 */
24 u64 *intr_bitmap;
25 unsigned int pending_intr_nr; /* the couner for pending timer interrupts */
26 unsigned long long inject_point; /* the time inject virt intr */
27 struct ac_timer pit_timer; /* periodic timer for mode 2*/
28 int first_injected; /* flag to prevent shadow window */
30 /* virtual PIT state for handle related I/O */
31 int read_state;
32 int count_LSB_latched;
33 int count_MSB_latched;
35 unsigned int count; /* the 16 bit channel count */
36 unsigned int init_val; /* the init value for the counter */
38 } ;
40 /* to hook the ioreq packet to get the PIT initializaiton info */
41 extern void vmx_hooks_assist(struct vcpu *d);
43 #endif /* _VMX_VIRPIT_H_ */