Struct crosvm::crosvm::config::Config

source ·
pub struct Config {
Show 106 fields pub ac_adapter: bool, pub acpi_tables: Vec<PathBuf>, pub android_display_service: Option<String>, pub android_fstab: Option<PathBuf>, pub async_executor: Option<ExecutorKind>, pub balloon: bool, pub balloon_bias: i64, pub balloon_control: Option<PathBuf>, pub balloon_page_reporting: bool, pub balloon_ws_num_bins: u8, pub balloon_ws_reporting: bool, pub battery_config: Option<BatteryConfig>, pub boot_cpu: usize, pub break_linux_pci_config_io: bool, pub bus_lock_ratelimit: u64, pub coiommu_param: Option<CoIommuParameters>, pub core_scheduling: bool, pub cpu_capacity: BTreeMap<usize, u32>, pub cpu_clusters: Vec<CpuSet>, pub crash_pipe_name: Option<String>, pub crash_report_uuid: Option<String>, pub delay_rt: bool, pub device_tree_overlay: Vec<DtboOption>, pub disable_virtio_intx: bool, pub disks: Vec<DiskOption>, pub display_input_height: Option<u32>, pub display_input_width: Option<u32>, pub display_window_keyboard: bool, pub display_window_mouse: bool, pub dump_device_tree_blob: Option<PathBuf>, pub dynamic_power_coefficient: BTreeMap<usize, u32>, pub enable_fw_cfg: bool, pub enable_hwp: bool, pub executable_path: Option<Executable>, pub file_backed_mappings: Vec<FileBackedMappingParameters>, pub force_calibrated_tsc_leaf: bool, pub force_s2idle: bool, pub fw_cfg_parameters: Vec<FwCfgParameters>, pub gdb: Option<u32>, pub gpu_cgroup_path: Option<PathBuf>, pub gpu_parameters: Option<GpuParameters>, pub gpu_render_server_parameters: Option<GpuRenderServerParameters>, pub gpu_server_cgroup_path: Option<PathBuf>, pub host_cpu_topology: bool, pub hugepages: bool, pub hypervisor: Option<HypervisorKind>, pub init_memory: Option<u64>, pub initrd_path: Option<PathBuf>, pub irq_chip: Option<IrqChipKind>, pub itmt: bool, pub jail_config: Option<JailConfig>, pub lock_guest_memory: bool, pub memory: Option<u64>, pub memory_file: Option<PathBuf>, pub mmio_address_ranges: Vec<AddressRange>, pub net: Vec<NetParameters>, pub no_i8042: bool, pub no_rtc: bool, pub no_smt: bool, pub params: Vec<String>, pub pci_hotplug_slots: Option<u8>, pub pci_low_start: Option<u64>, pub pcie_ecam: Option<AddressRange>, pub per_vm_core_scheduling: bool, pub pflash_parameters: Option<PflashParameters>, pub plugin_gid_maps: Vec<GidMap>, pub plugin_mounts: Vec<BindMount>, pub plugin_root: Option<PathBuf>, pub pmems: Vec<PmemOption>, pub protection_type: ProtectionType, pub pstore: Option<Pstore>, pub pvclock: bool, pub pvm_fw: Option<PathBuf>, pub restore_path: Option<PathBuf>, pub rng: bool, pub rt_cpus: CpuSet, pub scsis: Vec<ScsiOption>, pub serial_parameters: BTreeMap<(SerialHardware, u8), SerialParameters>, pub shared_dirs: Vec<SharedDir>, pub smbios: SmbiosOptions, pub socket_path: Option<PathBuf>, pub sound: Option<PathBuf>, pub strict_balloon: bool, pub stub_pci_devices: Vec<StubPciParameters>, pub suspended: bool, pub swap_dir: Option<PathBuf>, pub swiotlb: Option<u64>, pub unmap_guest_memory_on_fork: bool, pub usb: bool, pub vcpu_affinity: Option<VcpuAffinity>, pub vcpu_cgroup_path: Option<PathBuf>, pub vcpu_count: Option<usize>, pub vcpu_hybrid_type: BTreeMap<usize, CpuHybridType>, pub vfio: Vec<VfioOption>, pub vfio_isolate_hotplug: bool, pub vhost_user: Vec<VhostUserFrontendOption>, pub vhost_user_fs: Vec<VhostUserFsOption>, pub video_dec: Vec<VideoDeviceConfig>, pub video_enc: Vec<VideoDeviceConfig>, pub virt_cpufreq_socket: Option<PathBuf>, pub virtio_input: Vec<InputDeviceOption>, pub virtio_snds: Vec<Parameters>, pub vsock: Option<VsockConfig>, pub vtpm_proxy: bool, pub wayland_socket_paths: BTreeMap<String, PathBuf>, pub x_display: Option<String>,
}
Expand description

