X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_handler.c;h=8424137f3d9e68c534313819e058268a0d54aaf7;hb=362391accc505b29d938e9d0a21bf6a28a8cee34;hp=8495a170c36226197d7f8c8faf946221f277631b;hpb=5b6278751429f59297ce74e614d50632daea3748;p=palacios.git diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index 8495a17..8424137 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -30,11 +30,10 @@ #include #include #include +#include -static const uchar_t * vmexit_code_to_str(uint_t exit_code); - int v3_handle_svm_exit(struct guest_info * info) { vmcb_ctrl_t * guest_ctrl = 0; @@ -69,7 +68,10 @@ int v3_handle_svm_exit(struct guest_info * info) { exit_code = guest_ctrl->exit_code; - + + + + // Disable printing io exits due to bochs debug messages //if (!((exit_code == VMEXIT_IOIO) && ((ushort_t)(guest_ctrl->exit_info1 >> 16) == 0x402))) { @@ -106,12 +108,10 @@ int v3_handle_svm_exit(struct guest_info * info) { } - // } - // PrintDebugVMCB((vmcb_t*)(info->vmm_data)); - - // PrintDebug("SVM Returned:(VMCB=%x)\n", info->vmm_data); - //PrintDebug("RIP: %x\n", guest_state->rip); + if (info->enable_profiler) { + rdtscll(info->profiler.start_time); + } //PrintDebug("SVM Returned: Exit Code: %x\n",exit_code); @@ -293,6 +293,9 @@ int v3_handle_svm_exit(struct guest_info * info) { } break; + +#if 0 + // Emulation handlers currently not used case VMEXIT_EXCP1: { #ifdef DEBUG_EMULATOR @@ -308,7 +311,7 @@ int v3_handle_svm_exit(struct guest_info * info) { } break; } - + case VMEXIT_VMMCALL: { @@ -340,7 +343,7 @@ int v3_handle_svm_exit(struct guest_info * info) { } break; } - +#endif case VMEXIT_WBINVD: @@ -426,6 +429,13 @@ int v3_handle_svm_exit(struct guest_info * info) { // END OF SWITCH (EXIT_CODE) + if (info->enable_profiler) { + rdtscll(info->profiler.end_time); + v3_profile_exit(info, exit_code); + } + + + // Update the low level state if (v3_intr_pending(info)) {