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 GS.BASE save/restore
[palacios.git] / palacios / src / palacios / svm.c
index 00a9ebd..4913513 100644 (file)
@@ -301,11 +301,25 @@ 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();
 
+    {
+
+      v3_get_msr(0xc0000101, &vm_cr_high, &vm_cr_low);
+
+      PrintDebug("GS.Base: %x:%x\n", vm_cr_high, vm_cr_low); 
+      /*
+      v3_get_msr(0xc0000102, &vm_cr_high, &vm_cr_low);
+
+      PrintDebug("KernelGSBase: %x:%x\n", vm_cr_high, vm_cr_low); 
+      */
+
+    }
+
     PrintDebug("SVM Entry to rip=%x...\n", info->rip);
 
     rdtscll(info->time_state.cached_host_tsc);
@@ -315,6 +329,21 @@ static int start_svm_guest(struct guest_info *info) {
 
     rdtscll(tmp_tsc);
     PrintDebug("SVM Returned\n");
+
+
+    {
+
+      v3_set_msr(0xc0000101, vm_cr_high, vm_cr_low);
+
+      PrintDebug("GS.Base: %x:%x\n", vm_cr_high, vm_cr_low); 
+
+      /*
+      v3_get_msr(0xc0000102, &vm_cr_high, &vm_cr_low);
+
+      PrintDebug("KernelGSBase: %x:%x\n", vm_cr_high, vm_cr_low); 
+      */
+
+    }
     
     {
       uint_t x = 0;