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.


Semi-functional SMP (boots Kitten guest with two cores)
[palacios.git] / palacios / src / palacios / svm.c
index 35eef9c..4e362b5 100644 (file)
@@ -113,7 +113,7 @@ static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info * core) {
     
 
     ctrl_area->instrs.NMI = 1;
-    ctrl_area->instrs.SMI = 1;
+    ctrl_area->instrs.SMI = 0; // allow SMIs to run in guest
     ctrl_area->instrs.INIT = 1;
     ctrl_area->instrs.PAUSE = 1;
     ctrl_area->instrs.shutdown_evts = 1;
@@ -476,6 +476,14 @@ int v3_svm_enter(struct guest_info * info) {
     //    guest_ctrl->TSC_OFFSET = info->time_state.guest_tsc - info->time_state.cached_host_tsc;
 
     //V3_Print("Calling v3_svm_launch\n");
+
+
+#if 0
+    if (info->cpu_id==1) { 
+       V3_Print("Entering Core 1\n");
+       v3_print_guest_state(info);
+    }
+#endif
        
     v3_svm_launch((vmcb_t *)V3_PAddr(info->vmm_data), &(info->vm_regs), (vmcb_t *)host_vmcbs[info->cpu_id]);
     
@@ -540,12 +548,32 @@ int v3_svm_enter(struct guest_info * info) {
     v3_yield_cond(info);
 
 
+
+#if 0
+    if (info->cpu_id==1) { 
+       V3_Print("Exited Core 1, before handler\n");
+       v3_print_guest_state(info);
+       PrintDebugVMCB((vmcb_t*)(info->vmm_data));
+    }
+#endif
+
+
     if (v3_handle_svm_exit(info, exit_code, exit_info1, exit_info2) != 0) {
        PrintError("Error in SVM exit handler\n");
        return -1;
     }
 
 
+#if 0
+    if (info->cpu_id==1) { 
+       V3_Print("Exited Core 1, after handler\n");
+       v3_print_guest_state(info);
+       PrintDebugVMCB((vmcb_t*)(info->vmm_data));
+    }
+#endif
+
+
+
     return 0;
 }