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.


fixed ins/outs and moved the gs.base save/restore point
[palacios.git] / palacios / src / palacios / svm.c
index 00a9ebd..b9f4a9f 100644 (file)
@@ -301,21 +301,28 @@ static int start_svm_guest(struct guest_info *info) {
 
   while (1) {
     ullong_t tmp_tsc;
+    uint_t vm_cr_low = 0, vm_cr_high = 0;
 
 
     v3_enable_ints();
     v3_clgi();
 
+
     PrintDebug("SVM Entry to rip=%x...\n", info->rip);
 
+    v3_get_msr(0xc0000101, &vm_cr_high, &vm_cr_low);
+
     rdtscll(info->time_state.cached_host_tsc);
+
     guest_ctrl->TSC_OFFSET = info->time_state.guest_tsc - info->time_state.cached_host_tsc;
 
     v3_svm_launch((vmcb_t*)V3_PAddr(info->vmm_data), &(info->vm_regs));
-
     rdtscll(tmp_tsc);
+
+    v3_set_msr(0xc0000101, vm_cr_high, vm_cr_low);
     PrintDebug("SVM Returned\n");
-    
+
+
     {
       uint_t x = 0;
       PrintDebug("RSP=%p\n", &x);