Struct crosvm::crosvm::config::Config

source ·
pub struct Config {
Show 107 fields pub ac_adapter: bool, pub acpi_tables: Vec<PathBuf>, 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 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_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 pmem_devices: Vec<DiskOption>, pub protection_type: ProtectionType, pub pstore: Option<Pstore>, 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 virtio_input_evdevs: Vec<PathBuf>, pub virtio_keyboard: Vec<PathBuf>, pub virtio_mice: Vec<PathBuf>, pub virtio_multi_touch: Vec<TouchDeviceOption>, pub virtio_rotary: Vec<PathBuf>, pub virtio_single_touch: Vec<TouchDeviceOption>, pub virtio_snds: Vec<SndParameters>, pub virtio_switches: Vec<PathBuf>, pub virtio_trackpad: Vec<TouchDeviceOption>, 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_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>§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_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>§pmem_devices: Vec<DiskOption>§protection_type: ProtectionType§pstore: Option<Pstore>§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>§virtio_input_evdevs: Vec<PathBuf>§virtio_keyboard: Vec<PathBuf>§virtio_mice: Vec<PathBuf>§virtio_multi_touch: Vec<TouchDeviceOption>§virtio_rotary: Vec<PathBuf>§virtio_single_touch: Vec<TouchDeviceOption>§virtio_snds: Vec<SndParameters>§virtio_switches: Vec<PathBuf>§virtio_trackpad: Vec<TouchDeviceOption>§vsock: Option<VsockConfig>§vtpm_proxy: bool§wayland_socket_paths: BTreeMap<String, PathBuf>§x_display: Option<String>

Trait Implementations§

Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
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.
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.