diff --git a/vm-virtio/src/device.rs b/vm-virtio/src/device.rs index 27d22d51d..a5d7699f8 100644 --- a/vm-virtio/src/device.rs +++ b/vm-virtio/src/device.rs @@ -6,7 +6,7 @@ // // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause -use super::*; +use crate::{ActivateResult, Error, Queue}; use std::sync::Arc; use vm_memory::{GuestAddress, GuestMemoryAtomic, GuestMemoryMmap, GuestUsize}; use vmm_sys_util::eventfd::EventFd; @@ -106,6 +106,10 @@ pub trait VirtioDevice: Send { /// every device as part of shutting down the VM. Acting on the device /// after a shutdown() can lead to unpredictable results. fn shutdown(&mut self) {} + + fn update_memory(&mut self, _mem: &GuestMemoryMmap) -> std::result::Result<(), Error> { + Ok(()) + } } /// Trait providing address translation the same way a physical DMA remapping diff --git a/vm-virtio/src/lib.rs b/vm-virtio/src/lib.rs index 7d0bb2794..b96ced73a 100755 --- a/vm-virtio/src/lib.rs +++ b/vm-virtio/src/lib.rs @@ -175,4 +175,5 @@ pub enum Error { EpollCtl(io::Error), EpollWait(io::Error), FailedSignalingDriver(io::Error), + VhostUserUpdateMemory(vhost_user::Error), }