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.


architecture independence work
[palacios.git] / palacios / src / palacios / vm_guest_mem.c
index eb7687e..7e45c0c 100644 (file)
@@ -119,20 +119,20 @@ int guest_va_to_guest_pa(struct guest_info * guest_info, addr_t guest_va, addr_t
       {
        addr_t tmp_pa;
        pde32_t * pde;
-       addr_t guest_pde = CR3_TO_PDE32(guest_info->shdw_pg_state.guest_cr3.r_reg);
+       addr_t guest_pde = CR3_TO_PDE32(guest_info->shdw_pg_state.guest_cr3);
 
        if (guest_pa_to_host_va(guest_info, guest_pde, (addr_t *)&pde) == -1) {
          return -1;
        }
 
        switch (pde32_lookup(pde, guest_va, &tmp_pa)) {
-       case NOT_PRESENT: 
+       case PDE32_ENTRY_NOT_PRESENT: 
          *guest_pa = 0;
          return -1;
-       case LARGE_PAGE:
+       case PDE32_ENTRY_LARGE_PAGE:
          *guest_pa = tmp_pa;
          return 0;
-       case PTE32:
+       case PDE32_ENTRY_PTE32:
          {
            pte32_t * pte;
 
@@ -324,11 +324,12 @@ int read_guest_pa_memory(struct guest_info * guest_info, addr_t guest_pa, int co
     }
 
     
-    PrintDebug("Trying to read %d bytes\n", bytes_to_copy);
-    PrintDebug("Dist to page edge=%d\n", dist_to_pg_edge);
-    PrintDebug("PAGE_ADDR=0x%x\n", PAGE_ADDR(cursor));
-    PrintDebug("guest_pa=0x%x\n", guest_pa);
-    
+    /*
+      PrintDebug("Trying to read %d bytes\n", bytes_to_copy);
+      PrintDebug("Dist to page edge=%d\n", dist_to_pg_edge);
+      PrintDebug("PAGE_ADDR=0x%x\n", PAGE_ADDR(cursor));
+      PrintDebug("guest_pa=0x%x\n", guest_pa);
+    */
     
     memcpy(dest + bytes_read, (void*)host_addr, bytes_to_copy);