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 cpuid hooking
[palacios.git] / palacios / src / palacios / svm_handler.c
index 30d581e..4c4aa2c 100644 (file)
 #include <palacios/vmm_decoder.h>
 #include <palacios/vmm_ctrl_regs.h>
 #include <palacios/svm_io.h>
-#include <palacios/svm_halt.h>
+#include <palacios/vmm_halt.h>
 #include <palacios/svm_pause.h>
 #include <palacios/svm_wbinvd.h>
 #include <palacios/vmm_intr.h>
 #include <palacios/vmm_emulator.h>
 #include <palacios/svm_msr.h>
 #include <palacios/vmm_hypercall.h>
+#include <palacios/vmm_cpuid.h>
 #include <palacios/vmm_direct_paging.h>
 
 #ifdef CONFIG_TELEMETRY
@@ -139,6 +140,7 @@ int v3_handle_svm_exit(struct guest_info * info) {
            break;
        }
        case VMEXIT_MSR:
+
            if (guest_ctrl->exit_info1 == 0) {
                if (v3_handle_msr_read(info) == -1) {
                    return -1;
@@ -153,6 +155,14 @@ int v3_handle_svm_exit(struct guest_info * info) {
            }
                
            break;
+
+       case VMEXIT_CPUID:
+           if (v3_handle_cpuid(info) == -1) {
+               PrintError("Error handling CPUID\n");
+               return -1;
+           }
+
+           break;
        case VMEXIT_CR0_WRITE: 
 #ifdef CONFIG_DEBUG_CTRL_REGS
            PrintDebug("CR0 Write\n");
@@ -264,7 +274,7 @@ int v3_handle_svm_exit(struct guest_info * info) {
 #ifdef CONFIG_DEBUG_HALT
            PrintDebug("Guest halted\n");
 #endif
-           if (v3_handle_svm_halt(info) == -1) {
+           if (v3_handle_halt(info) == -1) {
                return -1;
            }
            break;