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.


File support added (interface to file support in host)
[palacios.git] / palacios / src / palacios / vmm_mem_hook.c
index 7064d4e..8ee243a 100644 (file)
@@ -21,6 +21,7 @@
 #include <palacios/vm_guest.h>
 #include <palacios/vmm_mem_hook.h>
 #include <palacios/vmm_emulator.h>
+#include <palacios/vm_guest_mem.h>
 
 struct mem_hook {
   
@@ -58,13 +59,15 @@ static int handle_mem_hook(struct guest_info * info, addr_t guest_va, addr_t gue
     if (reg->flags.alloced == 0) {
        op_addr = hook->hook_hva;
     } else {
-       op_addr = (addr_t)V3_VAddr((void *)v3_get_shadow_addr(reg, info->cpu_id, guest_pa));
+       if (v3_gpa_to_hva(info, guest_pa, &op_addr) == -1) {
+           PrintError("Could not translate hook address (%p)\n", (void *)guest_pa);
+           return -1;
+       }
     }
 
     
     if (access_info.write == 1) { 
        // Write Operation 
-
        if (v3_emulate_write_op(info, guest_va, guest_pa, op_addr, 
                                hook->write, hook->priv_data) == -1) {
            PrintError("Write Full Hook emulation failed\n");