From 2cccdc5ddd6441fde6778810e2c96af86b1e33aa Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 15 Oct 2021 09:21:21 +0100 Subject: [PATCH] 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 --- vmm/src/device_manager.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index ec8c66804..5525b31e8 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -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(