Struct hypervisor::vCPU
[−]
[src]
pub struct vCPU { pub id: u32, }
Virtual CPU
Fields
id: u32
Virtual CPU ID
Methods
impl vCPU
[src]
fn new() -> Result<vCPU, Error>
Creates a vCPU instance for the current thread
fn destroy(&self) -> Error
Destroys the vCPU instance associated with the current thread
fn run(&self) -> Error
Executes the vCPU
fn interrupt(&self) -> Error
Forces an immediate VMEXIT of the vCPU
fn exec_time(&self) -> Result<u64, Error>
Returns the cumulative execution time of the vCPU in nanoseconds
fn flush(&self) -> Error
Forces flushing of cached vCPU state
fn invalidate_tlb(&self) -> Error
Invalidates the translation lookaside buffer (TLB) of the vCPU
fn enable_native_msr(&self, msr: u32, enable: bool) -> Error
Enables an MSR to be used natively by the VM
fn read_msr(&self, msr: u32) -> Result<u64, Error>
Returns the current value of an MSR of the vCPU
fn write_msr(&self, msr: u32, value: u64) -> Error
Set the value of an MSR of the vCPU
fn read_register(&self, reg: &x86Reg) -> Result<u64, Error>
Returns the current value of an architectural x86 register of the vCPU
fn write_register(&self, reg: &x86Reg, value: u64) -> Error
Sets the value of an architectural x86 register of the vCPU
fn read_vmcs(&self, field: u32) -> Result<u64, Error>
Returns the current value of a VMCS field of the vCPU
fn write_vmcs(&self, field: u32, value: u64) -> Error
Sets the value of a VMCS field of the vCPU
fn set_apic_addr(&self, gpa: u64) -> Error
Sets the address of the guest APIC for the vCPU in the guest physical address space of the VM
fn read_fpstate(&self, buffer: &mut [u8]) -> Error
Reads the current architectural x86 floating point and SIMD state of the vCPU
fn write_fpstate(&self, buffer: &[u8]) -> Error
Sets the architectural x86 floating point and SIMD state of the vCPU