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 time check for SVM
Peter Dinda [Wed, 7 Apr 2010 21:48:41 +0000 (16:48 -0500)]
palacios/include/palacios/vmm.h
palacios/src/palacios/svm.c

index 1ef6cb1..b10795c 100644 (file)
@@ -141,7 +141,7 @@ struct guest_info;
 
 #define V3_CREATE_THREAD(fn, arg, name)                                \
     do {                                                       \
-       extern struct v3_os_hooks * os_hooks;                   \
+       extern struct v3_os_hooks * os_hooks;                   \ 
        if ((os_hooks) && (os_hooks)->start_kernel_thread) {    \
            (os_hooks)->start_kernel_thread(fn, arg, name);     \
        }                                                       \
index 6de0781..c11b484 100644 (file)
@@ -468,6 +468,10 @@ int v3_svm_enter(struct guest_info * info) {
 
 
     rdtscll(tmp_tsc);
+    if (tmp_tsc < info->time_state.cached_host_tsc) { 
+       PrintError("Time has gone backwards, panicing!\n");
+       return -1;
+    }
     v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc);
     rdtscll(info->time_state.cached_host_tsc);
     //    guest_ctrl->TSC_OFFSET = info->time_state.guest_tsc - info->time_state.cached_host_tsc;