Public Member Functions | |
vcpu_intel_x64 (vcpuid::type id, std::unique_ptr< debug_ring > debug_ring=nullptr, std::unique_ptr< vmxon_intel_x64 > vmxon=nullptr, std::unique_ptr< vmcs_intel_x64 > vmcs=nullptr, std::unique_ptr< exit_handler_intel_x64 > exit_handler=nullptr, std::unique_ptr< vmcs_intel_x64_state > vmm_state=nullptr, std::unique_ptr< vmcs_intel_x64_state > guest_state=nullptr) | |
~vcpu_intel_x64 () override=default | |
void | init (user_data *data=nullptr) override |
void | fini (user_data *data=nullptr) override |
void | run (user_data *data=nullptr) override |
void | hlt (user_data *data=nullptr) override |
vcpu_intel_x64 (vcpu_intel_x64 &&)=default | |
vcpu_intel_x64 & | operator= (vcpu_intel_x64 &&)=default |
vcpu_intel_x64 (const vcpu_intel_x64 &)=delete | |
vcpu_intel_x64 & | operator= (const vcpu_intel_x64 &)=delete |
Public Member Functions inherited from vcpu | |
vcpu (vcpuid::type id, std::unique_ptr< debug_ring > dr=nullptr) | |
virtual | ~vcpu ()=default |
virtual vcpuid::type | id () const |
virtual bool | is_running () |
virtual bool | is_initialized () |
virtual bool | is_bootstrap_vcpu () |
virtual bool | is_host_vm_vcpu () |
virtual bool | is_guest_vm_vcpu () |
virtual void | write (const std::string &str) noexcept |
vcpu (vcpu &&)=default | |
vcpu & | operator= (vcpu &&)=default |
vcpu (const vcpu &)=delete | |
vcpu & | operator= (const vcpu &)=delete |
Protected Attributes | |
std::unique_ptr< vmxon_intel_x64 > | m_vmxon |
std::unique_ptr< vmcs_intel_x64 > | m_vmcs |
std::unique_ptr< exit_handler_intel_x64 > | m_exit_handler |
std::unique_ptr< state_save_intel_x64 > | m_state_save |
std::unique_ptr< vmcs_intel_x64_state > | m_vmm_state |
std::unique_ptr< vmcs_intel_x64_state > | m_guest_state |
Virtual CPU (Intel x86_64)
The Virtual CPU represents a "CPU" to the hypervisor that is specific to Intel x86_64.
This Intel specific vCPU class provides all of the functionality of the base vCPU, but also adds classes specific to Intel's VT-x including the vmxon_intel_x64, vmcs_intel_x64, exit_handler_intel_x64 and intrinsics_intel_x64 classes.
Note that these should not be created directly, but instead should be created by the vcpu_manager, which uses the vcpu_factory to actually create a vcpu.
Definition at line 48 of file vcpu_intel_x64.h.
vcpu_intel_x64::vcpu_intel_x64 | ( | vcpuid::type | id, |
std::unique_ptr< debug_ring > | debug_ring = nullptr , |
||
std::unique_ptr< vmxon_intel_x64 > | vmxon = nullptr , |
||
std::unique_ptr< vmcs_intel_x64 > | vmcs = nullptr , |
||
std::unique_ptr< exit_handler_intel_x64 > | exit_handler = nullptr , |
||
std::unique_ptr< vmcs_intel_x64_state > | vmm_state = nullptr , |
||
std::unique_ptr< vmcs_intel_x64_state > | guest_state = nullptr |
||
) |
Constructor
Creates a vCPU with the provided resources. This constructor provides a means to override and repalce the internal resources of the vCPU. Note that if one of the resources is set to NULL, a default will be constructed in its place, providing a means to select which internal components to override.
id | the id of the vcpu |
debug_ring | the debug ring the vcpu should use. If you provide nullptr, a default debug ring will be created. |
vmxon | the vmxon the vcpu should use. If you provide nullptr, a default vmxon will be created. |
vmcs | the vmcs the vcpu should use. If you provide nullptr, a default vmcs will be created. |
exit_handler | the exit handler the vcpu should use. If you provide nullptr, a default exit handler will be created. |
vmm_state | the vmm state the vcpu should use. If you provide nullptr, a default vmm state will be created. |
guest_state | the guest state the vcpu should use. If you provide nullptr, a default guest state will be created. |
Definition at line 25 of file vcpu_intel_x64.cpp.
|
overridedefault |
Destructor
|
default |
|
delete |
|
overridevirtual |
Init vCPU
Reimplemented from vcpu.
Definition at line 44 of file vcpu_intel_x64.cpp.
|
overridevirtual |
Fini vCPU
Reimplemented from vcpu.
Definition at line 81 of file vcpu_intel_x64.cpp.
|
overridevirtual |
Run vCPU
Reimplemented from vcpu.
Definition at line 85 of file vcpu_intel_x64.cpp.
|
overridevirtual |
Halt vCPU
Reimplemented from vcpu.
Definition at line 120 of file vcpu_intel_x64.cpp.
|
default |
|
delete |
|
protected |
Definition at line 132 of file vcpu_intel_x64.h.
|
protected |
Definition at line 133 of file vcpu_intel_x64.h.
|
protected |
Definition at line 134 of file vcpu_intel_x64.h.
|
protected |
Definition at line 135 of file vcpu_intel_x64.h.
|
protected |
Definition at line 136 of file vcpu_intel_x64.h.
|
protected |
Definition at line 137 of file vcpu_intel_x64.h.