vm-virtio: Add the ability to serialize a Queue

This commit relies on serde to serialize and deserialize the content of
a Queue structure. This will be useful information to store when
implementing snapshot/restore feature for virtio devices.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2020-04-08 09:53:12 +08:00
committed by Sebastien Boeuf
parent b7faf4fdc1
commit fd45e94510
4 changed files with 22 additions and 2 deletions

4
Cargo.lock generated
View File

@@ -1454,6 +1454,7 @@ dependencies = [
name = "vm-virtio"
version = "0.1.0"
dependencies = [
"anyhow",
"arc-swap",
"byteorder",
"devices",
@@ -1463,6 +1464,9 @@ dependencies = [
"net_gen",
"net_util",
"pci",
"serde",
"serde_derive",
"serde_json",
"tempfile",
"vhost",
"virtio-bindings 0.1.0 (git+https://github.com/rust-vmm/virtio-bindings)",