mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-22 12:35:19 +00:00
vmm: Remove 32 bits MMIO range from correct address space
The 32 bits MMIO address space is handled separately from the 64 bits one. For this reason, we need to invoke the appropriate freeing function to remove a range from this address space. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
432eb5b70a
commit
f4a956a60a
@ -354,12 +354,12 @@ impl DeviceRelocation for AddressManager {
|
||||
}
|
||||
PciBarRegionType::Memory32BitRegion | PciBarRegionType::Memory64BitRegion => {
|
||||
// Update system allocator
|
||||
self.allocator
|
||||
.lock()
|
||||
.unwrap()
|
||||
.free_mmio_addresses(GuestAddress(old_base), len as GuestUsize);
|
||||
|
||||
if region_type == PciBarRegionType::Memory32BitRegion {
|
||||
self.allocator
|
||||
.lock()
|
||||
.unwrap()
|
||||
.free_mmio_hole_addresses(GuestAddress(old_base), len as GuestUsize);
|
||||
|
||||
self.allocator
|
||||
.lock()
|
||||
.unwrap()
|
||||
@ -375,6 +375,11 @@ impl DeviceRelocation for AddressManager {
|
||||
)
|
||||
})?;
|
||||
} else {
|
||||
self.allocator
|
||||
.lock()
|
||||
.unwrap()
|
||||
.free_mmio_addresses(GuestAddress(old_base), len as GuestUsize);
|
||||
|
||||
self.allocator
|
||||
.lock()
|
||||
.unwrap()
|
||||
|
Loading…
x
Reference in New Issue
Block a user