vm-allocator, vmm: InterruptRoute: free GSIs on drop

These changes free GSIs when they are no longer used. That way we
won't exhaust the available GSIs anymore when attaching and
detaching devices.

Now, once can add devices and remove them hundreds of times, without
running out of GSIs.

Co-authored-by: Sebastian Eydam <sebastian.eydam@cyberus-technology.de>
On-behalf-of: SAP sebastian.eydam@sap.com
Signed-off-by: Sebastian Eydam <sebastian.eydam@cyberus-technology.de>

On-behalf-of: Philipp Schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
Philipp Schuster
2026-05-07 15:38:59 +02:00
committed by Rob Bradford
parent 1ba2b34019
commit 3ebd32844e
2 changed files with 120 additions and 14 deletions

View File

@@ -91,6 +91,11 @@ impl SystemAllocator {
self.gsi_allocator.allocate_gsi()
}
/// Frees the given GSI.
pub fn free_gsi(&mut self, vector: u32) -> Result<(), InterruptAllocError> {
self.gsi_allocator.free_gsi(vector)
}
/// Reserves a section of `size` bytes of IO address space.
pub fn allocate_io_addresses(
&mut self,