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 / svm_handler.c
index 8a1a32f..5bc0ff0 100644 (file)
@@ -1,3 +1,6 @@
+/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
+/* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
+
 #include <palacios/svm_handler.h>
 #include <palacios/vmm.h>
 #include <palacios/vm_guest_mem.h>
@@ -258,6 +261,21 @@ int handle_svm_exit(struct guest_info * info) {
          return -1;
        }
       } else {
+       /*
+       ulong_t tsc_spread = 0;
+       ullong_t exit_tsc = 0;
+
+       ulong_t rax = (ulong_t)info->vm_regs.rbx;
+       ulong_t rdx = (ulong_t)info->vm_regs.rcx;
+
+       *(ulong_t *)(&exit_tsc) = rax;
+       *(((ulong_t *)(&exit_tsc)) + 1) = rdx; 
+
+       tsc_spread = info->exit_tsc - exit_tsc;
+
+       PrintError("VMMCALL tsc diff = %lu\n",tsc_spread); 
+       info->rip += 3;
+       */
        PrintError("VMMCALL with not emulator...\n");
        return -1;
       }
@@ -452,7 +470,6 @@ int handle_svm_exit(struct guest_info * info) {
 
 
 const uchar_t * vmexit_code_to_str(uint_t exit_code) {
-
   switch(exit_code) {
   case VMEXIT_CR0_READ:
     return VMEXIT_CR0_READ_STR;