1 #ifndef __PRIVILEGE_H__
2 #define __PRIVILEGE_H__
7 struct list_head priv_list;
8 struct hashtable * priv_table;
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);
23 struct list_head priv_node;
27 struct v3_priv * v3_lookup_priv (struct v3_vm_info * vm, const char * name);
29 int v3_core_raise_all_privs (struct guest_info * core);
30 int v3_core_lower_all_privs (struct guest_info * core);
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),
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)))) \