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.


moved exception tracking out of the interrupt state and into a seperate data structure
[palacios.git] / palacios / include / palacios / vmm_excp.h
1 /* 
2  * This file is part of the Palacios Virtual Machine Monitor developed
3  * by the V3VEE Project with funding from the United States National 
4  * Science Foundation and the Department of Energy.  
5  *
6  * The V3VEE Project is a joint project between Northwestern University
7  * and the University of New Mexico.  You can find out more at 
8  * http://www.v3vee.org
9  *
10  * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> 
11  * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org> 
12  * All rights reserved.
13  *
14  * Author: Jack Lange <jarusl@cs.northwestern.edu>
15  *
16  * This is free software.  You are permitted to use,
17  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
18  */
19
20 #ifndef __VMM_EXCP_H__
21 #define __VMM_EXCP_H__
22
23 #ifdef __V3VEE__
24
25
26 #include <palacios/vmm_types.h>
27
28 #define DE_EXCEPTION          0x00  
29 #define DB_EXCEPTION          0x01
30 #define NMI_EXCEPTION         0x02
31 #define BP_EXCEPTION          0x03
32 #define OF_EXCEPTION          0x04
33 #define BR_EXCEPTION          0x05
34 #define UD_EXCEPTION          0x06
35 #define NM_EXCEPTION          0x07
36 #define DF_EXCEPTION          0x08
37 #define TS_EXCEPTION          0x0a
38 #define NP_EXCEPTION          0x0b
39 #define SS_EXCEPTION          0x0c
40 #define GPF_EXCEPTION         0x0d
41 #define PF_EXCEPTION          0x0e
42 #define MF_EXCEPTION          0x10
43 #define AC_EXCEPTION          0x11
44 #define MC_EXCEPTION          0x12
45 #define XF_EXCEPTION          0x13
46 #define SX_EXCEPTION          0x1e
47
48
49 struct guest_info;
50
51 struct v3_excp_state {
52
53     /* We need to rework the exception state, to handle stacking */
54     uint_t excp_pending;
55     uint_t excp_num;
56     uint_t excp_error_code_valid : 1;
57     uint_t excp_error_code;
58     
59 };
60
61
62 void v3_init_exception_state(struct guest_info * info);
63
64
65 int v3_raise_exception(struct guest_info * info, uint_t excp);
66 int v3_raise_exception_with_error(struct guest_info * info, uint_t excp, uint_t error_code);
67
68 int v3_excp_pending(struct guest_info * info);
69 int v3_get_excp_number(struct guest_info * info);
70 int v3_injecting_excp(struct guest_info * info, uint_t excp);
71
72 #endif 
73
74 #endif