Skip to content

Commit 8c2669f

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 <mvaralar@redhat.com>
1 parent a8d0a95 commit 8c2669f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

virtio-queue/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ 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.5" }
20+
libc = "0.2.161"
2021

2122
[dev-dependencies]
2223
criterion = "0.6.0"

virtio-queue/src/queue.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,12 @@ impl Queue {
273273
#[allow(dead_code)]
274274
mod verification {
275275
use std::mem::ManuallyDrop;
276+
use vm_memory::MmapRegion;
277+
276278
use std::num::Wrapping;
279+
use vm_memory::FileOffset;
277280

278-
use vm_memory::{FileOffset, GuestMemoryRegion, MemoryRegionAddress, MmapRegion};
281+
use vm_memory::{GuestMemoryRegion, MemoryRegionAddress};
279282

280283
use super::*;
281284

0 commit comments

Comments
 (0)