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.


modified copyright tags
[palacios.git] / palacios / src / palacios / vmm_emulator.c
index 3fedc51..8d81ece 100644 (file)
@@ -1,3 +1,7 @@
+/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
+/* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
+
+
 #include <palacios/vmm.h>
 #include <palacios/vmm_emulator.h>
 #include <palacios/vm_guest_mem.h>
@@ -210,14 +214,20 @@ int v3_emulate_memory_write(struct guest_info * info, addr_t write_gva,
   struct emulated_page * data_page = V3_Malloc(sizeof(struct emulated_page));
   addr_t data_addr_offset = PT32_PAGE_OFFSET(write_gva);
   pte32_t saved_pte;
+  int i;
 
-  PrintDebug("Emulating Write\n");
+  PrintDebug("Emulating Write for instruction at 0x%x\n",info->rip);
 
   if (info->mem_mode == PHYSICAL_MEM) { 
     ret = read_guest_pa_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr);
   } else { 
     ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr);
   }
+
+
+  PrintDebug("Instruction is");
+  for (i=0;i<15;i++) { PrintDebug(" 0x%x",instr[i]); } 
+  PrintDebug("\n");
   
   if (v3_basic_mem_decode(info, (addr_t)instr, &instr_info) == -1) {
     PrintError("Could not do a basic memory instruction decode\n");
@@ -226,6 +236,10 @@ int v3_emulate_memory_write(struct guest_info * info, addr_t write_gva,
     return -1;
   }
 
+  if (instr_info.has_rep==1) { 
+    PrintDebug("Emulated instruction has rep\n");
+  }
+
   /*
   if (instr_info.has_rep == 1) {
     PrintError("We currently don't handle rep* instructions\n");