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.


correctly handle NMI exits on VMX architectures
[palacios.releases.git] / palacios / src / palacios / svm_handler.c
index 5849055..d0adffc 100644 (file)
@@ -25,6 +25,7 @@
 #include <palacios/vmm_ctrl_regs.h>
 #include <palacios/svm_io.h>
 #include <palacios/vmm_halt.h>
+#include <palacios/vmm_mwait.h>
 #include <palacios/svm_pause.h>
 #include <palacios/svm_wbinvd.h>
 #include <palacios/vmm_intr.h>
@@ -165,6 +166,25 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
                return -1;
            }
            break;
+
+       case SVM_EXIT_CR8_WRITE:
+#ifdef V3_CONFIG_DEBUG_CTRL_REGS
+           PrintDebug("CR8 Read\n");
+#endif
+           if (v3_handle_cr8_read(info) == -1) {
+               return -1;
+           }
+           break;
+
+       case SVM_EXIT_CR8_READ:
+#ifdef V3_CONFIG_DEBUG_CTRL_REGS
+           PrintDebug("CR8 Read\n");
+#endif
+           if (v3_handle_cr8_read(info) == -1) {
+               return -1;
+           }
+           break;
+
        case SVM_EXIT_EXCP14: {
            addr_t fault_addr = exit_info2;
            pf_error_t * error_code = (pf_error_t *)&(exit_info1);
@@ -238,6 +258,26 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
                return -1;
            }
            break;
+
+       case SVM_EXIT_MONITOR:
+#ifdef V3_CONFIG_DEBUG_MWAIT
+           PrintDebug("Guest issuing MONITOR\n");
+#endif
+           if (v3_handle_monitor(info) == -1) { 
+               return -1;
+           }
+           break;
+
+       case SVM_EXIT_MWAIT:
+       case SVM_EXIT_MWAIT_CONDITIONAL:
+#ifdef V3_CONFIG_DEBUG_MWAIT
+           PrintDebug("Guest issuing MWAIT\n");
+#endif
+           if (v3_handle_mwait(info) == -1) { 
+               return -1;
+           }
+           break;
+
        case SVM_EXIT_PAUSE:
            //      PrintDebug("Guest paused\n");
            if (v3_handle_svm_pause(info) == -1) { 
@@ -266,9 +306,10 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
            PrintDebug("RDTSCP\n");
 #endif 
            if (v3_handle_rdtscp(info) == -1) {
-               PrintError("Error Handling RDTSCP instruction\n");
+               PrintError("Error handling RDTSCP instruction\n");
                return -1;
            }
+           
            break;
        case SVM_EXIT_SHUTDOWN:
            PrintDebug("Guest-initiated shutdown\n");