mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Introduce MemoryManager
The memory manager is responsible for setting up the guest memory and in the long term will also handle addition of guest memory. In this commit move code for creating the backing memory and populating the allocator into the new implementation trying to make as minimal changes to other code as possible. Follow on commits will further reduce some of the duplicated code. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -416,7 +416,7 @@ pub struct DeviceManager {
|
||||
impl DeviceManager {
|
||||
pub fn new(
|
||||
vm_info: &VmInfo,
|
||||
allocator: SystemAllocator,
|
||||
allocator: Arc<Mutex<SystemAllocator>>,
|
||||
mut mem_slots: u32,
|
||||
_exit_evt: &EventFd,
|
||||
reset_evt: &EventFd,
|
||||
@@ -435,7 +435,7 @@ impl DeviceManager {
|
||||
let mut virt_iommu: Option<(u32, Vec<u32>)> = None;
|
||||
|
||||
let address_manager = Arc::new(AddressManager {
|
||||
allocator: Arc::new(Mutex::new(allocator)),
|
||||
allocator,
|
||||
io_bus: Arc::new(io_bus),
|
||||
mmio_bus: Arc::new(mmio_bus),
|
||||
#[cfg(feature = "pci_support")]
|
||||
|
||||
Reference in New Issue
Block a user