Lines Matching +full:power +full:- +full:button

6 // Use of this source code is governed by a BSD-style license that can be
7 // found in the LICENSE-BSD-3-Clause file.
11 // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
219 #[error("Too many virtio-vsock devices")]
240 #[error("Error triggering power button")]
259 #[error("Error enabling SEV-SNP VM")]
351 fn valid_transition(self, new_state: VmState) -> Result<()> { in valid_transition()
396 fn guest_mem_write(&self, gpa: u64, buf: &[u8]) -> result::Result<usize, HypervisorVmError> { in guest_mem_write()
403 fn guest_mem_read(&self, gpa: u64, buf: &mut [u8]) -> result::Result<usize, HypervisorVmError> { in guest_mem_read()
410 fn mmio_read(&self, gpa: u64, data: &mut [u8]) -> result::Result<(), HypervisorVmError> { in mmio_read()
417 fn mmio_write(&self, gpa: u64, data: &[u8]) -> result::Result<(), HypervisorVmError> { in mmio_write()
433 fn pio_read(&self, port: u64, data: &mut [u8]) -> result::Result<(), HypervisorVmError> { in pio_read()
441 fn pio_write(&self, port: u64, data: &[u8]) -> result::Result<(), HypervisorVmError> { in pio_write()
457 pub fn physical_bits(hypervisor: &Arc<dyn hypervisor::Hypervisor>, max_phys_bits: u8) -> u8 { in physical_bits()
506 ) -> Result<Self> { in new_from_memory_manager()
711 // This initial SEV-SNP configuration must be done immediately after in new_from_memory_manager()
779 ) -> Result<NumaNodes> { in create_numa_nodes()
875 ) -> Result<Self> { in new()
963 ) -> Result<Arc<dyn hypervisor::Vm>> { in create_hypervisor_vm()
997 fn load_initramfs(&mut self, guest_mem: &GuestMemoryMmap) -> Result<arch::InitramfsConfig> { in load_initramfs()
1023 ) -> Result<Cmdline> { in generate_cmdline()
1037 fn load_firmware(mut firmware: &File, memory_manager: Arc<Mutex<MemoryManager>>) -> Result<()> { in load_firmware()
1050 ) -> Result<EntryPoint> { in load_kernel()
1089 ) -> Result<EntryPoint> { in load_kernel()
1093 let aligned_kernel_addr = arch::layout::KERNEL_START.0 + (alignment - 1) & !(alignment - 1); in load_kernel()
1131 ) -> Result<EntryPoint> { in load_igvm()
1161 ) -> Result<EntryPoint> { in load_kernel()
1220 ) -> Result<EntryPoint> { in load_payload()
1257 ) -> Result<EntryPoint> { in load_payload()
1276 ) -> Result<Option<thread::JoinHandle<Result<EntryPoint>>>> { in load_payload_async()
1312 fn configure_system(&mut self, rsdp_addr: GuestAddress, entry_addr: EntryPoint) -> Result<()> { in configure_system()
1385 ) -> Result<()> { in configure_system()
1412 - pci_segment.start_of_mem64_area in configure_system()
1472 fn configure_system(&mut self) -> Result<()> { in configure_system()
1498 - pci_segment.start_of_mem64_area in configure_system()
1537 pub fn console_resize_pipe(&self) -> Option<Arc<File>> { in console_resize_pipe()
1541 pub fn shutdown(&mut self) -> Result<()> { in shutdown()
1574 ) -> Result<()> { in resize()
1630 memory_config.hotplugged_size = Some(desired_memory - memory_config.size); in resize()
1657 pub fn resize_zone(&mut self, id: String, desired_memory: u64) -> Result<()> { in resize_zone()
1664 let hotplugged_size = desired_memory - zone.size; in resize_zone()
1668 .resize_zone(&id, desired_memory - zone.size) in resize_zone()
1671 // actual 'resize-zone' operation result (happened or in resize_zone()
1693 pub fn add_device(&mut self, mut device_cfg: DeviceConfig) -> Result<PciDeviceInfo> { in add_device()
1717 pub fn add_user_device(&mut self, mut device_cfg: UserDeviceConfig) -> Result<PciDeviceInfo> { in add_user_device()
1741 pub fn remove_device(&mut self, id: String) -> Result<()> { in remove_device()
1760 pub fn add_disk(&mut self, mut disk_cfg: DiskConfig) -> Result<PciDeviceInfo> { in add_disk()
1784 pub fn add_fs(&mut self, mut fs_cfg: FsConfig) -> Result<PciDeviceInfo> { in add_fs()
1808 pub fn add_pmem(&mut self, mut pmem_cfg: PmemConfig) -> Result<PciDeviceInfo> { in add_pmem()
1832 pub fn add_net(&mut self, mut net_cfg: NetConfig) -> Result<PciDeviceInfo> { in add_net()
1856 pub fn add_vdpa(&mut self, mut vdpa_cfg: VdpaConfig) -> Result<PciDeviceInfo> { in add_vdpa()
1880 pub fn add_vsock(&mut self, mut vsock_cfg: VsockConfig) -> Result<PciDeviceInfo> { in add_vsock()
1904 pub fn counters(&self) -> Result<HashMap<String, HashMap<&'static str, Wrapping<u64>>>> { in counters()
1909 fn extract_tdvf_sections(&mut self) -> Result<(Vec<TdvfSection>, bool)> { in extract_tdvf_sections()
1933 ) -> Vec<(u64, u64, bool)> { in hob_memory_resources()
1952 let last_addr = std::cmp::min(section.address - 1, region_end); in hob_memory_resources()
1953 (next_start_addr, last_addr - next_start_addr + 1, true) in hob_memory_resources()
1956 (next_start_addr, region_end - next_start_addr + 1, true) in hob_memory_resources()
1994 ) -> Result<Option<u64>> { in populate_tdx_sections()
2134 - arch::layout::MEM_32BIT_DEVICES_START.raw_value(), in populate_tdx_sections()
2152 end_of_device_area - start_of_device_area, in populate_tdx_sections()
2180 fn init_tdx_memory(&mut self, sections: &[TdvfSection]) -> Result<()> { in init_tdx_memory()
2200 // In case of TDX being used, this is a no-op since the tables will be
2204 fn create_acpi_tables(&self) -> Option<GuestAddress> { in create_acpi_tables()
2224 fn entry_point(&mut self) -> Result<Option<EntryPoint>> { in entry_point()
2233 pub fn boot(&mut self) -> Result<()> { in boot()
2241 // to enable live-migration without locking issues. in boot()
2261 // In case of SEV-SNP guest ACPI tables are provided via in boot()
2380 pub fn restore(&mut self) -> Result<()> { in restore()
2401 /// Gets a thread-safe reference counted pointer to the VM configuration.
2402 pub fn get_config(&self) -> Arc<Mutex<VmConfig>> { in get_config()
2407 pub fn get_state(&self) -> Result<VmState> { in get_state()
2415 pub fn balloon_size(&self) -> u64 { in balloon_size()
2422 ) -> std::result::Result<(), MigratableError> { in send_memory_fds()
2454 ) -> std::result::Result<(), MigratableError> in send_memory_regions()
2465 // from vm-memory::GuestMemory of write_all_to() as it is not in send_memory_regions()
2467 // see: https://github.com/rust-vmm/vm-memory/issues/174 in send_memory_regions()
2473 (range.length - offset) as usize, in send_memory_regions()
2492 pub fn memory_range_table(&self) -> std::result::Result<MemoryRangeTable, MigratableError> { in memory_range_table()
2499 pub fn device_tree(&self) -> Arc<Mutex<DeviceTree>> { in device_tree()
2509 pub fn release_disk_locks(&self) -> Result<()> { in release_disk_locks()
2518 pub fn activate_virtio_devices(&self) -> Result<()> { in activate_virtio_devices()
2527 pub fn power_button(&self) -> Result<()> { in power_button()
2537 pub fn power_button(&self) -> Result<()> { in power_button()
2546 pub fn power_button(&self) -> Result<()> { in power_button()
2550 pub fn memory_manager_data(&self) -> MemoryManagerSnapshotData { in memory_manager_data()
2559 ) -> Result<GdbResponsePayload> { in debug_request()
2607 ) -> std::result::Result<DumpState, GuestDebuggableError> { in get_dump_state()
2615 if mapping_num < UINT16_MAX - 2 { in get_dump_state()
2645 fn coredump_get_mem_offset(&self, phdr_num: u16, note_size: isize) -> u64 { in coredump_get_mem_offset()
2651 pub fn nmi(&self) -> Result<()> { in nmi()
2662 fn pause(&mut self) -> std::result::Result<(), MigratableError> { in pause()
2703 fn resume(&mut self) -> std::result::Result<(), MigratableError> { in resume()
2751 fn id(&self) -> String { in id()
2755 fn snapshot(&mut self) -> std::result::Result<Snapshot, MigratableError> { in snapshot()
2832 ) -> std::result::Result<(), MigratableError> { in send()
2888 fn start_dirty_log(&mut self) -> std::result::Result<(), MigratableError> { in start_dirty_log()
2893 fn stop_dirty_log(&mut self) -> std::result::Result<(), MigratableError> { in stop_dirty_log()
2898 fn dirty_log(&mut self) -> std::result::Result<MemoryRangeTable, MigratableError> { in dirty_log()
2905 fn start_migration(&mut self) -> std::result::Result<(), MigratableError> { in start_migration()
2910 fn complete_migration(&mut self) -> std::result::Result<(), MigratableError> { in complete_migration()
2923 ) -> std::result::Result<(), DebuggableError> { in set_guest_debug()
2930 fn debug_pause(&mut self) -> std::result::Result<(), DebuggableError> { in debug_pause()
2943 fn debug_resume(&mut self) -> std::result::Result<(), DebuggableError> { in debug_resume()
2951 fn read_regs(&self, cpu_id: usize) -> std::result::Result<CoreRegs, DebuggableError> { in read_regs()
2959 ) -> std::result::Result<(), DebuggableError> { in write_regs()
2969 ) -> std::result::Result<Vec<u8>, DebuggableError> { in read_mem()
2982 ) -> std::result::Result<(), DebuggableError> { in write_mem()
2989 fn active_vcpus(&self) -> usize { in active_vcpus()
3008 fn coredump(&mut self, destination_url: &str) -> std::result::Result<(), GuestDebuggableError> { in coredump()