vfio_user: Add a simple sample device

This implements a similar GPIO device to that found in the libvfio-user
source code.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2023-02-10 18:17:38 +00:00
committed by Bo Chen
parent b7c2a0f23f
commit b072eb454e
3 changed files with 196 additions and 1 deletions
+8 -1
View File
@@ -4,6 +4,9 @@ version = "0.1.0"
authors = ["The Cloud Hypervisor Authors"]
edition = "2021"
[[example]]
name = "gpio"
[dependencies]
bitflags = "1.3.2"
libc = "0.2.139"
@@ -14,4 +17,8 @@ serde_json = "1.0.93"
thiserror = "1.0.38"
vfio-bindings = { git = "https://github.com/rust-vmm/vfio", branch = "main", features = ["fam-wrappers"] }
vm-memory = { version = "0.10.0", features = ["backend-mmap", "backend-atomic"] }
vmm-sys-util = "0.11.0"
vmm-sys-util = "0.11.0"
[dev-dependencies]
env_logger = "0.10.0"
pci = { path = "../pci" }