Skip to main content

AxVMConfig

Struct AxVMConfig 

Source
pub struct AxVMConfig {
    pub cpu_config: AxVCpuConfig,
    pub image_config: VMImageConfig,
    /* private fields */
}
Expand description

A part of AxVMCrateConfig, which represents a VM.

Fields§

§cpu_config: AxVCpuConfig

vCPU configuration.

§image_config: VMImageConfig

VM image configuration.

Implementations§

Source§

impl AxVMConfig

Source

pub fn id(&self) -> usize

Returns VM id.

Source

pub fn name(&self) -> String

Returns VM name.

Source

pub fn image_config(&self) -> &VMImageConfig

Returns configurations related to VM image load addresses.

Source

pub fn bsp_entry(&self) -> GuestPhysAddr

Returns the entry address in GPA for the Bootstrap Processor (BSP).

Source

pub fn ap_entry(&self) -> GuestPhysAddr

Returns the entry address in GPA for the Application Processor (AP).

Source

pub fn phys_cpu_ls_mut(&mut self) -> &mut PhysCpuList

Returns a mutable reference to the physical CPU list.

Source

pub fn excluded_devices(&self) -> &Vec<Vec<String>>

Returns the list of excluded devices.

Source

pub fn pass_through_addresses(&self) -> &Vec<PassThroughAddressConfig>

Returns the list of passthrough address configurations.

Source

pub fn emu_devices(&self) -> &Vec<EmulatedDeviceConfig>

Returns configurations related to VM emulated devices.

Source

pub fn pass_through_devices(&self) -> &Vec<PassThroughDeviceConfig>

Returns configurations related to VM passthrough devices.

Source

pub fn add_pass_through_device(&mut self, device: PassThroughDeviceConfig)

Adds a new passthrough device to the VM configuration.

Source

pub fn remove_pass_through_device(&mut self, device: PassThroughDeviceConfig)

Removes passthrough device from the VM configuration.

Source

pub fn clear_pass_through_devices(&mut self)

Clears all passthrough devices from the VM configuration.

Source

pub fn add_pass_through_spi(&mut self, spi: u32)

Adds a passthrough SPI to the VM configuration.

Source

pub fn pass_through_spis(&self) -> &Vec<u32>

Returns the list of passthrough SPIs.

Source

pub fn interrupt_mode(&self) -> VMInterruptMode

Returns the interrupt mode of the VM.

Source

pub fn relocate_kernel_image(&mut self, kernel_load_gpa: GuestPhysAddr)

Relocate the guest kernel image while preserving the configured entry-point offsets relative to the load address.

Trait Implementations§

Source§

impl Debug for AxVMConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AxVMConfig

Source§

fn default() -> AxVMConfig

Returns the “default value” for a type. Read more
Source§

impl From<AxVMCrateConfig> for AxVMConfig

Source§

fn from(cfg: AxVMCrateConfig) -> Self

Converts to this type from the input type.

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>,

Source§

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>,

Source§

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.