uint64_t guest_cycles = 0;
// Conditionally yield the CPU if the timeslice has expired
- v3_yield_cond(info,-1);
+ v3_schedule(info);
// Update timer devices late after being in the VM so that as much
// of the time in the VM is accounted for as possible. Also do it before
uint64_t entry_tsc = 0;
uint64_t exit_tsc = 0;
+#ifdef V3_CONFIG_PMU_TELEMETRY
+ v3_pmu_telemetry_enter(info);
+#endif
+
if (vmx_info->state == VMX_UNLAUNCHED) {
vmx_info->state = VMX_LAUNCHED;
rdtscll(entry_tsc);
}
guest_cycles = exit_tsc - entry_tsc;
+
+#ifdef V3_CONFIG_PMU_TELEMETRY
+ v3_pmu_telemetry_exit(info);
+#endif
}
// PrintDebug(info->vm_info, info, "VMX Exit: ret=%d\n", ret);
v3_enable_ints();
// Conditionally yield the CPU if the timeslice has expired
- v3_yield_cond(info,-1);
+ v3_schedule(info);
v3_advance_time(info, NULL);
v3_update_timers(info);
v3_start_time(info);
+#ifdef V3_CONFIG_PMU_TELEMETRY
+ v3_pmu_telemetry_start(info);
+#endif
+
while (1) {
if (info->vm_info->run_state == VM_STOPPED) {
}
+#ifdef V3_CONFIG_PMU_TELEMETRY
+ v3_pmu_telemetry_end(info);
+#endif
+
return 0;
}