X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_handler.c;h=91c0440e769019d102b0f1c6109e2eb043179a3c;hb=623de2de1c4a31c29975867343b7a78962094fee;hp=a4b059703c1db009242b754c6bc6c9cd48c57a59;hpb=3574c981404a1c812d369132db09ec2a27d59a5d;p=palacios-OLD.git diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index a4b0597..91c0440 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -31,6 +31,7 @@ #include #include #include +#include @@ -271,6 +272,22 @@ int v3_handle_svm_exit(struct guest_info * info) { */ break; } + + + + case VMEXIT_VMMCALL: + { + /* + * Hypercall + */ + + if (v3_handle_hypercall(info) == -1) { + return -1; + } + break; + } + + case VMEXIT_INTR: { // handled by interrupt dispatch earlier @@ -300,56 +317,6 @@ int v3_handle_svm_exit(struct guest_info * info) { break; -#if 0 - // Emulation handlers currently not used - case VMEXIT_EXCP1: - { -#ifdef DEBUG_EMULATOR - PrintDebug("DEBUG EXCEPTION\n"); -#endif - if (info->run_state == VM_EMULATING) { - if (v3_emulation_exit_handler(info) == -1) { - return -1; - } - } else { - PrintError("VMMCALL with not emulator...\n"); - return -1; - } - break; - } - - - case VMEXIT_VMMCALL: - { -#ifdef DEBUG_EMULATOR - PrintDebug("VMMCALL\n"); -#endif - if (info->run_state == VM_EMULATING) { - if (v3_emulation_exit_handler(info) == -1) { - return -1; - } - } else { - /* - ulong_t tsc_spread = 0; - ullong_t exit_tsc = 0; - - ulong_t rax = (ulong_t)info->vm_regs.rbx; - ulong_t rdx = (ulong_t)info->vm_regs.rcx; - - *(ulong_t *)(&exit_tsc) = rax; - *(((ulong_t *)(&exit_tsc)) + 1) = rdx; - - tsc_spread = info->exit_tsc - exit_tsc; - - PrintError("VMMCALL tsc diff = %lu\n",tsc_spread); - info->rip += 3; - */ - PrintError("VMMCALL with not emulator...\n"); - return -1; - } - break; - } -#endif case VMEXIT_WBINVD: