Skip to content

Conversation

@gurasinghMS
Copy link
Contributor

This vmm test adds in a test case where the submission queue is full at the time of saving/servicing. This causes the run loop in the queue pair handler to not pick up on save commands sent to the Handler.
The controller in this case is unresponsive on IO queues only. The test case seems to only work when MQES is small enough that the submission queue can be easily and quickly filled up.

@gurasinghMS gurasinghMS requested review from a team as code owners January 31, 2026 00:45
Copilot AI review requested due to automatic review settings January 31, 2026 00:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a test case to verify NVMe controller behavior when the submission queue is full during servicing operations. The test ensures that the queue pair handler can still process save commands even when the queue is saturated with I/O operations.

Changes:

  • Refactored common test utilities (ExpectedGuestDevice and get_device_paths) into a shared utils module
  • Added support for customizing the CAP.MQES register value in the NVMe fault controller
  • Implemented a new test _servicing_keepalive_with_io that fills the submission queue and verifies servicing still succeeds

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vmm_tests/vmm_tests/tests/tests/x86_64/storage.rs Removed duplicate utility functions and added imports to use shared utilities
vmm_tests/vmm_tests/tests/tests/utils.rs New shared utilities module containing ExpectedGuestDevice struct and get_device_paths function
vmm_tests/vmm_tests/tests/tests/multiarch/openhcl_servicing.rs Added new test case and helper function for disk I/O, updated existing test calls to use new signature
vmm_tests/vmm_tests/tests/tests/main.rs Added utils module declaration
vm/devices/storage/nvme_test/src/pci.rs Modified CAP register read to support custom MQES values
vm/devices/storage/nvme_resources/src/fault.rs Added custom_cap_mqes field to PciFaultConfig

fault_start_updater.set(true).await;
let _io_child = large_read_from_disk(&agent, disk_path).await?;

cmd!(sh, "sleep 5").run().await?; // Give some time for IO to start and fill the queue
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

The sleep duration of 5 seconds is a magic number. Consider defining it as a constant (e.g., const QUEUE_FILL_DELAY: Duration = Duration::from_secs(5)) to make the code more maintainable and self-documenting.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Comment on lines 579 to 580
// #[openvmm_test(openhcl_linux_direct_x64 [LATEST_LINUX_DIRECT_TEST_X64])]
async fn _servicing_keepalive_with_io(
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

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

The test function _servicing_keepalive_with_io is commented out and not running. The test attribute on line 579 should be uncommented to enable this test case, or the entire test should be removed if it's not ready.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is currently by design.

@gurasinghMS
Copy link
Contributor Author

The fix is pushed to main. Intentionally keeping this branch behind for the time being to further verify vmm test failures / expected behavior. Will rebase this branch on main before merging.

@github-actions
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant