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) 2008, Jack Lange <jarusl@cs.northwestern.edu>
11 * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Jack Lange <jarusl@cs.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 __VMM_SYM_MOD_H__
21 #define __VMM_SYM_MOD_H__
25 #include <palacios/vmm_config.h>
26 #include <palacios/vmm_hashtable.h>
33 struct v3_sym_capsule {
42 #define V3_SYMMOD_INV (0x00)
43 #define V3_SYMMOD_LNX (0x01)
44 #define V3_SYMMOD_MOD (0x02)
45 #define V3_SYMMOD_SEC (0x03)
48 #define V3_SYMMOD_ARCH_INV (0x00)
49 #define V3_SYMMOD_ARCH_i386 (0x01)
50 #define V3_SYMMOD_ARCH_x86_64 (0x02)
53 } __attribute__((packed));
54 } __attribute__((packed));
58 struct list_head node;
63 struct v3_symmod_loader_ops {
65 int (*load_capsule)(struct v3_vm_info * vm, struct v3_sym_capsule * mod, void * priv_data);
69 struct v3_symmod_state {
71 struct v3_symmod_loader_ops * loader_ops;
74 uint32_t num_avail_capsules;
75 uint32_t num_loaded_capsules;
77 struct hashtable * capsule_table;
79 /* List containing V3 symbols */
80 /* (defined in vmm_symmod.c) */
81 struct list_head v3_sym_list;
86 int v3_set_symmod_loader(struct v3_vm_info * vm, struct v3_symmod_loader_ops * ops, void * priv_data);
88 int v3_load_sym_capsule(struct v3_vm_info * vm, char * mod_name);
90 int v3_init_symmod_vm(struct v3_vm_info * vm, v3_cfg_tree_t * cfg);
91 int v3_deinit_symmod_vm(struct v3_vm_info * vm);
93 struct v3_sym_capsule * v3_get_sym_capsule(struct v3_vm_info * vm, char * name);
98 int V3_deinit_symmod();