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 support for SMI interrupt reaches-user-mode-on-qemu-and-both-amd-boxes-nested-paging-faults
Peter Dinda [Tue, 15 Jul 2008 19:34:22 +0000 (19:34 +0000)]
palacios/src/palacios/svm.c
palacios/src/palacios/svm_handler.c
palacios/src/palacios/vm_guest.c

index 8c650ff..1d8d23b 100644 (file)
@@ -85,6 +85,15 @@ static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info *vm_info) {
   ctrl_area->exceptions.of = 1;
   ctrl_area->exceptions.nmi = 1;
 
+  // Debug of boot on physical machines - 7/14/08
+  ctrl_area->instrs.NMI=1;
+  ctrl_area->instrs.SMI=1;
+  ctrl_area->instrs.INIT=1;
+  ctrl_area->instrs.PAUSE=1;
+  ctrl_area->instrs.shutdown_evts=1;
+
+
+
   vm_info->vm_regs.rdx = 0x00000f00;
 
   guest_state->cr0 = 0x60000010;
index 93a366e..10d3af6 100644 (file)
@@ -41,7 +41,7 @@ int handle_svm_exit(struct guest_info * info) {
   // Disable printing io exits due to bochs debug messages
   //if (!((exit_code == VMEXIT_IOIO) && ((ushort_t)(guest_ctrl->exit_info1 >> 16) == 0x402))) {
 
-  PrintDebug("SVM Returned: Exit Code: %x \t\t(tsc=%ul)\n",exit_code, (uint_t)info->time_state.guest_tsc); 
+  PrintDebug("SVM Returned: Exit Code: 0x%x \t\t(tsc=%ul)\n",exit_code, (uint_t)info->time_state.guest_tsc); 
     //  }
   // PrintDebugVMCB((vmcb_t*)(info->vmm_data));
 
@@ -132,6 +132,10 @@ int handle_svm_exit(struct guest_info * info) {
 
     //    handle_svm_intr(info);
 
+  } else if (exit_code == VMEXIT_SMI) { 
+
+    //   handle_svm_smi(info); // ignored for now
+
   } else if (exit_code == VMEXIT_HLT) {
     PrintDebug("Guest halted\n");
     if (handle_svm_halt(info) == -1) {
index 33c85ad..b831962 100644 (file)
@@ -3,7 +3,9 @@
 
 void PrintV3Segments(struct v3_segments * segs) {
   int i = 0;
-  struct v3_segment * seg_ptr = (struct v3_segment *)segs;
+  struct v3_segment * seg_ptr;
+
+  seg_ptr=(struct v3_segment *)segs;
   
   char *seg_names[] = {"CS", "DS" , "ES", "FS", "GS", "SS" , "LDTR", "GDTR", "IDTR", "TR", NULL};
   PrintDebug("Segments\n");
@@ -19,9 +21,11 @@ void PrintV3Segments(struct v3_segments * segs) {
 
 void PrintV3CtrlRegs(struct v3_ctrl_regs * regs) {
   int i = 0;
-  v3_reg_t * reg_ptr = (v3_reg_t *)regs;
+  v3_reg_t * reg_ptr;
   char * reg_names[] = {"CR0", "CR2", "CR3", "CR4", "CR8", "FLAGS", NULL};
 
+  reg_ptr= (v3_reg_t *)regs;
+
   PrintDebug("32 bit Ctrl Regs:\n");
 
   for (i = 0; reg_names[i] != NULL; i++) {