mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-19 13:42:55 +00:00
Prepare exception handling
This commit is contained in:
parent
761490c808
commit
d5bf81d99b
@ -46,8 +46,8 @@ namespace
|
|||||||
|
|
||||||
void enable_syscall_hooking()
|
void enable_syscall_hooking()
|
||||||
{
|
{
|
||||||
int32_t cpu_info[4]{0};
|
//int32_t cpu_info[4]{0};
|
||||||
__cpuidex(cpu_info, 0x41414141, 0x42424243);
|
//__cpuidex(cpu_info, 0x41414141, 0x42424243);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpature_special_registers(vmx::special_registers& special_registers)
|
void cpature_special_registers(vmx::special_registers& special_registers)
|
||||||
@ -460,6 +460,12 @@ void vmx_handle_invd()
|
|||||||
__wbinvd();
|
__wbinvd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void vmx_handle_exception(vmx::guest_context& guest_context)
|
||||||
|
{
|
||||||
|
(void)guest_context;
|
||||||
|
read_vmx(VMCS_VMEXIT_INTERRUPTION_INFORMATION);
|
||||||
|
debug_log("MABEA SYSCALL :D\n");
|
||||||
|
}
|
||||||
|
|
||||||
bool is_system()
|
bool is_system()
|
||||||
{
|
{
|
||||||
@ -587,6 +593,9 @@ void vmx_dispatch_vm_exit(vmx::guest_context& guest_context, const vmx::state& v
|
|||||||
case VMX_EXIT_REASON_EPT_MISCONFIGURATION:
|
case VMX_EXIT_REASON_EPT_MISCONFIGURATION:
|
||||||
vm_state.ept->handle_misconfiguration(guest_context);
|
vm_state.ept->handle_misconfiguration(guest_context);
|
||||||
break;
|
break;
|
||||||
|
case VMX_EXIT_REASON_EXCEPTION_OR_NMI:
|
||||||
|
vmx_handle_exception(guest_context);
|
||||||
|
break;
|
||||||
//case VMX_EXIT_REASON_EXECUTE_RDTSC:
|
//case VMX_EXIT_REASON_EXECUTE_RDTSC:
|
||||||
// break;
|
// break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user