Skip to content
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

Add proof for conformance to 2.7.7.2 section #324

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MatiasVara
Copy link
Contributor

@MatiasVara MatiasVara commented Jan 15, 2025

Summary of the PR

This is WIP in which I try to add a kany proof to meet the requirements outlined in 2.7.7.2 of the virtio specification regarding the notification suppression mechanism. I sketched this proof from the same proof defined for the queue implemented in firecraker. This commit adds the verify_spec_2_7_7_2() proof to verify that the implementation of queue meets 2.7.7.2 requirement. The proof relies on whether the EVENT_IDX feature has been negotiated. Conversely with test_needs_notification() test, this proof tests for all possible values of queue. To run the proof, you can run:

cargo kani

The proof currently passes:

SUMMARY:
 ** 0 of 4802 failed (280 unreachable)

 ** 1 of 1 cover properties satisfied


VERIFICATION:- SUCCESSFUL
Verification Time: 41.5208s

Complete - 1 successfully verified harnesses, 0 failures, 1 total.

If you have any comment, feel free to let me know.

Thanks.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

@MatiasVara MatiasVara force-pushed the add-verify-spec-2_7_7_2-queue branch 4 times, most recently from 51c8000 to f081641 Compare January 16, 2025 13:20
Add the verify_spec_2_7_7_2() proof to verify that the implementation of
queue satisfies 2.7.7.2 requirement. The proof relies on whether the
EVENT_IDX feature has been negotiated. Conversely with
`test_needs_notification()` test, this proof `tests` for all possible
values of the queue structure.

Signed-off-by: Matias Ezequiel Vara Larsen <[email protected]>
@MatiasVara MatiasVara force-pushed the add-verify-spec-2_7_7_2-queue branch from f081641 to baeae8b Compare January 16, 2025 16:40
@MatiasVara MatiasVara marked this pull request as ready for review January 20, 2025 16:01
@MatiasVara MatiasVara marked this pull request as draft January 29, 2025 12:42
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