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 MSR hook framework
[palacios.git] / palacios / src / palacios / vmm_config.c
index 10742f7..3bbac88 100644 (file)
@@ -20,6 +20,7 @@
 #include <palacios/vmm_config.h>
 #include <palacios/vmm.h>
 #include <palacios/vmm_debug.h>
+#include <palacios/vmm_msr.h>
 
 
 #include <devices/serial.h>
@@ -50,7 +51,7 @@ static int mem_test_read(addr_t guest_addr, void * dst, uint_t length, void * pr
 
   memcpy(dst, &foo, length);
 
-  PrintDebug("Passthrough mem read returning: %d (length=%d)\n", foo + (guest_addr & 0xfff), length);
+  PrintDebug("Passthrough mem read returning: %p (length=%d)\n", (void *)(foo + (guest_addr & 0xfff)), length);
   return length;
 }
 
@@ -89,6 +90,7 @@ int v3_config_guest(struct guest_info * info, struct v3_vm_config * config_ptr)
   
  
   v3_init_vmm_io_map(info);
+  v3_init_msr_map(info);
   v3_init_interrupt_state(info);
   
   v3_init_dev_mgr(info);
@@ -105,14 +107,14 @@ int v3_config_guest(struct guest_info * info, struct v3_vm_config * config_ptr)
     void * guest_mem =  V3_AllocPages(num_pages);
 
     PrintDebug("Layout Region %d bytes\n", config_ptr->rombios_size);
-    memcpy(guest_mem, config_ptr->rombios, config_ptr->rombios_size);
+    memcpy(V3_VAddr(guest_mem), config_ptr->rombios, config_ptr->rombios_size);
 
     add_shadow_region_passthrough(info, ROMBIOS_START, ROMBIOS_START + (num_pages * PAGE_SIZE), (addr_t)guest_mem);
     
-    PrintDebug("Adding Shadow Region (0x%x-0x%x) -> 0x%x\n", 
-              ROMBIOS_START, 
-              ROMBIOS_START + (num_pages * PAGE_SIZE), 
-              guest_mem);
+    PrintDebug("Adding Shadow Region (0x%p-0x%p) -> 0x%p\n", 
+              (void *)ROMBIOS_START, 
+              (void *)ROMBIOS_START + (num_pages * PAGE_SIZE), 
+              (void *)guest_mem);
   }
 
 
@@ -122,14 +124,14 @@ int v3_config_guest(struct guest_info * info, struct v3_vm_config * config_ptr)
     void * guest_mem =  V3_AllocPages(num_pages);
 
     PrintDebug("Layout Region %d bytes\n", config_ptr->vgabios_size);
-    memcpy(guest_mem, config_ptr->vgabios, config_ptr->vgabios_size);
+    memcpy(V3_VAddr(guest_mem), config_ptr->vgabios, config_ptr->vgabios_size);
 
     add_shadow_region_passthrough(info, VGABIOS_START, VGABIOS_START + (num_pages * PAGE_SIZE), (addr_t)guest_mem);
     
-    PrintDebug("Adding Shadow Region (0x%x-0x%x) -> 0x%x\n", 
-              VGABIOS_START, 
-              VGABIOS_START + (num_pages * PAGE_SIZE), 
-              guest_mem);
+    PrintDebug("Adding Shadow Region (0x%p-0x%p) -> 0x%p\n", 
+              (void *)VGABIOS_START, 
+              (void *)VGABIOS_START + (num_pages * PAGE_SIZE), 
+              (void *)guest_mem);
   }
 
       //