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.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2012, Kyle C. Hale <kh@u.northwestern.edu>
11 * Copyright (c) 2012, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Kyle C. Hale <kh@u.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
20 #ifndef __GUARD_MODS_H__
21 #define __GUARD_MODS_H__
26 #define HCALL_INSTR_LEN 3
27 #define MAX_BORDER_NESTING 128
35 /* these need to be updated when
36 * load address is received */
37 struct v3_entry_point {
40 uint8_t is_ret; /* indicates that this is a return point */
43 struct list_head er_node;
54 addr_t load_addr; /* this is a GVA */
56 struct v3_entry_point * entry_points;
57 enum v3_mod_state state;
58 struct list_head priv_list; /* list of privileges associated with this GM */
59 struct list_head mod_node;
60 struct list_head er_list;
64 addr_t r11_stack_kernel[MAX_BORDER_NESTING];
65 addr_t r11_stack_callback[MAX_BORDER_NESTING];
71 #define V3_GUARD_INIT_HCALL 0x6000
72 #define V3_BIN_CALL_HCALL 0x6001
73 #define V3_BOUT_RET_HCALL 0x6002
74 #define V3_BOUT_CALL_HCALL 0x6003
75 #define V3_BIN_RET_HCALL 0x6004
77 struct v3_guarded_mods {
78 struct list_head mod_list;
79 struct hashtable * mod_id_table;
80 struct hashtable * mod_name_table;
81 struct hashtable * er_hash; /* hash for quick lookups on valid entries/returns */
85 #endif /* __V3VEE__ */
88 v3_register_gm (void * vm,
93 unsigned int nentries,
100 #endif /* __GUARD_MODS_H__ */