mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Add page size as a parameter for MemoryRangeTable::from_bitmap()
This will be helpful to support the creation of a MemoryRangeTable from virtio-mem, as it uses 2M pages. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -184,8 +184,7 @@ pub struct MemoryRangeTable {
|
||||
}
|
||||
|
||||
impl MemoryRangeTable {
|
||||
pub fn from_bitmap(bitmap: Vec<u64>, start_addr: u64) -> Self {
|
||||
let page_size = 4096;
|
||||
pub fn from_bitmap(bitmap: Vec<u64>, start_addr: u64, page_size: u64) -> Self {
|
||||
let mut table = MemoryRangeTable::default();
|
||||
let mut entry: Option<MemoryRange> = None;
|
||||
for (i, block) in bitmap.iter().enumerate() {
|
||||
|
||||
Reference in New Issue
Block a user