vmm, virtio-devices: Move BlocksState creation to the MemoryManager

By creating the BlocksState object in the MemoryManager, we can directly
provide it to the virtio-mem device when being created. This will allow
the MemoryManager through each VirtioMemZone to have a handle onto the
blocks that are plugged at any point in time.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2021-09-23 10:42:00 +02:00
committed by Bo Chen
parent 4450c44fbc
commit e390775bcb
3 changed files with 17 additions and 2 deletions
+1
View File
@@ -2694,6 +2694,7 @@ impl DeviceManager {
self.exit_evt
.try_clone()
.map_err(DeviceManagerError::EventFd)?,
virtio_mem_zone.blocks_state().clone(),
)
.map_err(DeviceManagerError::CreateVirtioMem)?,
));