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.


fixed paging callbacks to normalize calling convention
[palacios.git] / palacios / src / palacios / svm.c
index f5489c3..86424e9 100644 (file)
@@ -39,6 +39,8 @@
 
 #include <palacios/vmm_rbtree.h>
 
+#include <palacios/vmm_profiler.h>
+
 
 extern void v3_stgi();
 extern void v3_clgi();
@@ -352,7 +354,6 @@ static int start_svm_guest(struct guest_info *info) {
     ullong_t tmp_tsc;
     uint_t vm_cr_low = 0, vm_cr_high = 0;
 
-
     v3_enable_ints();
     v3_clgi();
 
@@ -384,10 +385,13 @@ static int start_svm_guest(struct guest_info *info) {
     v3_stgi();
 
 
-    if (num_exits % 25 == 0) {
+    if ((num_exits % 5000) == 0) {
       PrintDebug("SVM Exit number %d\n", num_exits);
+      if (info->enable_profiler) 
+       v3_print_profile(info);
     }
 
+
      
     if (v3_handle_svm_exit(info) != 0) {
       vmcb_ctrl_t * guest_ctrl = GET_VMCB_CTRL_AREA((vmcb_t*)(info->vmm_data));
@@ -416,10 +420,6 @@ static int start_svm_guest(struct guest_info *info) {
       }
       v3_print_GPRs(info);
 
-
-      
-
-
       PrintDebug("SVM Exit Code: %p\n", (void *)(addr_t)guest_ctrl->exit_code); 
       
       PrintDebug("exit_info1 low = 0x%.8x\n", *(uint_t*)&(guest_ctrl->exit_info1));
@@ -442,6 +442,7 @@ static int start_svm_guest(struct guest_info *info) {
 
       break;
     }
+
   }
   return 0;
 }
@@ -461,7 +462,7 @@ int v3_is_svm_capable() {
 
   v3_cpuid(CPUID_FEATURE_IDS, &eax, &ebx, &ecx, &edx);
   
-  PrintDebug("CPUID_FEATURE_IDS_ecx=0x%p\n", (void *)ecx);
+  PrintDebug("CPUID_FEATURE_IDS_ecx=%p\n", (void *)ecx);
 
   if ((ecx & CPUID_FEATURE_IDS_ecx_svm_avail) == 0) {
     PrintDebug("SVM Not Available\n");
@@ -476,7 +477,7 @@ int v3_is_svm_capable() {
 
       v3_cpuid(CPUID_SVM_REV_AND_FEATURE_IDS, &eax, &ebx, &ecx, &edx);
       
-      PrintDebug("CPUID_FEATURE_IDS_edx=0x%p\n", (void *)edx);
+      PrintDebug("CPUID_FEATURE_IDS_edx=%p\n", (void *)edx);
       
       if ((edx & CPUID_SVM_REV_AND_FEATURE_IDS_edx_svml) == 0) {
        PrintDebug("SVM BIOS Disabled, not unlockable\n");
@@ -489,8 +490,11 @@ int v3_is_svm_capable() {
       PrintDebug("SVM is available and  enabled.\n");
 
       v3_cpuid(CPUID_SVM_REV_AND_FEATURE_IDS, &eax, &ebx, &ecx, &edx);
-      
-      PrintDebug("CPUID_FEATURE_IDS_edx=0x%p\n", (void *)edx);
+      PrintDebug("CPUID_FEATURE_IDS_eax=%p\n", (void *)eax);
+      PrintDebug("CPUID_FEATURE_IDS_ebx=%p\n", (void *)ebx);
+      PrintDebug("CPUID_FEATURE_IDS_ecx=%p\n", (void *)ecx);      
+      PrintDebug("CPUID_FEATURE_IDS_edx=%p\n", (void *)edx);
+
 
       if ((edx & CPUID_SVM_REV_AND_FEATURE_IDS_edx_np) == 0) {
        PrintDebug("SVM Nested Paging not supported\n");