Merged
Conversation
861d9be to
e42eba1
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5752 +/- ##
==========================================
- Coverage 83.04% 83.00% -0.05%
==========================================
Files 276 275 -1
Lines 29466 29396 -70
==========================================
- Hits 24471 24401 -70
Misses 4995 4995
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:
|
f0ac26e to
938e640
Compare
ilstam
reviewed
Mar 16, 2026
Manciukic
reviewed
Mar 16, 2026
Contributor
Manciukic
left a comment
There was a problem hiding this comment.
mostly LGTM, just trying to understand why are we using #[allow(clippy::cast_possible_truncation)] rather than explicitly try+unwrap/expect
f9cd251 to
d88ee1b
Compare
ilstam
reviewed
Mar 20, 2026
Contributor
|
I'm happy with this but need to see the new revision of the last commit before approving |
31dd2ee to
cb6b8a2
Compare
ilstam
reviewed
Mar 24, 2026
Contributor
|
LGTM, ready to approve once the small nitpick in the last patch is addressed (splitting it into 2). |
cf788d4 to
faddbdc
Compare
ilstam
previously approved these changes
Mar 25, 2026
ilstam
reviewed
Mar 25, 2026
faddbdc to
c382898
Compare
42b981d to
7219a56
Compare
ilstam
previously approved these changes
Mar 26, 2026
3f8d25b to
f6710f3
Compare
f6710f3 to
246859c
Compare
Manciukic
previously approved these changes
Apr 1, 2026
ilstam
previously approved these changes
Apr 1, 2026
On nightly toolchain it seems more cargofmt options are implemented, so future proof us a bit. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Instead of `get_page_size` use easier to use `host_page_size` which never errors out. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
BDF is just a `u32`, so there is no need for all the complicated scaffolding built for it. - Remove PciBdfVisitor and related methods. Derive serde traits instead - Remove conversion to/from u16. They are never used. - Make Display trait just call the Debug since the formatting is the same. - Remove parsing BDF from string since there is no use for it. - Remove corresponding unit tests for above changes and for derived traits like PartialEq. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
These are not used anywhere, so delete them. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Update enum variants with concrete values from the official resource and back the enum by u8 to make separate function to convert to u8 redundant. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
There is no reason to use traits and dynamic dispatch to convert an enum to u8. Switch all subclass enums to be backed by u8 type and just convert to u8 on use. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
In the next commit these types will be moved into vmm/pci/mod.rs and so they will need to have at least Debug trait implemented for them. Take this opportunity to clean up derives for these types. Also we require types to have docs attached to them, but these enums are standard PCI names, so docs are not required. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
246859c to
4dc48f0
Compare
The pci crate had only one file with couple of types only used in the vmm crate. And vmm crate already has pci module as well, so move pci/mod.rs into vmm/pci/mod.rs. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
When working with PCI, types used to represent different parts of the spec can use small integer types like u8/u16 instead of usize. Usage of smaller types makes it harder to make mistakes in the code and prevents accidental overflows. This commit tries to replace most of the PCI used types to the smallest ones which are enough to represent the valid range of values required. This prevents the `try_from().unwrap()` logic which can be error prone. Instead it only tries to widen the type if necessary with safe `::from` functions. In minority of cases the `#[allow(clippy::cast_possible_truncation)]` is used with an additional `assert` or other check is used to ensure the value is within correct range. No functional changes intended. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Normal BDF is 16bit value, but in linux, it is extended with a `segment` parameter and becomes 32bit. Rename the type to `PciSBDF` to better show this difference. Also rename some fields and variables following same naming. No functional changes intended. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Fix all the places where the SBDF value was passed as a raw u32 to refer to the correct PciSBDF type instead. Also fix names if needed. No functional changes intended. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
4dc48f0 to
902f301
Compare
ilstam
approved these changes
Apr 1, 2026
Manciukic
approved these changes
Apr 1, 2026
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
Reason
Maintenance
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.