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.


added memory unhooking function
[palacios.git] / palacios / src / palacios / vmm_mem.c
index 659fd27..dc3f1ae 100644 (file)
@@ -150,6 +150,20 @@ int v3_hook_full_mem(struct guest_info * info, addr_t guest_addr_start, addr_t g
 }
 
 
+// This will unhook the memory hook registered at start address
+// We do not support unhooking subregions
+int v3_unhook_mem(struct guest_info * info, addr_t guest_addr_start) {
+    struct v3_shadow_region * reg = v3_get_shadow_region(info, guest_addr_start);
+
+    if ((reg->host_type != SHDW_REGION_FULL_HOOK) || 
+       (reg->host_type != SHDW_REGION_WRITE_HOOK)) {
+       PrintError("Trying to unhook a non hooked memory region (addr=%p)\n", (void *)guest_addr_start);
+       return -1;
+    }
+
+    return v3_delete_shadow_region(info, reg);
+}
+
 
 
 static inline