[VFIO] Chapter 2, Section 3: BAR areas and mappings - #6114
Merged
ShadowCurse merged 5 commits intoSep 2, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/vfio #6114 +/- ##
================================================
- Coverage 82.85% 82.77% -0.08%
================================================
Files 280 280
Lines 31115 31413 +298
================================================
+ Hits 25781 26003 +222
- Misses 5334 5410 +76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ShadowCurse
force-pushed
the
vfio_part_2_3
branch
3 times, most recently
from
August 18, 2026 09:34
7cfcfd7 to
3acd6b7
Compare
Make `arrayvec` non optional as it will be used in the future VFIO commits. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse
force-pushed
the
vfio_part_2_3
branch
from
August 19, 2026 10:39
3acd6b7 to
695c68d
Compare
ShadowCurse
marked this pull request as ready for review
August 19, 2026 10:41
Add new utility functions for dealing with alignment of addresses. These will be used in the following commits. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse
force-pushed
the
vfio_part_2_3
branch
from
August 19, 2026 10:52
695c68d to
15ec203
Compare
ShadowCurse
force-pushed
the
vfio_part_2_3
branch
from
August 19, 2026 15:36
15ec203 to
9239cd9
Compare
ilstam
reviewed
Aug 21, 2026
ilstam
reviewed
Aug 26, 2026
Manciukic
reviewed
Aug 27, 2026
ShadowCurse
force-pushed
the
vfio_part_2_3
branch
3 times, most recently
from
September 1, 2026 13:41
476cade to
825b501
Compare
Manciukic
previously approved these changes
Sep 1, 2026
Manciukic
left a comment
Contributor
There was a problem hiding this comment.
LGTM, just a followup we should track and a missing test (non-blocking).
Also a few typos: "emualted" (:572), "kerneld" (:731), "provied" (:748), "regon" (:802), "correspoinding" (:923).
ilstam
previously approved these changes
Sep 1, 2026
ShadowCurse
force-pushed
the
vfio_part_2_3
branch
2 times, most recently
from
September 1, 2026 16:39
fb15d96 to
8c51e99
Compare
Instead of widening results to `u64`s, return smaller `u32`/`u16` directly and let the caller widening them if needed. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse
force-pushed
the
vfio_part_2_3
branch
from
September 1, 2026 16:49
8c51e99 to
92c6cfd
Compare
ilstam
previously approved these changes
Sep 1, 2026
Calculate areas of BARs which either should be mmapped and provided to the guest or fully emulated. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
After calculating the DMA areas of BARs, map them into the guest. This involves `mmap`ing the device BAR into Firecracker virtual space, and creating KVM slots for them. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ShadowCurse
force-pushed
the
vfio_part_2_3
branch
from
September 2, 2026 11:45
92c6cfd to
1f9ff59
Compare
ilstam
approved these changes
Sep 2, 2026
Manciukic
approved these changes
Sep 2, 2026
ShadowCurse
merged commit Sep 2, 2026
fb33146
into
firecracker-microvm:feature/vfio
5 of 7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Another set of commits taken from #6055 PR. Here we add logic for calculating mappable areas of BARs (taking into account the holes left by the MSIX tables) and actually doing the actual map operations.
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.