Public Types | |
using | ret_type = int64_t |
Public Member Functions | |
exit_handler_intel_x64 () | |
virtual | ~exit_handler_intel_x64 ()=default |
virtual void | dispatch () |
virtual void | halt () noexcept |
virtual void | complete_vmcall (ret_type ret, vmcall_registers_t ®s) noexcept |
virtual void | set_vmcs (gsl::not_null< vmcs_intel_x64 *> vmcs) |
virtual void | set_state_save (gsl::not_null< state_save_intel_x64 *> state_save) |
Data Fields | |
vmcs_intel_x64 * | m_vmcs |
state_save_intel_x64 * | m_state_save |
Exit Handler
This class is responsible for detecting why a guest exited (i.e. stopped its execution), and dispatches the appropriated handler to emulate the instruction that could not execute. Note that this class could be executed a lot, so performance is key here.
This class works with the VMCS class to provide the bare minimum exit handler needed to execute a 64bit guest, with the TRUE controls being used. In general, the only instruction that needs to be emulated is the CPUID instruction. If more functionality is needed (which is likely), the user can subclass this class, and overload the handlers that are needed. The basics are provided with this class to ease development.
Definition at line 52 of file exit_handler_intel_x64.h.
using exit_handler_intel_x64::ret_type = int64_t |
Definition at line 56 of file exit_handler_intel_x64.h.
exit_handler_intel_x64::exit_handler_intel_x64 | ( | ) |
Default Constructor
Definition at line 52 of file exit_handler_intel_x64.cpp.
|
virtualdefault |
Destructor
|
virtual |
Dispatch
Called when a VM exit needs to be handled. This function will decode the exit reason, and dispatch the correct handler.
Definition at line 58 of file exit_handler_intel_x64.cpp.
|
virtualnoexcept |
Halt
Called when the exit handler needs to halt the CPU. This would mainly be due to an error.
Definition at line 62 of file exit_handler_intel_x64.cpp.
|
virtualnoexcept |
Complete VMCall
Completes a VMCall given a set of previously setup registers. Note that most of the time you should not need to run this function as a vmcall will call this for you. If however your VMCall never returns and state is lost, you can complete the VMCall at a later time using this function. Special care should be taken to ensure the proper register values are maintained.
ret | BF_VMCALL_SUCCESS on success, failure otherwise |
regs | the register state to return |
Definition at line 232 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 103 of file exit_handler_intel_x64.cpp.
|
protected |
Definition at line 140 of file exit_handler_intel_x64.cpp.
|
protected |
Definition at line 156 of file exit_handler_intel_x64.cpp.
|
protected |
Definition at line 163 of file exit_handler_intel_x64.cpp.
|
protected |
Definition at line 261 of file exit_handler_intel_x64.cpp.
|
protected |
Definition at line 265 of file exit_handler_intel_x64.cpp.
|
protected |
Definition at line 337 of file exit_handler_intel_x64.cpp.
|
protectednoexcept |
Definition at line 391 of file exit_handler_intel_x64.cpp.
|
protectednoexcept |
Definition at line 395 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 439 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 467 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 484 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 529 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 536 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 540 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 27 of file exit_handler_intel_x64_unittests.cpp.
|
protectedvirtual |
Definition at line 544 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 552 of file exit_handler_intel_x64.cpp.
|
protectedvirtual |
Definition at line 560 of file exit_handler_intel_x64.cpp.
|
protected |
Definition at line 568 of file exit_handler_intel_x64.cpp.
|
protected |
Definition at line 581 of file exit_handler_intel_x64.cpp.
|
inlinevirtual |
Definition at line 158 of file exit_handler_intel_x64.h.
|
inlinevirtual |
Definition at line 161 of file exit_handler_intel_x64.h.
vmcs_intel_x64* exit_handler_intel_x64::m_vmcs |
Definition at line 155 of file exit_handler_intel_x64.h.
state_save_intel_x64* exit_handler_intel_x64::m_state_save |
Definition at line 156 of file exit_handler_intel_x64.h.