X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_handler.c;h=94e3c8c47bb7181e5b0c75b91c3fa3d9aad3262b;hb=e70e95962c26832628d586e07f9cd1a2e1852d72;hp=8a1a32fb69b5b08bb6979e38fdb470994b01e09e;hpb=191587141ec414547ca95a7eb134a8cbb1b2a292;p=palacios.git diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index 8a1a32f..94e3c8c 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -1,3 +1,23 @@ +/* + * This file is part of the Palacios Virtual Machine Monitor developed + * by the V3VEE Project with funding from the United States National + * Science Foundation and the Department of Energy. + * + * The V3VEE Project is a joint project between Northwestern University + * and the University of New Mexico. You can find out more at + * http://www.v3vee.org + * + * Copyright (c) 2008, Jack Lange + * Copyright (c) 2008, The V3VEE Project + * All rights reserved. + * + * Author: Jack Lange + * + * This is free software. You are permitted to use, + * redistribute, and modify it as specified in the file "V3VEE_LICENSE". + */ + + #include #include #include @@ -258,6 +278,21 @@ int handle_svm_exit(struct guest_info * info) { 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; } @@ -452,7 +487,6 @@ int handle_svm_exit(struct guest_info * info) { const uchar_t * vmexit_code_to_str(uint_t exit_code) { - switch(exit_code) { case VMEXIT_CR0_READ: return VMEXIT_CR0_READ_STR;