Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


*** empty log message ***
[palacios.git] / palacios / include / palacios / vmm_intr.h
1 #ifndef __VMM_INTR_H
2 #define __VMM_INTR_H
3
4 #include <palacios/vmm_types.h>
5
6 #define DE_EXCEPTION          0x00  
7 #define DB_EXCEPTION          0x01
8 #define NMI_EXCEPTION         0x02
9 #define BP_EXCEPTION          0x03
10 #define OF_EXCEPTION          0x04
11 #define BR_EXCEPTION          0x05
12 #define UD_EXCEPTION          0x06
13 #define NM_EXCEPTION          0x07
14 #define DF_EXCEPTION          0x08
15 #define TS_EXCEPTION          0x0a
16 #define NP_EXCEPTION          0x0b
17 #define SS_EXCEPTION          0x0c
18 #define GPF_EXCEPTION         0x0d
19 #define PF_EXCEPTION          0x0e
20 #define MF_EXCEPTION          0x10
21 #define AC_EXCEPTION          0x11
22 #define MC_EXCEPTION          0x12
23 #define XF_EXCEPTION          0x13
24 #define SX_EXCEPTION          0x1e
25
26
27 typedef enum {INVALID_INTR, EXTERNAL_IRQ, NMI, EXCEPTION, SOFTWARE, VIRTUAL} intr_types_t;
28
29 struct guest_info;
30
31 struct vm_intr {
32   uint_t excp_pending;
33   uint_t excp_num;
34   uint_t excp_error_code;
35   
36   /* some way to get the [A]PIC intr */
37
38 };
39
40
41 void init_interrupt_state(struct vm_intr * state);
42
43 int raise_exception(struct guest_info * info, uint_t excp);
44
45 int intr_pending(struct vm_intr * intr);
46 uint_t get_intr_number(struct vm_intr * intr);
47 intr_types_t get_intr_type(struct vm_intr * intr);
48
49
50 #endif