Inherited by vcpu_factory_ut.
Public Member Functions | |
vcpu_factory () noexcept=default | |
virtual | ~vcpu_factory ()=default |
virtual std::unique_ptr< vcpu > | make_vcpu (vcpuid::type vcpuid, user_data *data=nullptr) |
vCPU Factory
This class is used by the vcpu_manager to create vCPUs. Specifically, this class provides a seem that allows users of Bareflank to replace the default vCPU with their own, custom vCPUs that extend the functionality of Bareflank above and beyond what is already provided. This seems also provides a means to unit test the vcpu_manager.
To provide custom logic, define your own make_vcpu function, in your own vcpu_factory module, and load your module instead of the module that is provided by Bareflank. For an example of how to do this, please see:
Bareflank Hypervisor VPID Example
Bareflank Hypervisor CPUID Example
Definition at line 48 of file vcpu_factory.h.
|
defaultnoexcept |
Default Constructor
|
virtualdefault |
Destructor
|
virtual |
Make vCPU
vcpuid | the vcpuid for the vcpu to create |
data | user data passed to the vcpu |
Definition at line 26 of file vcpu_factory_intel_x64.cpp.