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.


removed obsolete telemetry fn
[palacios.git] / palacios / include / palacios / vmm_symmod.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_SYM_MOD_H__
21 #define __VMM_SYM_MOD_H__
22
23 #ifdef __V3VEE__
24
25 #include <palacios/vmm_config.h>
26 #include <palacios/vmm_hashtable.h>
27
28
29
30
31
32
33 struct v3_sym_capsule {
34     char * name;
35     void * start_addr;
36     uint32_t size;
37     uint32_t guest_size;
38
39     union {
40         uint32_t flags;
41         struct {
42 #define V3_SYMMOD_INV (0x00)
43 #define V3_SYMMOD_LNX (0x01)
44 #define V3_SYMMOD_MOD (0x02)
45 #define V3_SYMMOD_SEC (0x03)
46             uint8_t type;
47
48 #define V3_SYMMOD_ARCH_INV     (0x00)
49 #define V3_SYMMOD_ARCH_i386    (0x01)
50 #define V3_SYMMOD_ARCH_x86_64  (0x02)
51             uint8_t arch;
52             uint16_t rsvd;
53         } __attribute__((packed));
54     } __attribute__((packed));
55     
56     void * capsule_data;
57
58     struct list_head node;
59 };
60
61
62
63 struct v3_symmod_loader_ops {
64
65     int (*load_capsule)(struct v3_vm_info * vm, struct v3_sym_capsule * mod,  void * priv_data);
66 };
67
68
69 struct v3_symmod_state {
70
71     struct v3_symmod_loader_ops * loader_ops;
72     void * loader_data;
73
74     uint32_t num_avail_capsules;
75     uint32_t num_loaded_capsules;
76
77     struct hashtable * capsule_table;
78
79     /* List containing V3 symbols */
80     /* (defined in vmm_symmod.c)  */
81     struct list_head v3_sym_list;
82 };
83
84
85
86 int v3_set_symmod_loader(struct v3_vm_info * vm, struct v3_symmod_loader_ops * ops, void * priv_data);
87
88 int v3_load_sym_capsule(struct v3_vm_info * vm, char * mod_name);
89
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);
92
93 struct v3_sym_capsule * v3_get_sym_capsule(struct v3_vm_info * vm, char * name);
94
95
96
97 int V3_init_symmod();
98 int V3_deinit_symmod();
99
100
101
102
103
104
105 #endif
106
107 #endif