mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
vmm: use unwrap_or
instead of match
for prefault
Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
This commit is contained in:
parent
fce202a90c
commit
ce0f30bb54
@ -494,10 +494,7 @@ impl MemoryManager {
|
||||
file_offset,
|
||||
region_start,
|
||||
region_size,
|
||||
match prefault {
|
||||
Some(pf) => pf,
|
||||
None => zone.prefault,
|
||||
},
|
||||
prefault.unwrap_or(zone.prefault),
|
||||
zone.shared,
|
||||
zone.hugepages,
|
||||
zone.hugepage_size,
|
||||
@ -573,10 +570,7 @@ impl MemoryManager {
|
||||
guest_ram_mapping.file_offset,
|
||||
GuestAddress(guest_ram_mapping.gpa),
|
||||
guest_ram_mapping.size as usize,
|
||||
match prefault {
|
||||
Some(pf) => pf,
|
||||
None => zone_config.prefault,
|
||||
},
|
||||
prefault.unwrap_or(zone_config.prefault),
|
||||
zone_config.shared,
|
||||
zone_config.hugepages,
|
||||
zone_config.hugepage_size,
|
||||
@ -997,10 +991,7 @@ impl MemoryManager {
|
||||
0,
|
||||
start_addr,
|
||||
hotplug_size as usize,
|
||||
match prefault {
|
||||
Some(pf) => pf,
|
||||
None => zone.prefault,
|
||||
},
|
||||
prefault.unwrap_or(zone.prefault),
|
||||
zone.shared,
|
||||
zone.hugepages,
|
||||
zone.hugepage_size,
|
||||
|
Loading…
Reference in New Issue
Block a user