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 emulator
[palacios.git] / palacios / src / palacios / svm_handler.c
index 73f154a..96ab5fb 100644 (file)
@@ -7,7 +7,7 @@
 #include <palacios/svm_halt.h>
 #include <palacios/svm_pause.h>
 #include <palacios/vmm_intr.h>
-
+#include <palacios/vmm_emulator.h>
 
 int handle_svm_exit(struct guest_info * info) {
   vmcb_ctrl_t * guest_ctrl = 0;
@@ -192,6 +192,17 @@ int handle_svm_exit(struct guest_info * info) {
     if (handle_svm_pause(info) == -1) { 
       return -1;
     }
+  } else if (exit_code == VMEXIT_VMMCALL) {
+    PrintDebug("VMMCALL\n");
+    if (info->run_state == VM_EMULATING) {
+      if (v3_emulation_exit_handler(info) == -1) {
+       return -1;
+      }
+    } else {
+      PrintError("VMMCALL with not emulator...\n");
+      return -1;
+    }
+
   } else {
     addr_t rip_addr;
     char buf[15];