Struct crosvm_plugin::crosvm_vcpu
source · pub struct crosvm_vcpu {
pub(crate) read_pipe: File,
pub(crate) write_pipe: File,
pub(crate) send_init: bool,
pub(crate) request_buffer: Vec<u8>,
pub(crate) response_buffer: Vec<u8>,
pub(crate) response_base: usize,
pub(crate) response_length: usize,
pub(crate) resume_data: Vec<u8>,
pub(crate) regs: crosvm_vcpu_reg_cache,
pub(crate) sregs: crosvm_vcpu_reg_cache,
pub(crate) debugregs: crosvm_vcpu_reg_cache,
}
Fields§
§read_pipe: File
§write_pipe: File
§send_init: bool
§request_buffer: Vec<u8>
§response_buffer: Vec<u8>
§response_base: usize
§response_length: usize
§resume_data: Vec<u8>
§regs: crosvm_vcpu_reg_cache
§sregs: crosvm_vcpu_reg_cache
§debugregs: crosvm_vcpu_reg_cache
Implementations§
source§impl crosvm_vcpu
impl crosvm_vcpu
pub(crate) fn new(read_pipe: File, write_pipe: File) -> crosvm_vcpu
pub(crate) fn vcpu_send(&mut self, request: &VcpuRequest) -> Result<(), c_int>
pub(crate) fn vcpu_recv(&mut self) -> Result<VcpuResponse, c_int>
pub(crate) fn vcpu_transaction( &mut self, request: &VcpuRequest ) -> Result<VcpuResponse, c_int>
pub(crate) fn wait( &mut self, event: &mut crosvm_vcpu_event ) -> Result<(), c_int>
pub(crate) fn resume(&mut self) -> Result<(), c_int>
pub(crate) fn get_state( &mut self, state_set: StateSet, out: &mut [u8] ) -> Result<(), c_int>
pub(crate) fn set_state( &mut self, state_set: StateSet, new_state: &[u8] ) -> Result<(), c_int>
pub(crate) fn set_state_from_cache( &mut self, state_set: StateSet ) -> Result<(), c_int>
pub(crate) fn get_hyperv_cpuid( &mut self, cpuid_entries: &mut [kvm_cpuid_entry2], cpuid_count: &mut usize ) -> Result<(), c_int>
pub(crate) fn get_msrs( &mut self, msr_entries: &mut [kvm_msr_entry], msr_count: &mut usize ) -> Result<(), c_int>
pub(crate) fn set_msrs( &mut self, msr_entries: &[kvm_msr_entry] ) -> Result<(), c_int>
pub(crate) fn set_cpuid( &mut self, cpuid_entries: &[kvm_cpuid_entry2] ) -> Result<(), c_int>
pub(crate) fn enable_capability(&mut self, capability: u32) -> Result<(), c_int>
Auto Trait Implementations§
impl RefUnwindSafe for crosvm_vcpu
impl Send for crosvm_vcpu
impl Sync for crosvm_vcpu
impl Unpin for crosvm_vcpu
impl UnwindSafe for crosvm_vcpu
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more