vmm: Remove 'file' option from MemoryConfig

After the introduction of user defined memory zones, we can now remove
the deprecated 'file' option from --memory parameter. This makes this
parameter simpler, letting more advanced users define their own custom
memory zones through the dedicated parameter.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-08-24 11:09:01 +02:00
committed by Samuel Ortiz
parent 5bf7113768
commit c58dd761f4
5 changed files with 8 additions and 48 deletions

View File

@@ -64,7 +64,6 @@ pub struct MemoryManager {
pub vm: Arc<dyn hypervisor::Vm>,
hotplug_slots: Vec<HotPlugState>,
selected_slot: usize,
backing_file: Option<PathBuf>,
mergeable: bool,
allocator: Arc<Mutex<SystemAllocator>>,
hotplug_method: HotplugMethod,
@@ -371,7 +370,7 @@ impl MemoryManager {
for region in ram_regions.iter() {
mem_regions.push(MemoryManager::create_ram_region(
&config.file,
&None,
0,
region.0,
region.1,
@@ -438,7 +437,7 @@ impl MemoryManager {
if !use_zones {
virtiomem_region = Some(MemoryManager::create_ram_region(
&config.file,
&None,
0,
start_addr,
size as usize,
@@ -490,7 +489,6 @@ impl MemoryManager {
vm,
hotplug_slots,
selected_slot: 0,
backing_file: config.file.clone(),
mergeable: config.mergeable,
allocator: allocator.clone(),
hotplug_method: config.hotplug_method.clone(),
@@ -791,7 +789,7 @@ impl MemoryManager {
// Allocate memory for the region
let region = MemoryManager::create_ram_region(
&self.backing_file,
&None,
0,
start_addr,
size,