summary refs log tree commit diff
path: root/sys_util
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-06-14 20:18:48 +0000
committerAlyssa Ross <hi@alyssa.is>2020-06-15 09:37:07 +0000
commit4d2e22e374e8ac93be227f0357efd2c0d7a9f699 (patch)
tree738ba443359adaf7311abf2fdddb750263d18587 /sys_util
parent8214c4c64fbdbf6ae84634bb822a90959271cad5 (diff)
downloadcrosvm-4d2e22e374e8ac93be227f0357efd2c0d7a9f699.tar
crosvm-4d2e22e374e8ac93be227f0357efd2c0d7a9f699.tar.gz
crosvm-4d2e22e374e8ac93be227f0357efd2c0d7a9f699.tar.bz2
crosvm-4d2e22e374e8ac93be227f0357efd2c0d7a9f699.tar.lz
crosvm-4d2e22e374e8ac93be227f0357efd2c0d7a9f699.tar.xz
crosvm-4d2e22e374e8ac93be227f0357efd2c0d7a9f699.tar.zst
crosvm-4d2e22e374e8ac93be227f0357efd2c0d7a9f699.zip
switch from poly_msg_socket to msg_socket2
Diffstat (limited to 'sys_util')
-rw-r--r--sys_util/Cargo.toml1
-rw-r--r--sys_util/src/guest_address.rs4
2 files changed, 4 insertions, 1 deletions
diff --git a/sys_util/Cargo.toml b/sys_util/Cargo.toml
index beba374..d51d2ff 100644
--- a/sys_util/Cargo.toml
+++ b/sys_util/Cargo.toml
@@ -12,5 +12,6 @@ poll_token_derive = { version = "*", path = "poll_token_derive" }
 sync = { path = "../sync" } # provided by ebuild
 syscall_defines = { path = "../syscall_defines" } # provided by ebuild
 tempfile = { path = "../tempfile" } # provided by ebuild
+serde = { version = "*", features = ["derive"] }
 
 [workspace]
diff --git a/sys_util/src/guest_address.rs b/sys_util/src/guest_address.rs
index 1b78e71..48772b2 100644
--- a/sys_util/src/guest_address.rs
+++ b/sys_util/src/guest_address.rs
@@ -8,8 +8,10 @@ use std::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
 use std::fmt::{self, Display};
 use std::ops::{BitAnd, BitOr};
 
+use serde::{Deserialize, Serialize};
+
 /// Represents an Address in the guest's memory.
-#[derive(Clone, Copy, Debug)]
+#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
 pub struct GuestAddress(pub u64);
 
 impl GuestAddress {