Skip to content

vmm: interrupts: fix: add Drop for MsixVectorGroup#5890

Open
ShadowCurse wants to merge 1 commit into
firecracker-microvm:mainfrom
ShadowCurse:clean_up_irqs
Open

vmm: interrupts: fix: add Drop for MsixVectorGroup#5890
ShadowCurse wants to merge 1 commit into
firecracker-microvm:mainfrom
ShadowCurse:clean_up_irqs

Conversation

@ShadowCurse
Copy link
Copy Markdown
Contributor

Changes

Currently without Drop on MsixVectorGroup destroying devices during hot-unplug leaks interrupt ids because there is no code to clean them up. Implementing Drop on MsixVectorGroup is the simplest way to fix this issue.

Reason

Don't leak irqs

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

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkbuild --all to verify that the PR passes
    build checks on all supported architectures.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    how they are solving the problem in a clear and encompassing way.
  • I have updated any relevant documentation (both in code and in the docs)
    in the PR.
  • I have mentioned all user-facing changes in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

@ShadowCurse ShadowCurse self-assigned this May 15, 2026
@ShadowCurse ShadowCurse force-pushed the clean_up_irqs branch 2 times, most recently from b7de343 to 7073f60 Compare May 15, 2026 16:58
Currently without Drop on MsixVectorGroup destroying devices during
hot-unplug leaks interrupt ids because there is no code to clean them
up. Implementing Drop on MsixVectorGroup is the simplest way to fix this
issue.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.90%. Comparing base (9b53e62) to head (4711b37).

Files with missing lines Patch % Lines
src/vmm/src/vstate/interrupts.rs 95.45% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5890   +/-   ##
=======================================
  Coverage   82.90%   82.90%           
=======================================
  Files         277      277           
  Lines       30053    30075   +22     
=======================================
+ Hits        24914    24935   +21     
- Misses       5139     5140    +1     
Flag Coverage Δ
5.10-m5n.metal 83.21% <95.45%> (+0.01%) ⬆️
5.10-m6a.metal 82.55% <95.45%> (+0.01%) ⬆️
5.10-m6g.metal 79.85% <90.90%> (+<0.01%) ⬆️
5.10-m6i.metal 83.21% <95.45%> (+<0.01%) ⬆️
5.10-m7a.metal-48xl 82.54% <95.45%> (+0.01%) ⬆️
5.10-m7g.metal 79.85% <90.90%> (+<0.01%) ⬆️
5.10-m7i.metal-24xl 83.18% <95.45%> (+0.01%) ⬆️
5.10-m7i.metal-48xl 83.18% <95.45%> (+<0.01%) ⬆️
5.10-m8g.metal-24xl 79.84% <90.90%> (+<0.01%) ⬆️
5.10-m8g.metal-48xl 79.84% <90.90%> (+<0.01%) ⬆️
5.10-m8i.metal-48xl 83.18% <95.45%> (+0.01%) ⬆️
5.10-m8i.metal-96xl 83.18% <95.45%> (+0.01%) ⬆️
6.1-m5n.metal 83.24% <95.45%> (+0.01%) ⬆️
6.1-m6a.metal 82.58% <95.45%> (+0.01%) ⬆️
6.1-m6g.metal 79.84% <90.90%> (+<0.01%) ⬆️
6.1-m6i.metal 83.23% <95.45%> (+<0.01%) ⬆️
6.1-m7a.metal-48xl 82.56% <95.45%> (+0.01%) ⬆️
6.1-m7g.metal 79.84% <90.90%> (+<0.01%) ⬆️
6.1-m7i.metal-24xl 83.24% <95.45%> (+<0.01%) ⬆️
6.1-m7i.metal-48xl 83.24% <95.45%> (+<0.01%) ⬆️
6.1-m8g.metal-24xl 79.84% <90.90%> (+<0.01%) ⬆️
6.1-m8g.metal-48xl 79.84% <90.90%> (+<0.01%) ⬆️
6.1-m8i.metal-48xl 83.24% <95.45%> (+<0.01%) ⬆️
6.1-m8i.metal-96xl 83.25% <95.45%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant