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
[palacios.git] / palacios / src / palacios / svm.c
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;