Skip to content
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

#4534: Remove multi irq support for mmio devices #4601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andr3wy
Copy link
Contributor

@andr3wy andr3wy commented May 7, 2024

Changes

-Utilized Option instead of Vector to store IRQ lines for MMIO devices.
-Add test to test this.
-Update existing tests
...

Reason

Currently, Firecracker have an ability to create multiple irqs for MMIO devices; however, no more than one IRQ is ever used. Therefore, it was suggested to change this to use an Option instead of a vector of length 0 or 1.
...

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

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this
    PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet
    contribution quality standards.

  • This functionality cannot be added in rust-vmm.

@andr3wy andr3wy force-pushed the 4534 branch 2 times, most recently from fec52fa to a1d2133 Compare May 7, 2024 03:08
Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.12%. Comparing base (4488f10) to head (d7c0a7d).
Report is 1 commits behind head on main.

Files Patch % Lines
src/vmm/src/device_manager/mmio.rs 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4601      +/-   ##
==========================================
- Coverage   82.12%   82.12%   -0.01%     
==========================================
  Files         255      255              
  Lines       31281    31276       -5     
==========================================
- Hits        25689    25684       -5     
  Misses       5592     5592              
Flag Coverage Δ
4.14-c5n.metal 79.61% <100.00%> (-0.01%) ⬇️
4.14-m5n.metal 79.60% <100.00%> (-0.01%) ⬇️
4.14-m6a.metal 78.82% <100.00%> (-0.01%) ⬇️
4.14-m6g.metal 76.63% <90.00%> (-0.01%) ⬇️
4.14-m6i.metal 79.59% <100.00%> (-0.02%) ⬇️
4.14-m7g.metal 76.63% <90.00%> (-0.01%) ⬇️
5.10-c5n.metal 82.13% <100.00%> (-0.01%) ⬇️
5.10-m5n.metal 82.11% <100.00%> (-0.01%) ⬇️
5.10-m6a.metal 81.42% <100.00%> (-0.01%) ⬇️
5.10-m6g.metal 79.41% <90.00%> (-0.01%) ⬇️
5.10-m6i.metal ?
5.10-m7g.metal 79.41% <90.00%> (-0.01%) ⬇️
6.1-c5n.metal 82.12% <100.00%> (-0.01%) ⬇️
6.1-m5n.metal 82.11% <100.00%> (-0.02%) ⬇️
6.1-m6a.metal ?
6.1-m6g.metal 79.40% <90.00%> (-0.01%) ⬇️
6.1-m6i.metal ?
6.1-m7g.metal 79.41% <90.00%> (+<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.

Copy link
Contributor

@roypat roypat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @andr3wy,
Thanks for your PR! There's a couple formatting and build issues on ARM that'll need to be fixed (see https://buildkite.com/firecracker/firecracker-pr/builds/9851 for what exactly is failing). For the formatting, you can run ./tools/devtool fmt to fix it up (and to check that the style checks will all pass, you can run ./tools/devtool checkstyle). For the build error on ARM, you can do cargo check --target aarch64-unknown-linux-gnu. That should allow you to validate the build without needing a cross-compilation toolchain. Also, please squash all the commits into a single one, and give it a meaningful description. Thanks!

src/vmm/src/device_manager/mmio.rs Outdated Show resolved Hide resolved
src/vmm/src/device_manager/mmio.rs Outdated Show resolved Hide resolved
src/vmm/src/device_manager/mmio.rs Outdated Show resolved Hide resolved
src/vmm/src/device_manager/mmio.rs Outdated Show resolved Hide resolved
src/vmm/src/device_manager/mmio.rs Outdated Show resolved Hide resolved
@andr3wy
Copy link
Contributor Author

andr3wy commented May 7, 2024

Issues should be resolved.

@roypat
Copy link
Contributor

roypat commented May 8, 2024

Thanks for squashing the commits! It seems that a rebase went a bit awry though, your branch now has some commits that are already on main :( Could you drop those, so that only your commit remains part of this PR? Also, please add a commit body message - it's required for the style CI step to pass - just rephrasing the what you put under "Reason" in the PR description will be fine :).

Also I think there's still a compilation issue on ARM, could you have a look at that, too?

@andr3wy
Copy link
Contributor Author

andr3wy commented May 8, 2024

Wanted to write that I won't have access to a computer for at least a month (out of town), so this will have to be on the back burner for a while.

@JonathanWoollett-Light
Copy link
Contributor

Related to #4534

@roypat roypat linked an issue May 16, 2024 that may be closed by this pull request
3 tasks
@roypat
Copy link
Contributor

roypat commented Jul 1, 2024

Wanted to write that I won't have access to a computer for at least a month (out of town), so this will have to be on the back burner for a while.

Hi @andr3wy,
are you still interested in working on this?

@roypat roypat force-pushed the 4534 branch 2 times, most recently from 5779211 to 810402e Compare July 15, 2024 12:25
@roypat
Copy link
Contributor

roypat commented Jul 15, 2024

Hi @andr3wy,
I've gone ahead and rebased the PR, and fixed the remaining outstanding compiler warnings. Thanks again for your contribution here!

Each MMIO device in Firecracker only utilizes at most one irq line, so
capture this property at the type level.

Signed-off-by: Andrew Yao <andr3wy@gmail.com>
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
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.

Remove multi irq support for mmio devices
3 participants