-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix MSIx interrupts #5353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MSIx interrupts #5353
Conversation
d9fc204 to
8c23ce6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me
The merge-base changed after approval.
8c23ce6 to
1268508
Compare
We should check that the MSI-X vector that a guest assigns to a VirtIO queue or configuration is a valid one. If it is a value bigger than the available vectors allocated for the device, it should not update the vector field and mark the corresponding vector to the NO_VECTOR value. Also, add checks in the MSI implementation for VirtioInterrupt trait, for making sure that we don't try to interact with out-of-range interrupt vectors. Signed-off-by: Babis Chalios <[email protected]>
1268508 to
af5c750
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/pcie #5353 +/- ##
================================================
- Coverage 80.64% 80.59% -0.05%
================================================
Files 265 265
Lines 30674 30690 +16
================================================
- Hits 24737 24736 -1
- Misses 5937 5954 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1e675c2
into
firecracker-microvm:feature/pcie
Changes
Validate the interrupt vectors that guest selects for VirtIO queues and configuration interrupts. Also, make sure that the MSI implementation of
VirtioInterruptchecks that the interrupt index corresponds to a valid interrupt vector.Reason
If the guest sets an invalid vector for a VirtIO queue and/or configuration, we might end up doing an out-of-bounds access to the table that holds the MSI vectors and cause a panic at runtime.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.PR Checklist
tools/devtool checkbuild --allto verify that the PR passesbuild checks on all supported architectures.
tools/devtool checkstyleto verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md.Runbook for Firecracker API changes.
integration tests.
TODO.rust-vmm.