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 2 commits 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 84.31%. Comparing base (3acf37d) to head (65e0e84).
Report is 2 commits behind head on main.

Current head 65e0e84 differs from pull request most recent head a61d5c1

Please upload reports for the commit a61d5c1 to get more accurate results.

Files with missing lines Patch % Lines
src/vmm/src/device_manager/mmio.rs 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4601      +/-   ##
==========================================
- Coverage   84.32%   84.31%   -0.01%     
==========================================
  Files         249      249              
  Lines       27512    27516       +4     
==========================================
+ Hits        23200    23201       +1     
- Misses       4312     4315       +3     
Flag Coverage Δ
5.10-c5n.metal 84.54% <100.00%> (-0.01%) ⬇️
5.10-m5n.metal 84.52% <100.00%> (-0.02%) ⬇️
5.10-m6a.metal 83.81% <100.00%> (-0.01%) ⬇️
5.10-m6g.metal 80.89% <90.00%> (-0.01%) ⬇️
5.10-m6i.metal 84.52% <100.00%> (-0.01%) ⬇️
5.10-m7g.metal 80.89% <90.00%> (-0.01%) ⬇️
6.1-c5n.metal 84.54% <100.00%> (-0.01%) ⬇️
6.1-m5n.metal 84.52% <100.00%> (-0.02%) ⬇️
6.1-m6a.metal 83.81% <100.00%> (-0.02%) ⬇️
6.1-m6g.metal 80.89% <90.00%> (-0.01%) ⬇️
6.1-m6i.metal 84.51% <100.00%> (-0.02%) ⬇️
6.1-m7g.metal 80.89% <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!

tools/devtool Outdated Show resolved Hide resolved
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 <[email protected]>
Signed-off-by: Patrick Roy <[email protected]>
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
4 participants