Skip to content

Commit 57e3370

Browse files
MatiasVarapriyasiddharth
authored andcommitted
Add proof for conformance to 2.7.7.2 section
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]>
1 parent f730282 commit 57e3370

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

virtio-queue/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ edition = "2021"
1313
test-utils = []
1414

1515
[dependencies]
16-
vm-memory = { workspace = true }
16+
vm-memory = { workspace = true, features = ["backend-mmap", "backend-bitmap"] }
1717
vmm-sys-util = { workspace = true }
1818
log = "0.4.17"
1919
virtio-bindings = { path="../virtio-bindings", version = "0.2.6" }

virtio-queue/src/queue.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,12 @@ impl Queue {
276276
#[allow(dead_code)]
277277
mod verification {
278278
use std::mem::ManuallyDrop;
279+
use vm_memory::MmapRegion;
280+
279281
use std::num::Wrapping;
282+
use vm_memory::FileOffset;
280283

281-
use vm_memory::{FileOffset, GuestMemoryRegion, MemoryRegionAddress, MmapRegion};
284+
use vm_memory::{GuestMemoryRegion, MemoryRegionAddress};
282285

283286
use super::*;
284287

0 commit comments

Comments
 (0)