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 write protect flag to realmode CR0, to enable memory hooks
[palacios.git] / palacios / src / palacios / svm.c
index 4a2d3b9..490e342 100644 (file)
@@ -36,8 +36,6 @@
 
 #include <palacios/vmm_rbtree.h>
 
-#include <palacios/vmm_profiler.h>
-
 #include <palacios/vmm_direct_paging.h>
 
 #include <palacios/vmm_ctrl_regs.h>
@@ -126,7 +124,8 @@ static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info *vm_info) {
 
     vm_info->vm_regs.rdx = 0x00000f00;
 
-    guest_state->cr0 = 0x60000010;
+
+    guest_state->cr0 = 0x60010010; // Set the WP flag so the memory hooks work in real-mode
 
 
     guest_state->cs.selector = 0xf000;
@@ -320,12 +319,6 @@ static int start_svm_guest(struct guest_info *info) {
        
        if ((num_exits % 5000) == 0) {
            PrintDebug("SVM Exit number %d\n", num_exits);
-
-#ifdef CONFIG_PROFILE_VMM
-           if (info->enable_profiler) {
-               v3_print_profile(info);
-           }
-#endif
        }
 
        if (v3_handle_svm_exit(info) != 0) {
@@ -358,7 +351,7 @@ static int start_svm_guest(struct guest_info *info) {
            PrintDebug("Host Address of rip = 0x%p\n", (void *)host_addr);
 
            PrintDebug("Instr (15 bytes) at %p:\n", (void *)host_addr);
-           PrintTraceMemDump((uchar_t *)host_addr, 15);
+           v3_dump_mem((uint8_t *)host_addr, 15);
 
            break;
        }