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.


Split telemetry into global and per-core to avoid race printing core telemetry
[palacios.git] / palacios / src / palacios / vmm_symmod.c
index 7ca94d2..5f14566 100644 (file)
@@ -106,6 +106,7 @@ int V3_init_symmod() {
            PrintError("Could not insert module %s to master list\n", tmp_def->name);
            return -1;
        }
+
        list_add(&(capsule->node), &capsule_list);
 
        tmp_def = &(__start__v3_capsules[++i]);
@@ -114,6 +115,12 @@ int V3_init_symmod() {
     return 0;
 }
 
+int V3_deinit_symmod() {
+    v3_free_htable(capsule_table, 1, 0);    
+
+    return 0;
+}
+
 /* ***************** */
 /* Linkage functions */
 /* ***************** */
@@ -215,6 +222,22 @@ int v3_init_symmod_vm(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     return 0;
 }
 
+int v3_deinit_symmod_vm(struct v3_vm_info * vm) {
+    struct v3_symmod_state * symmod_state = &(vm->sym_vm_state.symmod_state);
+    struct v3_symbol * sym = NULL;
+    struct v3_symbol * tmp_sym = NULL;
+
+    v3_remove_hypercall(vm, SYMMOD_SYMS_HCALL);
+
+    v3_free_htable(symmod_state->capsule_table, 0, 0);
+
+    list_for_each_entry_safe(sym, tmp_sym, &(symmod_state->v3_sym_list), sym_node) {
+       list_del(&(sym->sym_node));
+       V3_Free(sym);
+    }
+
+    return 0;
+}
 
 
 int v3_set_symmod_loader(struct v3_vm_info * vm, struct v3_symmod_loader_ops * ops, void * priv_data) {