X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_handler.c;h=171d2b521a3d2f7b5aa8daf17fa5dd896c77d6dc;hb=a0d3be5212e7a5053ba213ce7bd26c7124cf01e3;hp=dbca7a84c0c373a018f4f4375f218f7d8906f0a4;hpb=cfcc5717f659b3ed2954f41cf363d3bceae8dc84;p=palacios.git diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index dbca7a8..171d2b5 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -34,16 +34,21 @@ #include #include +#ifndef CONFIG_DEBUG_SVM +#undef PrintDebug +#define PrintDebug(fmt, args...) +#endif #ifdef CONFIG_TELEMETRY #include #endif + int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_info1, addr_t exit_info2) { #ifdef CONFIG_TELEMETRY - if (info->enable_telemetry) { + if (info->vm_info->enable_telemetry) { v3_telemetry_start_exit(info); } #endif @@ -241,9 +246,24 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i return -1; } break; - - - + case VMEXIT_RDTSC: +#ifdef CONFIG_DEBUG_TIME + PrintDebug("RDTSC/RDTSCP\n"); +#endif + if (v3_handle_rdtsc(info) == -1) { + PrintError("Error Handling RDTSC instruction\n"); + return -1; + } + break; + case VMEXIT_RDTSCP: +#ifdef CONFIG_DEBUG_TIME + PrintDebug("RDTSCP\n"); +#endif + if (v3_handle_rdtscp(info) == -1) { + PrintError("Error Handling RDTSCP instruction\n"); + return -1; + } + break; /* Exits Following this line are NOT HANDLED */ @@ -282,7 +302,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i // END OF SWITCH (EXIT_CODE) #ifdef CONFIG_TELEMETRY - if (info->enable_telemetry) { + if (info->vm_info->enable_telemetry) { v3_telemetry_end_exit(info, exit_code); } #endif