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.


*** empty log message ***
Jack Lange [Fri, 11 Apr 2008 20:17:36 +0000 (20:17 +0000)]
palacios/include/palacios/vmm_dev.h [new file with mode: 0644]
palacios/include/palacios/vmm_intr.h
palacios/src/geekos/vm.c
palacios/src/palacios/svm_handler.c
palacios/src/palacios/vmm_intr.c

diff --git a/palacios/include/palacios/vmm_dev.h b/palacios/include/palacios/vmm_dev.h
new file mode 100644 (file)
index 0000000..29f8a24
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef __VMM_DEV_H
+#define __VMM_DEV_H
+
+
+
+struct vm_device {
+  int (*init_device
+
+
+};
+
+
+
+
+
+#endif
index 0b178b0..209a7a1 100644 (file)
@@ -31,12 +31,15 @@ struct guest_info;
 struct vm_intr {
   uint_t excp_pending;
   uint_t excp_num;
+  uint_t excp_error_code;
   
   /* some way to get the [A]PIC intr */
 
 };
 
 
+void init_interrupt_state(struct vm_intr * state);
+
 int raise_exception(struct guest_info * info, uint_t excp);
 
 int intr_pending(struct vm_intr * intr);
index abce2ac..7a88d3e 100644 (file)
@@ -183,6 +183,7 @@ int RunVMM(struct Boot_Info * bootInfo) {
     vm_info.cpu_mode = REAL;
 
     init_vmm_io_map(&(vm_info.io_map));
+    init_interrupt_state(&(vm_info.intr_state));
 
     
     if (0) {
index 46b4fa2..d1123b6 100644 (file)
@@ -120,6 +120,7 @@ int handle_svm_exit(struct guest_info * info) {
       break;
     case EXCEPTION:
       guest_ctrl->EVENTINJ.type = SVM_INJECTION_EXCEPTION;
+      guest_ctrl->EVENTINJ.excp_error_code = info->intr_state.excp_error_code;
       break;
     case SOFTWARE:
       guest_ctrl->EVENTINJ.type = SVM_INJECTION_SOFT_INTR;
@@ -130,13 +131,14 @@ int handle_svm_exit(struct guest_info * info) {
 
     case INVALID_INTR: 
     default:
-      PrintDebug("Attempted to issue and invalid interrupt\n");
+      PrintDebug("Attempted to issue an invalid interrupt\n");
       return -1;
     }
 
     // IMPORTANT TODO
     // We need to figure out stack parameters....
-    // EVENTINJ.error_code
+
+    //EVENTINJ.error_code
 
   }
 
index 464bc79..a326f37 100644 (file)
@@ -1,6 +1,13 @@
 #include <palacios/vmm_intr.h>
 #include <palacios/vm_guest.h>
 
+
+void init_interrupt_state(struct vm_intr * state) {
+  state->excp_pending = 0;
+  state->excp_num = 0;
+  state->excp_error_code = 0;
+}
+
 int raise_exception(struct guest_info * info, uint_t excp) {
 
   /* We can't stack exceptions,