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.


SVM reset capability + integration with multiboot+hvm reset capability
[palacios.git] / palacios / src / extensions / ext_inspector.c
index 5a440c1..18e6a9c 100644 (file)
@@ -38,6 +38,12 @@ struct v3_inspector_state {
 
 static int init_inspector(struct v3_vm_info * vm, v3_cfg_tree_t * cfg, void ** priv_data) {
     struct v3_inspector_state * state = V3_Malloc(sizeof(struct v3_inspector_state));
+
+    if (!state) {
+       PrintError(vm, VCORE_NONE, "Cannot allocate state in inspector\n");
+       return -1;
+    }
+
     memset(state, 0, sizeof(struct v3_inspector_state));
 
     strncpy(state->state_tree.name, "vm->name", 50);
@@ -49,7 +55,7 @@ static int init_inspector(struct v3_vm_info * vm, v3_cfg_tree_t * cfg, void ** p
 }
 
 
-static int init_inspector_core(struct guest_info * core, void * priv_data) {
+static int init_inspector_core(struct guest_info * core, void * priv_data, void ** core_data) {
     struct v3_inspector_state * vm_state = priv_data;
     char core_name[50];
 
@@ -97,8 +103,9 @@ static int init_inspector_core(struct guest_info * core, void * priv_data) {
 
 static struct v3_extension_impl inspector_impl = {
     .name = "inspector",
-    .init = init_inspector,
-    .deinit = NULL,
+    .init = NULL,
+    .vm_init = init_inspector,
+    .vm_deinit = NULL,
     .core_init = init_inspector_core,
     .core_deinit = NULL,
     .on_entry = NULL,