From db4721d8709a7d139f9b6cb405b22e2a405072ff Mon Sep 17 00:00:00 2001 From: Daniel Prilik Date: Wed, 27 Feb 2019 12:24:25 -0800 Subject: crosvm: add memfd for GuestMemory Building off CL:1290293 Instead of having a seperate GuestMemoryManager, this adds SharedMemory as a Arc'd member of GuestMemory. This is nice since it removes the need to plumb the Manager struct throughout the codebase. BUG=chromium:936567 TEST=cargo test -p sys_util Change-Id: I6fa5d73f7e0db495c2803a040479818445660345 Reviewed-on: https://chromium-review.googlesource.com/1493013 Commit-Ready: Daniel Prilik Tested-by: kokoro Reviewed-by: Zach Reizner --- devices/src/virtio/vhost/net.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'devices') diff --git a/devices/src/virtio/vhost/net.rs b/devices/src/virtio/vhost/net.rs index b8e518d..2ecef9d 100644 --- a/devices/src/virtio/vhost/net.rs +++ b/devices/src/virtio/vhost/net.rs @@ -227,8 +227,8 @@ pub mod tests { fn create_guest_memory() -> result::Result { let start_addr1 = GuestAddress(0x0); - let start_addr2 = GuestAddress(0x100); - GuestMemory::new(&vec![(start_addr1, 0x100), (start_addr2, 0x400)]) + let start_addr2 = GuestAddress(0x1000); + GuestMemory::new(&vec![(start_addr1, 0x1000), (start_addr2, 0x4000)]) } fn create_net_common() -> Net> { -- cgit 1.4.1