Skip to content

Commit 31f7d2d

Browse files
committed
feat(virtio-mem): implement virtio requests
This commit adds block state management and implements the virtio requests for the virtio-mem device. Block state is tracked using a BitVec, each bit representing a single block. Plug/Unplug requests are validated before being executed to verify the range is valid (aligned and within range), and that all blocks in range are unplugged/plugged, as per the virtio spec. UplugAll is the only request where usable_region_size can be lowered. This commit is missing the dynamic KVM slot management which will be added later. Signed-off-by: Riccardo Mancini <[email protected]>
1 parent 7d5c649 commit 31f7d2d

File tree

6 files changed

+262
-23
lines changed

6 files changed

+262
-23
lines changed

Cargo.lock

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/vmm/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ aws-lc-rs = { version = "1.14.0", features = ["bindgen"] }
2323
base64 = "0.22.1"
2424
bincode = { version = "2.0.1", features = ["serde"] }
2525
bitflags = "2.9.4"
26+
bitvec = { version = "1.0.1", features = ["atomic", "serde"] }
2627
byteorder = "1.5.0"
2728
crc64 = "2.0.0"
2829
derive_more = { version = "2.0.1", default-features = false, features = [

0 commit comments

Comments
 (0)