Skip to content

Run all tests on PCIe kernel #5300

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

Draft
wants to merge 9 commits into
base: feature/pcie
Choose a base branch
from

Conversation

Manciukic
Copy link
Contributor

Changes

Move the PCI configuration to the VM factory so that we can have uvm_plain* fixtures also run the tests on PCIe kernels. Also cleanup some places where the uvm_plain was simpler.

Reason

Not all tests were running on PCIe, hiding some issues

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 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.

Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 32.55814% with 58 lines in your changes missing coverage. Please review.

Project coverage is 80.16%. Comparing base (19f2790) to head (56bb419).

Files with missing lines Patch % Lines
src/vmm/src/device_manager/mod.rs 0.00% 21 Missing ⚠️
src/vmm/src/lib.rs 0.00% 16 Missing ⚠️
src/vmm/src/persist.rs 0.00% 16 Missing ⚠️
src/vmm/src/arch/aarch64/gic/gicv2/mod.rs 0.00% 3 Missing ⚠️
...c/vmm/src/arch/aarch64/gic/gicv2/regs/dist_regs.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           feature/pcie    #5300      +/-   ##
================================================
- Coverage         80.20%   80.16%   -0.05%     
================================================
  Files               265      265              
  Lines             30832    30867      +35     
================================================
+ Hits              24730    24745      +15     
- Misses             6102     6122      +20     
Flag Coverage Δ
5.10-c5n.metal 79.90% <26.38%> (-0.05%) ⬇️
5.10-m5n.metal 79.90% <26.38%> (-0.06%) ⬇️
5.10-m6a.metal 79.09% <26.38%> (-0.06%) ⬇️
5.10-m6g.metal 76.49% <31.76%> (-0.05%) ⬇️
5.10-m6i.metal 79.90% <26.38%> (-0.05%) ⬇️
5.10-m7a.metal-48xl 79.08% <26.38%> (-0.05%) ⬇️
5.10-m7g.metal 76.49% <31.76%> (-0.05%) ⬇️
5.10-m7i.metal-24xl 79.87% <26.38%> (-0.05%) ⬇️
5.10-m7i.metal-48xl 79.87% <26.38%> (-0.05%) ⬇️
5.10-m8g.metal-24xl 76.49% <31.76%> (-0.05%) ⬇️
5.10-m8g.metal-48xl 76.49% <31.76%> (-0.05%) ⬇️
6.1-c5n.metal 79.94% <26.38%> (-0.06%) ⬇️
6.1-m5n.metal 79.94% <26.38%> (-0.06%) ⬇️
6.1-m6a.metal 79.14% <26.38%> (-0.06%) ⬇️
6.1-m6g.metal 76.48% <31.76%> (-0.06%) ⬇️
6.1-m6i.metal 79.93% <26.38%> (-0.06%) ⬇️
6.1-m7a.metal-48xl 79.13% <26.38%> (-0.06%) ⬇️
6.1-m7g.metal 76.49% <31.76%> (-0.05%) ⬇️
6.1-m7i.metal-24xl 79.95% <26.38%> (-0.05%) ⬇️
6.1-m7i.metal-48xl 79.95% <26.38%> (-0.06%) ⬇️
6.1-m8g.metal-24xl 76.49% <31.76%> (-0.05%) ⬇️
6.1-m8g.metal-48xl 76.49% <31.76%> (-0.05%) ⬇️

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.

@Manciukic Manciukic force-pushed the pcie/run-all-tests-on-pcie branch 7 times, most recently from 9f992ac to fcaff05 Compare July 9, 2025 16:26
@Manciukic Manciukic mentioned this pull request Jul 10, 2025
10 tasks
@Manciukic Manciukic force-pushed the pcie/run-all-tests-on-pcie branch 3 times, most recently from 104d1e1 to f1dd2b4 Compare July 10, 2025 13:33
The vmm was only checking the mmio device manager for finding the device
to update. Use the generic device manager instead.

Also update unit tests that expect a specific string.

Signed-off-by: Riccardo Mancini <mancio@amazon.com>
The code managing the balloon logic is only looking at the mmio device
manager. Make it use the generic device manager to find the device.

Signed-off-by: Riccardo Mancini <mancio@amazon.com>
The device rename wasn't working on PCI devices because the code only
checked the MMIO state.
Fix the bug by looking for the device to rename in both the mmio and pci
states.

Signed-off-by: Riccardo Mancini <mancio@amazon.com>
@Manciukic Manciukic force-pushed the pcie/run-all-tests-on-pcie branch 6 times, most recently from c43ed1f to 4c87b02 Compare July 11, 2025 16:00
Currently, we're limited to 24 GSI lines, which is too little for PCI
devices. Keep the current ranges as "legacy IRQ", and create a new range
for "GSI" that goes up to the kvm theoretical maximum of 4096 lines.

Signed-off-by: Riccardo Mancini <mancio@amazon.com>
Tell systemd not to use "predictable names" for network devices (eg
enp0s1), but keep the ethN set by the kernel.
This is equivalent to passing net.ifnames=0 to the kernel command line.

Signed-off-by: Riccardo Mancini <mancio@amazon.com>
pci=off is just an optimization to skip the probing, it shouldn't matter
to the functionality of the tests. Dropping it to allow them to run with
PCI.

Signed-off-by: Riccardo Mancini <mancio@amazon.com>
Move the PCI configuration to the VM factory so that we can have
uvm_plain* fixtures also run the tests on PCIe kernels.
Also cleanup some places where the uvm_plain was simpler.

Signed-off-by: Riccardo Mancini <mancio@amazon.com>
This patch makes 2 changes to make the test work on PCI:
 - simplify logic to find device address to be generic irrespective of
   ACPI/no-ACPI, PCI/no-PCI
 - move config offset from within the C program to the python test, as
   it's different between MMIO (0x100) and PCI (0x4000)

Signed-off-by: Riccardo Mancini <mancio@amazon.com>
This commit allows more test to run with PCI enabled, just in case we
missed something else.

Signed-off-by: Riccardo Mancini <mancio@amazon.com>
@Manciukic Manciukic force-pushed the pcie/run-all-tests-on-pcie branch from 4c87b02 to 56bb419 Compare July 11, 2025 16:15
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