xen-vtx-unstable

view xen/include/asm-x86/vmx_virpit.h @ 6774:4d899a738d59

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