-
Notifications
You must be signed in to change notification settings - Fork 165
vmm_test: saving when submission queue is full #2722
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 (
ExpectedGuestDeviceandget_device_paths) into a sharedutilsmodule - Added support for customizing the CAP.MQES register value in the NVMe fault controller
- Implemented a new test
_servicing_keepalive_with_iothat 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 |
Copilot
AI
Jan 31, 2026
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
| // #[openvmm_test(openhcl_linux_direct_x64 [LATEST_LINUX_DIRECT_TEST_X64])] | ||
| async fn _servicing_keepalive_with_io( |
Copilot
AI
Jan 31, 2026
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <[email protected]>
|
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. |
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.