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.


Restructure of direct host network bridge.
[palacios.git] / palacios / include / palacios / vmm_symmod.h
index bc7079b..22e2dc7 100644 (file)
 #include <palacios/vmm_config.h>
 #include <palacios/vmm_hashtable.h>
 
+
+
+
+
+
+struct v3_sym_capsule {
+    char * name;
+    void * start_addr;
+    uint32_t size;
+    uint32_t guest_size;
+
+    union {
+       uint32_t flags;
+       struct {
+#define V3_SYMMOD_INV (0x00)
+#define V3_SYMMOD_LNX (0x01)
+#define V3_SYMMOD_MOD (0x02)
+#define V3_SYMMOD_SEC (0x03)
+           uint8_t type;
+
+#define V3_SYMMOD_ARCH_INV     (0x00)
+#define V3_SYMMOD_ARCH_i386    (0x01)
+#define V3_SYMMOD_ARCH_x86_64  (0x02)
+           uint8_t arch;
+           uint16_t rsvd;
+       } __attribute__((packed));
+    } __attribute__((packed));
+    
+    void * capsule_data;
+
+    struct list_head node;
+};
+
+
+
 struct v3_symmod_loader_ops {
 
-    int (*load_module)(struct v3_vm_info * vm, char * name, int len, void * priv_data);
+    int (*load_capsule)(struct v3_vm_info * vm, struct v3_sym_capsule * mod,  void * priv_data);
 };
 
 
@@ -36,31 +71,31 @@ struct v3_symmod_state {
     struct v3_symmod_loader_ops * loader_ops;
     void * loader_data;
 
+    uint32_t num_avail_capsules;
+    uint32_t num_loaded_capsules;
 
-    struct hashtable * module_table;
-};
-
+    struct hashtable * capsule_table;
 
-struct v3_sym_module {
-    char name[32];
-    uint16_t num_bytes;
-    char * data;
+    /* List containing V3 symbols */
+    /* (defined in vmm_symmod.c)  */
+    struct list_head v3_sym_list;
 };
 
 
-int v3_set_symmod_loader(struct v3_vm_info * vm, struct v3_symmod_loader_ops * ops, void * priv_data);
 
-int v3_load_sym_module(struct v3_vm_info * vm, char * mod_name);
+int v3_set_symmod_loader(struct v3_vm_info * vm, struct v3_symmod_loader_ops * ops, void * priv_data);
 
+int v3_load_sym_capsule(struct v3_vm_info * vm, char * mod_name);
 
 int v3_init_symmod_vm(struct v3_vm_info * vm, v3_cfg_tree_t * cfg);
+int v3_deinit_symmod_vm(struct v3_vm_info * vm);
 
+struct v3_sym_capsule * v3_get_sym_capsule(struct v3_vm_info * vm, char * name);
 
-struct v3_sym_module * v3_get_sym_module(struct v3_vm_info * vm, char * name);
 
 
 int V3_init_symmod();
-
+int V3_deinit_symmod();