mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-22 07:51:16 +00:00
virtio-devices: Remove unused update_memory() from VirtioDevice trait
Now that virtio devices can be updated with add_memory_region(), there's no need to keep update_memory() around. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
00873e5f84
commit
ec9e6edcd0
@ -139,10 +139,6 @@ pub trait VirtioDevice: Send {
|
|||||||
/// after a shutdown() can lead to unpredictable results.
|
/// after a shutdown() can lead to unpredictable results.
|
||||||
fn shutdown(&mut self) {}
|
fn shutdown(&mut self) {}
|
||||||
|
|
||||||
fn update_memory(&mut self, _mem: &GuestMemoryMmap) -> std::result::Result<(), Error> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn add_memory_region(
|
fn add_memory_region(
|
||||||
&mut self,
|
&mut self,
|
||||||
_region: &Arc<GuestRegionMmap>,
|
_region: &Arc<GuestRegionMmap>,
|
||||||
|
@ -315,10 +315,6 @@ impl VirtioDevice for Blk {
|
|||||||
let _ = unsafe { libc::close(self.vhost_user_blk.as_raw_fd()) };
|
let _ = unsafe { libc::close(self.vhost_user_blk.as_raw_fd()) };
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_memory(&mut self, mem: &GuestMemoryMmap) -> std::result::Result<(), crate::Error> {
|
|
||||||
update_mem_table(&mut self.vhost_user_blk, mem).map_err(crate::Error::VhostUserUpdateMemory)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn add_memory_region(
|
fn add_memory_region(
|
||||||
&mut self,
|
&mut self,
|
||||||
region: &Arc<GuestRegionMmap>,
|
region: &Arc<GuestRegionMmap>,
|
||||||
|
@ -557,10 +557,6 @@ impl VirtioDevice for Fs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_memory(&mut self, mem: &GuestMemoryMmap) -> std::result::Result<(), crate::Error> {
|
|
||||||
update_mem_table(&mut self.vu, mem).map_err(crate::Error::VhostUserUpdateMemory)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn add_memory_region(
|
fn add_memory_region(
|
||||||
&mut self,
|
&mut self,
|
||||||
region: &Arc<GuestRegionMmap>,
|
region: &Arc<GuestRegionMmap>,
|
||||||
|
@ -373,10 +373,6 @@ impl VirtioDevice for Net {
|
|||||||
let _ = unsafe { libc::close(self.vhost_user_net.as_raw_fd()) };
|
let _ = unsafe { libc::close(self.vhost_user_net.as_raw_fd()) };
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_memory(&mut self, mem: &GuestMemoryMmap) -> std::result::Result<(), crate::Error> {
|
|
||||||
update_mem_table(&mut self.vhost_user_net, mem).map_err(crate::Error::VhostUserUpdateMemory)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn add_memory_region(
|
fn add_memory_region(
|
||||||
&mut self,
|
&mut self,
|
||||||
region: &Arc<GuestRegionMmap>,
|
region: &Arc<GuestRegionMmap>,
|
||||||
|
Loading…
Reference in New Issue
Block a user