#include <palacios/vmx_assist.h>
#include <palacios/vmm_halt.h>
+#ifndef CONFIG_DEBUG_VMX
+#undef PrintDebug
+#define PrintDebug(fmt, args...)
+#endif
+
#ifdef CONFIG_TELEMETRY
#include <palacios/vmm_telemetry.h>
#endif
-
/* At this point the GPRs are already copied into the guest_info state */
int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_info) {
struct vmx_data * vmx_info = (struct vmx_data *)(info->vmm_data);
v3_print_vmcs();
*/
+
#ifdef CONFIG_TELEMETRY
- if (info->enable_telemetry) {
+ if (info->vm_info->enable_telemetry) {
v3_telemetry_start_exit(info);
}
#endif
}
break;
+
+ case VMEXIT_RDTSC:
+#ifdef CONFIG_DEBUG_TIME
+ PrintDebug("RDTSC\n");
+#endif
+ if (v3_handle_rdtsc(info) == -1) {
+ PrintError("Error Handling RDTSC instruction\n");
+ return -1;
+ }
+
+ break;
+
case VMEXIT_CPUID:
if (v3_handle_cpuid(info) == -1) {
PrintError("Error Handling CPUID instruction\n");
return -1;
}
+
#ifdef CONFIG_TELEMETRY
- if (info->enable_telemetry) {
+ if (info->vm_info->enable_telemetry) {
v3_telemetry_end_exit(info, exit_info->exit_reason);
}
#endif
+
return 0;
}