Struct crosvm_plugin::crosvm

source ·
pub struct crosvm {
    pub(crate) id_allocator: Arc<IdAllocator>,
    pub(crate) socket: ScmSocket<UnixDatagram>,
    pub(crate) request_buffer: Vec<u8>,
    pub(crate) response_buffer: Vec<u8>,
    pub(crate) vcpus: Arc<[crosvm_vcpu]>,
}

Fields§

§id_allocator: Arc<IdAllocator>§socket: ScmSocket<UnixDatagram>§request_buffer: Vec<u8>§response_buffer: Vec<u8>§vcpus: Arc<[crosvm_vcpu]>

Implementations§

source§

impl crosvm

source

pub(crate) fn from_connection(socket: UnixDatagram) -> Result<crosvm, c_int>

source

pub(crate) fn new( id_allocator: Arc<IdAllocator>, socket: UnixDatagram, vcpus: Arc<[crosvm_vcpu]> ) -> crosvm

source

pub(crate) fn get_id_allocator(&self) -> &IdAllocator

source

pub(crate) fn main_transaction( &mut self, request: &MainRequest, fds: &[RawFd] ) -> Result<(MainResponse, Vec<File>), c_int>

source

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

source

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

source

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

source

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

source

pub(crate) fn check_extension(&mut self, extension: u32) -> Result<bool, c_int>

source

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

source

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

source

pub(crate) fn get_msr_index_list( &mut self, msr_indices: &mut [u32], msr_count: &mut usize ) -> Result<(), c_int>

source

pub(crate) fn reserve_range( &mut self, space: u32, start: u64, length: u64, async_write: bool ) -> Result<(), c_int>

source

pub(crate) fn set_irq(&mut self, irq_id: u32, active: bool) -> Result<(), c_int>

source

pub(crate) fn set_irq_routing( &mut self, routing: &[crosvm_irq_route] ) -> Result<(), c_int>

source

pub(crate) fn set_hint( &mut self, space: u32, addr: u64, on_write: bool, hints: &[crosvm_hint_detail] ) -> 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_identity_map_addr(&mut self, addr: u32) -> Result<(), c_int>

source

pub(crate) fn pause_vcpus( &mut self, cpu_mask: u64, user: *mut c_void ) -> Result<(), c_int>

source

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

source

pub(crate) fn get_vcpu( &mut self, cpu_id: u32 ) -> Result<*mut crosvm_vcpu, c_int>

source

pub(crate) fn get_net_config(&mut self) -> Result<crosvm_net_config, 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.