Lines Matching full:memory
66 const SNAPSHOT_FILENAME: &str = "memory-ranges";
76 // Memory policy constants
216 /// Mmap backed guest memory error
217 #[error("Mmap backed guest memory error")]
220 /// Failed to allocate a memory range.
221 #[error("Failed to allocate a memory range")]
236 /// The requested hotplug memory addition is not a valid size
237 #[error("The requested hotplug memory addition is not a valid size")]
240 /// Failed to create the user memory region.
241 #[error("Failed to create the user memory region")]
244 /// Failed to remove the user memory region.
245 #[error("Failed to remove the user memory region")]
307 /// No memory zones found.
308 #[error("No memory zones found")]
311 /// Memory configuration is not valid.
312 #[error("Memory configuration is not valid")]
315 /// Forbidden operation. Impossible to resize guest memory if it is
316 /// backed by user defined memory regions.
317 #[error("Impossible to resize guest memory if it is backed by user defined memory regions")]
320 /// It's invalid to try applying a NUMA policy to a memory zone that is
321 /// memory mapped with MAP_SHARED.
322 …#[error("Invalid to try applying a NUMA policy to a memory zone that is memory mapped with MAP_SHA…
325 /// Failed applying NUMA memory policy.
326 #[error("Failed applying NUMA memory policy")]
329 /// Memory zone identifier is not unique.
330 #[error("Memory zone identifier is not unique")]
337 /// Unknown memory zone.
338 #[error("Unknown memory zone")]
345 /// Invalid hotplug method associated with memory zones resizing capability.
346 #[error("Invalid hotplug method associated with memory zones resizing capability")]
349 /// Could not find specified memory zone identifier from hash map.
350 #[error("Could not find specified memory zone identifier from hash map")]
353 /// Resizing the memory zone failed.
354 #[error("Resizing the memory zone failed")]
378 /// Using a directory as a backing file for memory is not supported
379 #[error("Using a directory as a backing file for memory is not supported")]
386 /// Memory size is misaligned with default page size or its hugepage size
387 #[error("Memory size is misaligned with default page size or its hugepage size")]
501 // The Linux kernel, quite reasonably, doesn't zero the memory it gives us. in read()
515 "Unexpected offset for accessing memory manager device: {:#}", in read()
521 warn!("Out of range memory slot: {}", self.selected_slot); in read()
543 warn!("Ejection of memory not currently supported"); in write()
546 warn!("Out of range memory slot: {}", self.selected_slot); in write()
551 "Unexpected offset for accessing memory manager device: {:#}", in write()
561 /// Creates all memory regions based on the available RAM ranges defined
562 /// by `ram_regions`, and based on the description of the memory zones.
563 /// In practice, this function can perform multiple memory mappings of the
570 /// This function will create 3 resulting memory regions:
571 /// - First one mapping entirely the first memory zone on 0-1G range
572 /// - Second one mapping partially the second memory zone on 1G-3G range
573 /// - Third one mapping partially the second memory zone on 4G-6G range
575 /// Also, all memory regions are page-size aligned (e.g. their sizes must
595 // Add zone id to the list of memory zones. in create_memory_regions_from_zones()
655 // current memory zone. in create_memory_regions_from_zones()
678 // the new zone id to the list of memory zones. in create_memory_regions_from_zones()
681 "Memory zone identifier '{}' found more than once. \ in create_memory_regions_from_zones()
778 let guest_memory = self.guest_memory.memory(); in fill_saved_regions()
783 // from vm-memory::GuestMemory of read_exact_from() as it is not in fill_saved_regions()
785 // see: https://github.com/rust-vmm/vm-memory/issues/174 in fill_saved_regions()
814 "User defined memory regions can't be provided if the \ in validate_memory_config()
815 memory size is not 0" in validate_memory_config()
850 // Create a single zone from the global memory config. This lets in validate_memory_config()
851 // us reuse the codepath for user defined memory zones. in validate_memory_config()
869 "User defined memory regions must be provided if the \ in validate_memory_config()
870 memory size is 0" in validate_memory_config()
888 "Invalid to set host NUMA policy for a memory zone \ in validate_memory_config()
895 error!("Invalid to set ACPI hotplug method for memory zones"); in validate_memory_config()
912 no 'hotplug_size' for a memory zone" in validate_memory_config()
1001 // 4 MiB memory is mapped to simulate the flash. in add_uefi_flash()
1092 // Init guest memory in new()
1121 // Update list of memory zones for resize. in new()
1143 // When `prefault` is set by vm_restore, memory manager in new()
1493 // that restricts memory allocation to the nodes specified in the in create_ram_region()
1506 "Prefaulting memory size {} misaligned with page size {}", in create_ram_region()
1604 // Do not create threads to allocate less than 64 MiB of memory. in get_prefault_num_threads()
1617 .memory() in add_region()
1628 // If memory hotplug is allowed, the start address needs to be aligned
1630 // If memory hotplug is not allowed, there is no alignment required.
1656 // Allocate memory for the region in add_ram_region()
1707 let start_addr = MemoryManager::start_addr(self.guest_memory.memory().last_addr(), true)?; in hotplug_ram_region()
1720 // memory zone. in hotplug_ram_region()
1923 error!("Failed resizing virtio-mem region: Unknown memory zone"); in virtio_mem_resize()
1927 /// In case this function resulted in adding a new memory region to the
1928 /// guest memory, the new region is returned to the caller. The virtio-mem
1929 /// use case never adds a new region as the whole hotpluggable memory has
1934 "Not allowed to resize guest memory when backed with user \ in resize()
1935 defined memory zones." in resize()
1970 "Not allowed to resize guest memory zone when no zone is \ in resize_zone()
2018 // Each section can be memory mapped into the allocated region. in setup_sgx()
2033 // We can't use the vm-memory crate to perform the memory mapping in setup_sgx()
2132 // In this very specific case, we know the memory in memory_range_table()
2138 // copy of the memory content for this specific region, in memory_range_table()
2175 let guest_memory = self.guest_memory.memory(); in memory_slot_fds()
2236 let guest_memory = self.guest_memory.memory(); in coredump_iterate_save_mem()
2271 let mem = guest_memory.memory(); in receive_memory_regions()
2277 // from vm-memory::GuestMemory of read_exact_from() as it is not in receive_memory_regions()
2279 // see: https://github.com/rust-vmm/vm-memory/issues/174 in receive_memory_regions()
2289 "Error receiving memory from socket: {}", in receive_memory_regions()
2350 // Get details of memory in to_aml_bytes()
2355 // Call into MCRS which provides actual memory details in to_aml_bytes()
2444 // Memory status method in to_aml_bytes()
2468 // Memory range method in to_aml_bytes()
2553 // Memory Hotplug Controller in to_aml_bytes()
2558 &aml::Name::new("_UID".into(), &"Memory Hotplug Controller"), in to_aml_bytes()
2638 &aml::Name::new("_UID".into(), &"Memory Hotplug Controller"), in to_aml_bytes()
2703 // region. The 'snapshot' step creates the list of memory regions, in snapshot()
2704 // including information about the need to copy a memory region or in snapshot()
2707 // memory range content for the ranges requiring it. in snapshot()
2729 // Create the snapshot file for the entire memory in send()
2737 let guest_memory = self.guest_memory.memory(); in send()
2743 // from vm-memory::GuestMemory of write_all_to() as it is not in send()
2745 // see: https://github.com/rust-vmm/vm-memory/issues/174 in send()
2775 for r in self.guest_memory.memory().iter() { in start_dirty_log()
2798 let vmm_dirty_bitmap = match self.guest_memory.memory().find_region(GuestAddress(r.gpa)) in dirty_log()
2807 "Error finding 'guest memory region' with address {:x}", in dirty_log()
2822 info!("Dirty Memory Range Table is empty"); in dirty_log()
2824 info!("Dirty Memory Range Table:"); in dirty_log()