mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-allocator: Align address at allocation time
There is alignment support for AddressAllocator but there are occations that the alignment is known only when we call allocate(). One example is PCI BAR which is natually aligned, means for which we have to align the base address to its size. Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
af7cd74e04
commit
96fb38a5aa
@@ -668,7 +668,7 @@ impl DeviceManager {
|
||||
let size = pmem_cfg.size;
|
||||
|
||||
let pmem_guest_addr = allocator
|
||||
.allocate_mmio_addresses(None, size as GuestUsize)
|
||||
.allocate_mmio_addresses(None, size as GuestUsize, None)
|
||||
.ok_or(DeviceManagerError::PmemRangeAllocation)?;
|
||||
|
||||
let (custom_flags, set_len) = if pmem_cfg.file.is_dir() {
|
||||
|
||||
Reference in New Issue
Block a user