vmm: Naturally align PCI BARs on relocation

When allocating PCI MMIO BARs they should always be naturally aligned
(i.e. aligned to the size of the BAR itself.)

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-10-15 09:21:21 +01:00 committed by Bo Chen
parent c3d6aceed1
commit 2cccdc5ddd

View File

@ -593,7 +593,7 @@ impl DeviceRelocation for AddressManager {
.allocate_mmio_hole_addresses(
Some(GuestAddress(new_base)),
len as GuestUsize,
None,
Some(len),
)
.ok_or_else(|| {
io::Error::new(
@ -613,7 +613,7 @@ impl DeviceRelocation for AddressManager {
.allocate_mmio_addresses(
Some(GuestAddress(new_base)),
len as GuestUsize,
None,
Some(len),
)
.ok_or_else(|| {
io::Error::new(