xen-vtx-unstable

annotate 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
rev   line source
iap10@3749 1 #ifndef _VMX_VIRPIT_H
iap10@3749 2 #define _VMX_VIRPIT_H
kaf24@6730 3
iap10@3749 4 #include <xen/config.h>
iap10@3749 5 #include <xen/init.h>
iap10@3749 6 #include <xen/lib.h>
iap10@3749 7 #include <xen/time.h>
iap10@3749 8 #include <xen/errno.h>
iap10@3749 9 #include <xen/ac_timer.h>
iap10@3749 10 #include <asm/vmx_vmcs.h>
iap10@3749 11
iap10@3749 12 #define PIT_FREQ 1193181
iap10@3749 13
iap10@3749 14 #define LSByte 0
iap10@3749 15 #define MSByte 1
iap10@3749 16 #define LSByte_multiple 2
iap10@3749 17 #define MSByte_multiple 3
iap10@3749 18
iap10@3749 19 struct vmx_virpit_t {
iap10@3749 20 /* for simulation of counter 0 in mode 2*/
kaf24@6730 21 int vector; /* the pit irq vector */
kaf24@6730 22 unsigned int period; /* the frequency. e.g. 10ms*/
kaf24@5842 23 s_time_t scheduled; /* scheduled timer interrupt */
kaf24@6730 24 unsigned int channel; /* the pit channel, counter 0~2 */
arun@5615 25 u64 *intr_bitmap;
kaf24@6730 26 unsigned int pending_intr_nr; /* the couner for pending timer interrupts */
kaf24@6730 27 unsigned long long inject_point; /* the time inject virt intr */
kaf24@6730 28 struct ac_timer pit_timer; /* periodic timer for mode 2*/
arun@3920 29 int first_injected; /* flag to prevent shadow window */
iap10@3749 30
iap10@3749 31 /* virtual PIT state for handle related I/O */
iap10@3749 32 int read_state;
iap10@3749 33 int count_LSB_latched;
iap10@3749 34 int count_MSB_latched;
iap10@3749 35
kaf24@6730 36 unsigned int count; /* the 16 bit channel count */
kaf24@6730 37 unsigned int init_val; /* the init value for the counter */
iap10@3749 38
iap10@3749 39 } ;
iap10@3749 40
iap10@3749 41 /* to hook the ioreq packet to get the PIT initializaiton info */
kaf24@5289 42 extern void vmx_hooks_assist(struct vcpu *d);
iap10@3749 43
iap10@3749 44 #endif /* _VMX_VIRPIT_H_ */