mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-18 21:22:54 +00:00
Prepare exception handling
This commit is contained in:
parent
761490c808
commit
d5bf81d99b
@ -46,8 +46,8 @@ namespace
|
||||
|
||||
void enable_syscall_hooking()
|
||||
{
|
||||
int32_t cpu_info[4]{0};
|
||||
__cpuidex(cpu_info, 0x41414141, 0x42424243);
|
||||
//int32_t cpu_info[4]{0};
|
||||
//__cpuidex(cpu_info, 0x41414141, 0x42424243);
|
||||
}
|
||||
|
||||
void cpature_special_registers(vmx::special_registers& special_registers)
|
||||
@ -460,6 +460,12 @@ void vmx_handle_invd()
|
||||
__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()
|
||||
{
|
||||
@ -587,6 +593,9 @@ void vmx_dispatch_vm_exit(vmx::guest_context& guest_context, const vmx::state& v
|
||||
case VMX_EXIT_REASON_EPT_MISCONFIGURATION:
|
||||
vm_state.ept->handle_misconfiguration(guest_context);
|
||||
break;
|
||||
case VMX_EXIT_REASON_EXCEPTION_OR_NMI:
|
||||
vmx_handle_exception(guest_context);
|
||||
break;
|
||||
//case VMX_EXIT_REASON_EXECUTE_RDTSC:
|
||||
// break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user