You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: interrupts: replay legacy GSI allocations on restore
This is a follow-up from PR firecracker-microvm#5952, where we replayed MSI-X GSI
allocations on snapshot restore, to ensure all of the handed out GSIs
are valid at restore time. As part of that PR, we changed the
`IdAllocator` struct to use a bitmap, backed by the `BitVec` struct from
`bitvec` crate.
`bitvec`'s implementation of serde deserialization doesn't handle
malformed input gracefully, panicking instead of returning an error.
Under normal conditions, where a well-formed snapshot is provided,
such panics would never occur, but we would like to avoid a panic even
under such conditions.
To do this, we mirror the changes in firecracker-microvm#5952, creating a new `IdAllocator`
on restore for the legacy GSIs, and replay allocations. This prevents us
ever serializing bitvec and encountering this condition, with the added
benefit of standardising behaviour across both GSI allocators.
Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
0 commit comments