mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: simplify receiving memory fds
... and nuke some Option<> while I was there. Given that HashMap has a usable default and we end up passing an empty HashMap anyway, just get rid of the Option. On-behalf-of: SAP julian.stecklina@sap.com Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
3d43245608
commit
1861bc49e7
@@ -995,7 +995,7 @@ impl MemoryManager {
|
||||
phys_bits: u8,
|
||||
#[cfg(feature = "tdx")] tdx_enabled: bool,
|
||||
restore_data: Option<&MemoryManagerSnapshotData>,
|
||||
existing_memory_files: Option<HashMap<u32, File>>,
|
||||
existing_memory_files: HashMap<u32, File>,
|
||||
) -> Result<Arc<Mutex<MemoryManager>>, Error> {
|
||||
trace_scoped!("MemoryManager::new");
|
||||
|
||||
@@ -1030,7 +1030,7 @@ impl MemoryManager {
|
||||
&data.guest_ram_mappings,
|
||||
&zones,
|
||||
prefault,
|
||||
existing_memory_files.unwrap_or_default(),
|
||||
existing_memory_files,
|
||||
config.thp,
|
||||
)?;
|
||||
let guest_memory =
|
||||
@@ -1263,7 +1263,7 @@ impl MemoryManager {
|
||||
#[cfg(feature = "tdx")]
|
||||
false,
|
||||
Some(&mem_snapshot),
|
||||
None,
|
||||
Default::default(),
|
||||
)?;
|
||||
|
||||
mm.lock()
|
||||
|
||||
Reference in New Issue
Block a user