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
impl crosvm
pub(crate) fn from_connection(socket: UnixDatagram) -> Result<crosvm, c_int>
pub(crate) fn new( id_allocator: Arc<IdAllocator>, socket: UnixDatagram, vcpus: Arc<[crosvm_vcpu]> ) -> crosvm
pub(crate) fn get_id_allocator(&self) -> &IdAllocator
pub(crate) fn main_transaction( &mut self, request: &MainRequest, fds: &[RawFd] ) -> Result<(MainResponse, Vec<File>), c_int>
pub(crate) fn try_clone(&mut self) -> Result<crosvm, c_int>
pub(crate) fn destroy(&mut self, id: u32) -> Result<(), c_int>
pub(crate) fn load_all_vcpus(&mut self) -> Result<(), c_int>
pub(crate) fn get_shutdown_event(&mut self) -> Result<File, c_int>
pub(crate) fn check_extension(&mut self, extension: u32) -> Result<bool, c_int>
pub(crate) fn get_supported_cpuid( &mut self, cpuid_entries: &mut [kvm_cpuid_entry2], cpuid_count: &mut usize ) -> Result<(), c_int>
pub(crate) fn get_emulated_cpuid( &mut self, cpuid_entries: &mut [kvm_cpuid_entry2], cpuid_count: &mut usize ) -> Result<(), c_int>
pub(crate) fn get_msr_index_list( &mut self, msr_indices: &mut [u32], msr_count: &mut usize ) -> Result<(), c_int>
pub(crate) fn reserve_range( &mut self, space: u32, start: u64, length: u64, async_write: bool ) -> Result<(), c_int>
pub(crate) fn set_irq(&mut self, irq_id: u32, active: bool) -> Result<(), c_int>
pub(crate) fn set_irq_routing( &mut self, routing: &[crosvm_irq_route] ) -> Result<(), c_int>
pub(crate) fn set_hint( &mut self, space: u32, addr: u64, on_write: bool, hints: &[crosvm_hint_detail] ) -> 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_identity_map_addr(&mut self, addr: u32) -> Result<(), c_int>
pub(crate) fn pause_vcpus( &mut self, cpu_mask: u64, user: *mut c_void ) -> Result<(), c_int>
pub(crate) fn start(&mut self) -> Result<(), c_int>
pub(crate) fn get_vcpu( &mut self, cpu_id: u32 ) -> Result<*mut crosvm_vcpu, c_int>
pub(crate) fn get_net_config(&mut self) -> Result<crosvm_net_config, c_int>
Auto Trait Implementations§
impl RefUnwindSafe for crosvm
impl Send for crosvm
impl Sync for crosvm
impl Unpin for crosvm
impl UnwindSafe for crosvm
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