Turnstone Operating System
Loading...
Searching...
No Matches
hypervisor_svm_vmexit.64.c File Reference

SVM VMEXIT handler for 64-bit x86 architecture. More...

#include <hypervisor/hypervisor_svm_vmcb_ops.h>
#include <hypervisor/hypervisor_svm_macros.h>
#include <hypervisor/hypervisor_utils.h>
#include <hypervisor/hypervisor_ept.h>
#include <hypervisor/hypervisor_ipc.h>
#include <memory/paging.h>
#include <cpu.h>
#include <cpu/task.h>
#include <apic.h>
#include <cpu/crx.h>
#include <logging.h>
#include <ports.h>
#include <strings.h>
#include <time/timer.h>

Typedefs

typedef int8_t(* hypervisor_svm_vmexit_handler_f) (hypervisor_vm_t *vm)
 

Functions

 MODULE ("turnstone.hypervisor.svm")
 
static void hypervisor_svm_vm_run_single (task_registers_t *host_registers, task_registers_t *guest_registers, uint64_t vmcb_frame_fa)
 
static void hypervisor_svm_wait_idle (void)
 
static void hypervisor_svm_goto_next_instruction (hypervisor_vm_t *vm)
 
static int8_t hypervisor_svm_vmexit_handler_intr (hypervisor_vm_t *vm)
 
static int8_t hypervisor_svm_vmexit_handler_hlt (hypervisor_vm_t *vm)
 
static int8_t hypervisor_svm_vmexit_handler_pause (hypervisor_vm_t *vm)
 
static int8_t hypervisor_svm_vmexit_handler_cpuid (hypervisor_vm_t *vm)
 
static int8_t hypervisor_svm_vmexit_handle_eoi (hypervisor_vm_t *vm)
 
static int8_t hypervisor_svm_vmexit_handler_msr (hypervisor_vm_t *vm)
 
static int8_t hypervisor_svm_vmexit_handler_vmmcall (hypervisor_vm_t *vm)
 
static void hypervisor_svm_io_fast_string_printf_io (hypervisor_vm_t *vm)
 
static int8_t hypervisor_svm_vmexit_handler_ioio (hypervisor_vm_t *vm)
 
static int8_t hypervisor_svm_vmexit_handler_excp14 (hypervisor_vm_t *vm)
 
static uint64_t hypervisor_svm_vmexit_remap_exit_code (uint64_t exit_code)
 
static int8_t hypervisor_svm_dump_vmcb (hypervisor_vm_t *vm)
 
int8_t hypervisor_svm_vm_run (uint64_t hypervisor_vm_ptr)
 

Variables

hypervisor_svm_vmexit_handler_f hypervisor_svm_vmexit_handlers [SVM_VMEXIT_REASON_ARRAY_SIZE]
 

Detailed Description

SVM VMEXIT handler for 64-bit x86 architecture.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Variable Documentation

◆ hypervisor_svm_vmexit_handlers

hypervisor_svm_vmexit_handler_f hypervisor_svm_vmexit_handlers[SVM_VMEXIT_REASON_ARRAY_SIZE]
Initial value:
= {
[SVM_VMEXIT_REASON_INTR] = hypervisor_svm_vmexit_handler_intr,
[SVM_VMEXIT_REASON_HLT] = hypervisor_svm_vmexit_handler_hlt,
[SVM_VMEXIT_REASON_PAUSE] = hypervisor_svm_vmexit_handler_pause,
[SVM_VMEXIT_REASON_CPUID] = hypervisor_svm_vmexit_handler_cpuid,
[SVM_VMEXIT_REASON_MSR] = hypervisor_svm_vmexit_handler_msr,
[SVM_VMEXIT_REASON_VMMCALL] = hypervisor_svm_vmexit_handler_vmmcall,
[SVM_VMEXIT_REASON_IOIO] = hypervisor_svm_vmexit_handler_ioio,
[SVM_VMEXIT_REASON_EXCP14] = hypervisor_svm_vmexit_handler_excp14,
}