MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / add_region

Method add_region

vmm/src/memory_manager.rs:2121–2130  ·  view source on GitHub ↗

Update the GuestMemoryMmap with the new range

(&mut self, region: Arc<GuestRegionMmap>)

Source from the content-addressed store, hash-verified

2119
2120 // Update the GuestMemoryMmap with the new range
2121 fn add_region(&mut self, region: Arc<GuestRegionMmap>) -> Result<(), Error> {
2122 let guest_memory = self
2123 .guest_memory
2124 .memory()
2125 .insert_region(region)
2126 .map_err(Error::GuestRegionCollection)?;
2127 self.guest_memory.lock().unwrap().replace(guest_memory);
2128
2129 Ok(())
2130 }
2131
2132 //
2133 // Calculate the start address of an area next to RAM.

Callers 1

add_ram_regionMethod · 0.80

Calls 1

memoryMethod · 0.80

Tested by

no test coverage detected