int_info.valid = 1;
#ifdef CONFIG_DEBUG_INTERRUPTS
- PrintDebug("Injecting exception %d (EIP=%p)\n", int_info.vector, (void *)info->rip);
+ PrintDebug("Injecting exception %d (EIP=%p)\n", int_info.vector, (void *)(addr_t)info->rip);
#endif
check_vmcs_write(VMCS_ENTRY_INT_INFO, int_info.value);
PrintDebug("Injecting Interrupt %d at exit %u(EIP=%p)\n",
info->intr_core_state.irq_vector,
(uint32_t)info->num_exits,
- (void *)info->rip);
+ (void *)(addr_t)info->rip);
#endif
check_vmcs_write(VMCS_ENTRY_INT_INFO, ent_int.value);
v3_vmx_restore_vmcs(info);
-#ifdef CONFIG_SYMBIOTIC
- if (info->sym_local_state.symcall_state.sym_call_active == 0) {
+#ifdef CONFIG_SYMCALL
+ if (info->sym_core_state.symcall_state.sym_call_active == 0) {
update_irq_entry_state(info);
}
#else
vmcs_write(VMCS_GUEST_CR3, guest_cr3);
}
+ // We do timer injection here to track real host time.
+ rdtscll(tmp_tsc);
+ v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc);
rdtscll(info->time_state.cached_host_tsc);
if (info->vm_info->run_state == VM_STOPPED) {
return -1;
}
- rdtscll(tmp_tsc);
+ // rdtscll(tmp_tsc);
+ // v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc);
info->num_exits++;
- v3_update_time(info, tmp_tsc - info->time_state.cached_host_tsc);
/* Update guest state */
v3_vmx_save_vmcs(info);
exit_log[info->num_exits % 10] = exit_info;
-#ifdef CONFIG_SYMBIOTIC
- if (info->sym_local_state.symcall_state.sym_call_active == 0) {
+#ifdef CONFIG_SYMCALL
+ if (info->sym_core_state.symcall_state.sym_call_active == 0) {
update_irq_exit_state(info);
}
#else
);
#elif __V3_32BIT__
__asm__ __volatile__ (
- "movq %%cr4, %%ecx;"
- "orq $0x00002000, %%ecx;"
- "movq %%ecx, %0;"
+ "movl %%cr4, %%ecx;"
+ "orl $0x00002000, %%ecx;"
+ "movl %%ecx, %0;"
: "=m"(ret)
:
: "%ecx"
if ((~ret & tmp_msr.value) == 0) {
__asm__ __volatile__ (
- "movq %0, %%cr4;"
+ "movl %0, %%cr4;"
:
: "q"(ret)
);
}
__asm__ __volatile__ (
- "movq %%cr0, %%ecx; "
- "orq $0x00000020,%%ecx; "
- "movq %%ecx, %%cr0;"
+ "movl %%cr0, %%ecx; "
+ "orl $0x00000020,%%ecx; "
+ "movl %%ecx, %%cr0;"
:
:
: "%ecx"