Struct crosvm::crosvm::config::Config

source ·
pub struct Config {
Show 112 fields pub ac_adapter: bool, pub ac97_parameters: Vec<Ac97Parameters>, 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_wss_reporting: bool, pub battery_config: Option<BatteryConfig>, pub bus_lock_ratelimit: u64, pub coiommu_param: Option<CoIommuParameters>, 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 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_hwp: bool, pub enable_pnp_data: bool, pub executable_path: Option<Executable>, pub file_backed_mappings: Vec<FileBackedMappingParameters>, pub force_calibrated_tsc_leaf: bool, pub force_s2idle: bool, 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 oem_strings: Vec<String>, pub params: Vec<String>, 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 serial_parameters: BTreeMap<(SerialHardware, u8), SerialParameters>, pub shared_dirs: Vec<SharedDir>, pub socket_path: Option<PathBuf>, pub software_tpm: bool, pub sound: Option<PathBuf>, pub strict_balloon: bool, pub stub_pci_devices: Vec<StubPciParameters>, pub swap_dir: Option<PathBuf>, pub swiotlb: Option<u64>, pub unmap_guest_memory_on_fork: bool, pub usb: bool, pub userspace_msr: BTreeMap<u32, MsrConfig>, 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_net_device_path: PathBuf, pub vhost_user_blk: Vec<VhostUserOption>, pub vhost_user_console: Vec<VhostUserOption>, pub vhost_user_fs: Vec<VhostUserFsOption>, pub vhost_user_gpu: Vec<VhostUserOption>, pub vhost_user_mac80211_hwsim: Option<VhostUserOption>, pub vhost_user_net: Vec<VhostUserOption>, pub vhost_user_snd: Vec<VhostUserOption>, pub vhost_user_video_dec: Vec<VhostUserOption>, pub vhost_user_vsock: Vec<VhostUserOption>, pub vhost_user_wl: Option<VhostUserOption>, pub video_dec: Vec<VideoDeviceConfig>, pub video_enc: Vec<VideoDeviceConfig>, pub virt_cpufreq: bool, pub virtio_input_evdevs: Vec<PathBuf>, pub virtio_keyboard: Vec<PathBuf>, pub virtio_mice: Vec<PathBuf>, pub virtio_multi_touch: Vec<TouchDeviceOption>, 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 vvu_proxy: Vec<VvuOption>, 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§ac97_parameters: Vec<Ac97Parameters>§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_wss_reporting: bool§battery_config: Option<BatteryConfig>§bus_lock_ratelimit: u64§coiommu_param: Option<CoIommuParameters>§cpu_capacity: BTreeMap<usize, u32>§cpu_clusters: Vec<CpuSet>§crash_pipe_name: Option<String>§crash_report_uuid: Option<String>§delay_rt: bool§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_hwp: bool§enable_pnp_data: bool§executable_path: Option<Executable>§file_backed_mappings: Vec<FileBackedMappingParameters>§force_calibrated_tsc_leaf: bool§force_s2idle: bool§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§oem_strings: Vec<String>§params: Vec<String>§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§serial_parameters: BTreeMap<(SerialHardware, u8), SerialParameters>§shared_dirs: Vec<SharedDir>§socket_path: Option<PathBuf>§software_tpm: bool§sound: Option<PathBuf>§strict_balloon: bool§stub_pci_devices: Vec<StubPciParameters>§swap_dir: Option<PathBuf>§swiotlb: Option<u64>§unmap_guest_memory_on_fork: bool§usb: bool§userspace_msr: BTreeMap<u32, MsrConfig>§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_net_device_path: PathBuf§vhost_user_blk: Vec<VhostUserOption>§vhost_user_console: Vec<VhostUserOption>§vhost_user_fs: Vec<VhostUserFsOption>§vhost_user_gpu: Vec<VhostUserOption>§vhost_user_mac80211_hwsim: Option<VhostUserOption>§vhost_user_net: Vec<VhostUserOption>§vhost_user_snd: Vec<VhostUserOption>§vhost_user_video_dec: Vec<VhostUserOption>§vhost_user_vsock: Vec<VhostUserOption>§vhost_user_wl: Option<VhostUserOption>§video_dec: Vec<VideoDeviceConfig>§video_enc: Vec<VideoDeviceConfig>§virt_cpufreq: bool§virtio_input_evdevs: Vec<PathBuf>§virtio_keyboard: Vec<PathBuf>§virtio_mice: Vec<PathBuf>§virtio_multi_touch: Vec<TouchDeviceOption>§virtio_single_touch: Vec<TouchDeviceOption>§virtio_snds: Vec<SndParameters>§virtio_switches: Vec<PathBuf>§virtio_trackpad: Vec<TouchDeviceOption>§vsock: Option<VsockConfig>§vtpm_proxy: bool§vvu_proxy: Vec<VvuOption>§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.