From 1f7aadff120044854c41b9805e30bb7f641b4d61 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Wed, 11 Sep 2019 16:29:26 -0400 Subject: [PATCH] Use MemoryManager rather than GuestRam --- rust/src/devices/virtio_9p/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rust/src/devices/virtio_9p/mod.rs b/rust/src/devices/virtio_9p/mod.rs index f10b135..e4ab943 100644 --- a/rust/src/devices/virtio_9p/mod.rs +++ b/rust/src/devices/virtio_9p/mod.rs @@ -3,7 +3,7 @@ use std::thread; use std::path::{Path,PathBuf}; -use crate::memory::GuestRam; +use crate::memory::{GuestRam, MemoryManager}; use crate::virtio::{self,VirtioBus,VirtioDeviceOps, VirtQueue}; use crate::vm::Result; @@ -71,11 +71,12 @@ impl VirtioDeviceOps for VirtioP9 { } - fn start(&mut self, memory: GuestRam, mut queues: Vec) { + fn start(&mut self, memory: &MemoryManager, mut queues: Vec) { let vq = queues.pop().unwrap(); let root_dir = self.root_dir.clone(); let init_path = self.init_path.clone(); - thread::spawn(|| run_device(memory, vq, root_dir, init_path)); + let ram = memory.guest_ram().clone(); + thread::spawn(|| run_device(ram, vq, root_dir, init_path)); } }