vmm: Start memory slots at zero

After refactoring a common function is used to setup these slots and
that function takes care of allocating a new slot so it is not necessary
to reserve the initial region slots.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-01-17 16:59:37 +00:00 committed by Samuel Ortiz
parent 0ab22fea2c
commit 76d9bf2792

View File

@ -237,7 +237,7 @@ impl MemoryManager {
let memory_manager = Arc::new(Mutex::new(MemoryManager {
guest_memory: guest_memory.clone(),
next_kvm_memory_slot: ram_regions.len() as u32,
next_kvm_memory_slot: 0,
start_of_device_area,
end_of_device_area,
fd,