| 2510 | _IRQL_requires_same_ |
| 2511 | _IRQL_requires_min_(HIGH_LEVEL) |
| 2512 | extern "C" VMM_STATUS VmxVmexitHandler(PRIVATE_VM_DATA* Private, __inout GUEST_CONTEXT* Context) |
| 2513 | { |
| 2514 | /* Interrupts are locked */ |
| 2515 | |
| 2516 | unsigned long long Rip = vmread(VMX::VMCS_FIELD_GUEST_RIP); |
| 2517 | |
| 2518 | EXIT_REASON ExitReason = {}; |
| 2519 | ExitReason.Value = static_cast<unsigned int>(vmread(VMX::VMCS_FIELD_EXIT_REASON)); |
| 2520 | |
| 2521 | bool RepeatInstruction = false; |
| 2522 | |
| 2523 | VMM_STATUS Status = VmexitHandlers::HandlersTable[ExitReason.Bitmap.BasicExitReason](Private, Context, Rip, RepeatInstruction); |
| 2524 | |
| 2525 | if (!RepeatInstruction) |
| 2526 | { |
| 2527 | // Go to the next instruction: |
| 2528 | Rip += vmread(VMX::VMCS_FIELD_VMEXIT_INSTRUCTION_LENGTH); |
| 2529 | __vmx_vmwrite(VMX::VMCS_FIELD_GUEST_RIP, Rip); |
| 2530 | } |
| 2531 | |
| 2532 | return Status; |
| 2533 | } |
| 2534 | |
| 2535 | static void DbgPrintMtrrEptCacheLayout(__in const EPT_TABLES* Ept, __in const MTRR_INFO* MtrrInfo) |
| 2536 | { |