Aggregate of all configurable options for a running VM.

Fields§

§ac_adapter: bool§acpi_tables: Vec<PathBuf>§android_display_service: Option<String>§android_fstab: Option<PathBuf>§async_executor: Option<ExecutorKind>§balloon: bool§balloon_bias: i64§balloon_control: Option<PathBuf>§balloon_page_reporting: bool§balloon_ws_num_bins: u8§balloon_ws_reporting: bool§battery_config: Option<BatteryConfig>§boot_cpu: usize§break_linux_pci_config_io: bool§bus_lock_ratelimit: u64§coiommu_param: Option<CoIommuParameters>§core_scheduling: bool§cpu_capacity: BTreeMap<usize, u32>§cpu_clusters: Vec<CpuSet>§crash_pipe_name: Option<String>§crash_report_uuid: Option<String>§delay_rt: bool§device_tree_overlay: Vec<DtboOption>§disable_virtio_intx: bool§disks: Vec<DiskOption>§display_input_height: Option<u32>§display_input_width: Option<u32>§display_window_keyboard: bool§display_window_mouse: bool§dump_device_tree_blob: Option<PathBuf>§dynamic_power_coefficient: BTreeMap<usize, u32>§enable_fw_cfg: bool§enable_hwp: bool§executable_path: Option<Executable>§file_backed_mappings: Vec<FileBackedMappingParameters>§force_calibrated_tsc_leaf: bool§force_s2idle: bool§fw_cfg_parameters: Vec<FwCfgParameters>§gdb: Option<u32>§gpu_cgroup_path: Option<PathBuf>§gpu_parameters: Option<GpuParameters>§gpu_render_server_parameters: Option<GpuRenderServerParameters>§gpu_server_cgroup_path: Option<PathBuf>§host_cpu_topology: bool§hugepages: bool§hypervisor: Option<HypervisorKind>§init_memory: Option<u64>§initrd_path: Option<PathBuf>§irq_chip: Option<IrqChipKind>§itmt: bool§jail_config: Option<JailConfig>§lock_guest_memory: bool§memory: Option<u64>§memory_file: Option<PathBuf>§mmio_address_ranges: Vec<AddressRange>§net: Vec<NetParameters>§no_i8042: bool§no_rtc: bool§no_smt: bool§params: Vec<String>§pci_hotplug_slots: Option<u8>§pci_low_start: Option<u64>§pcie_ecam: Option<AddressRange>§per_vm_core_scheduling: bool§pflash_parameters: Option<PflashParameters>§plugin_gid_maps: Vec<GidMap>§plugin_mounts: Vec<BindMount>§plugin_root: Option<PathBuf>§pmems: Vec<PmemOption>§protection_type: ProtectionType§pstore: Option<Pstore>§pvclock: bool§pvm_fw: Option<PathBuf>

Must be Some iff protection_type == ProtectionType::UnprotectedWithFirmware.

§restore_path: Option<PathBuf>§rng: bool§rt_cpus: CpuSet§scsis: Vec<ScsiOption>§serial_parameters: BTreeMap<(SerialHardware, u8), SerialParameters>§shared_dirs: Vec<SharedDir>§smbios: SmbiosOptions§socket_path: Option<PathBuf>§sound: Option<PathBuf>§strict_balloon: bool§stub_pci_devices: Vec<StubPciParameters>§suspended: bool§swap_dir: Option<PathBuf>§swiotlb: Option<u64>§unmap_guest_memory_on_fork: bool§usb: bool§vcpu_affinity: Option<VcpuAffinity>§vcpu_cgroup_path: Option<PathBuf>§vcpu_count: Option<usize>§vcpu_hybrid_type: BTreeMap<usize, CpuHybridType>§vfio: Vec<VfioOption>§vfio_isolate_hotplug: bool§vhost_user: Vec<VhostUserFrontendOption>§vhost_user_fs: Vec<VhostUserFsOption>§video_dec: Vec<VideoDeviceConfig>§video_enc: Vec<VideoDeviceConfig>§virt_cpufreq_socket: Option<PathBuf>§virtio_input: Vec<InputDeviceOption>§virtio_snds: Vec<Parameters>§vsock: Option<VsockConfig>§vtpm_proxy: bool§wayland_socket_paths: BTreeMap<String, PathBuf>§x_display: Option<String>

Trait Implementations§

source§

impl Default for Config

source§

fn default() -> Config

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

impl<'de> Deserialize<'de> for Config

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Config

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<RunCommand> for Config

§

type Error = String

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

fn try_from(cmd: RunCommand) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for Twhere T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for Twhere T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T, Global>) -> Arc<dyn Any + Sync + Send, Global>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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 Twhere 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 Twhere 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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,