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

source

pub(crate) fn new(read_pipe: File, write_pipe: File) -> crosvm_vcpu

source

pub(crate) fn vcpu_send(&mut self, request: &VcpuRequest) -> Result<(), c_int>

source

pub(crate) fn vcpu_recv(&mut self) -> Result<VcpuResponse, c_int>

source

pub(crate) fn vcpu_transaction( &mut self, request: &VcpuRequest ) -> Result<VcpuResponse, c_int>

source

pub(crate) fn wait( &mut self, event: &mut crosvm_vcpu_event ) -> Result<(), c_int>

source

pub(crate) fn resume(&mut self) -> Result<(), c_int>

source

pub(crate) fn get_state( &mut self, state_set: StateSet, out: &mut [u8] ) -> Result<(), c_int>

source

pub(crate) fn set_state( &mut self, state_set: StateSet, new_state: &[u8] ) -> Result<(), c_int>

source

pub(crate) fn set_state_from_cache( &mut self, state_set: StateSet ) -> Result<(), c_int>

source

pub(crate) fn get_hyperv_cpuid( &mut self, cpuid_entries: &mut [kvm_cpuid_entry2], cpuid_count: &mut usize ) -> Result<(), c_int>

source

pub(crate) fn get_msrs( &mut self, msr_entries: &mut [kvm_msr_entry], msr_count: &mut usize ) -> Result<(), c_int>

source

pub(crate) fn set_msrs( &mut self, msr_entries: &[kvm_msr_entry] ) -> Result<(), c_int>

source

pub(crate) fn set_cpuid( &mut self, cpuid_entries: &[kvm_cpuid_entry2] ) -> Result<(), c_int>

source

pub(crate) fn enable_capability(&mut self, capability: u32) -> Result<(), c_int>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.