mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-23 16:31:16 +00:00
vm-allocator: Add new function to free 32 bits MMIO address space
The allocator already had functions to allocate and free both IO and 64 bits MMIO address spaces, but it only had an allocating function for 32 bits MMIO address space. With this new function, it will be now possible to remove cleanly some ranges from the 32 bits MMIO address space. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
f3dc245c4f
commit
b8e1cf2d4e
@ -131,4 +131,10 @@ impl SystemAllocator {
|
|||||||
pub fn free_mmio_addresses(&mut self, address: GuestAddress, size: GuestUsize) {
|
pub fn free_mmio_addresses(&mut self, address: GuestAddress, size: GuestUsize) {
|
||||||
self.mmio_address_space.free(address, size)
|
self.mmio_address_space.free(address, size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Free an MMIO address range from the 32 bits hole.
|
||||||
|
/// We can only free a range if it matches exactly an already allocated range.
|
||||||
|
pub fn free_mmio_hole_addresses(&mut self, address: GuestAddress, size: GuestUsize) {
|
||||||
|
self.mmio_hole_address_space.free(address, size)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user