Update the GuestMemoryMmap with the new range
(&mut self, region: Arc<GuestRegionMmap>)
| 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. |