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 initial memory hook support, still need decoder
[palacios.git] / palacios / src / geekos / vm.c
index b080117..92d61f1 100644 (file)
@@ -153,6 +153,17 @@ void BuzzVM()
 
 
 
+int passthrough_mem_read(addr_t guest_addr, void * dst, uint_t length, void * priv_data) {
+  memcpy(dst, (void*)guest_addr, length);
+  return length;
+}
+
+int passthrough_mem_write(addr_t guest_addr, void * src, uint_t length, void * priv_data) {
+  memcpy((void*)guest_addr, src, length);
+  return length;
+}
+
+
 
 /* We need a configuration mechanism, so we can wrap this completely inside the VMM code, 
  * with no pollution into the HOST OS
@@ -281,8 +292,9 @@ int RunVMM(struct Boot_Info * bootInfo) {
       
       //     
       add_shadow_region_passthrough(&vm_info, 0x0, 0xa0000, (addr_t)Allocate_VMM_Pages(160));
-      add_shadow_region_passthrough(&vm_info, 0xa0000, 0xc0000, 0xa0000); 
       
+      add_shadow_region_passthrough(&vm_info, 0xa0000, 0xc0000, 0xa0000); 
+      //hook_guest_mem(&vm_info, 0xa0000, 0xc0000, passthrough_mem_read, passthrough_mem_write, NULL);
 
 
       // TEMP