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.


VM configuration attempts to roll back on failure
[palacios.git] / palacios / include / gears / privilege.h
1 #ifndef __PRIVILEGE_H__
2 #define __PRIVILEGE_H__
3
4
5 struct v3_privileges {
6
7     struct list_head priv_list;
8     struct hashtable * priv_table;
9
10 };
11
12 struct v3_priv {
13     const char * name;
14     
15
16     int (*init)   (struct guest_info * core, void ** private_data);
17     int (*lower)  (struct guest_info * core, void * private_data);
18     int (*raise)  (struct guest_info * core, void * private_data);
19     int (*deinit) (struct guest_info * core, void * private_data);
20
21     void * private_data;
22
23     struct list_head priv_node;
24     
25 };
26
27 struct v3_priv * v3_lookup_priv (struct v3_vm_info * vm, const char * name);
28
29 int v3_core_raise_all_privs (struct guest_info * core);
30 int v3_core_lower_all_privs (struct guest_info * core);
31
32 int v3_bind_privilege (struct guest_info * core,
33                        const char * priv_name,
34                        int (*init)   (struct guest_info * core, void ** private_data),
35                        int (*lower)  (struct guest_info * core, void * private_data),
36                        int (*raise)  (struct guest_info * core, void * private_data),
37                        int (*deinit) (struct guest_info * core, void * private_data),
38                        void * priv_data);
39
40                            
41 /*
42
43 #define register_privilege(priv)                         \
44     static struct v3_priv * _v3_priv                     \
45     __attribute__((used))                                \
46     __attribute__((unused, __section__("_v3_privileges"),\
47                     aligned(sizeof(addr_t))))            \
48     = priv;
49
50 */
51
52 #endif