return 0;
}
+
+int v3_deinit_vmx_vmcs(struct guest_info * core) {
+ struct vmx_data * vmx_state = core->vmm_data;
+
+ V3_FreePages((void *)(vmx_state->vmcs_ptr_phys), 1);
+
+ V3_Free(vmx_state);
+
+ return 0;
+}
+
+
static int update_irq_exit_state(struct guest_info * info) {
struct vmx_exit_idt_vec_info idt_vec_info;
// Conditionally yield the CPU if the timeslice has expired
v3_yield_cond(info);
+ /* If this guest is frequency-lagged behind host time, wait
+ * for the appropriate host time before resuming the guest. */
+ v3_adjust_time(info);
+
// v3_print_guest_state(info);
// disable global interrupts for vm state transition
v3_update_timers(info);
- /* If this guest is frequency-lagged behind host time, wait
- * for the appropriate host time before resuming the guest. */
- v3_adjust_time(info);
-
tsc_offset_high = (uint32_t)((v3_tsc_host_offset(&info->time_state) >> 32) & 0xffffffff);
tsc_offset_low = (uint32_t)(v3_tsc_host_offset(&info->time_state) & 0xffffffff);
check_vmcs_write(VMCS_TSC_OFFSET_HIGH, tsc_offset_high);