summaryrefslogtreecommitdiff
path: root/src/vhost_user/dummy_slave.rs
diff options
context:
space:
mode:
authorSebastien Boeuf <sebastien.boeuf@intel.com>2021-03-04 17:43:35 +0100
committerJiang Liu <gerry@linux.alibaba.com>2021-03-10 23:37:29 +0800
commit7e3ab1af4e1c2157e206798683b64eb384c3693a (patch)
treefb40e5705f62b2374b8dc5d639b60d1792b3a89d /src/vhost_user/dummy_slave.rs
parente7d46d6980ed1312e16243ff2ec4bb018f9aec5f (diff)
downloadvmm_vhost-7e3ab1af4e1c2157e206798683b64eb384c3693a.tar.gz
vhost_user: Add support for ADD_MEM_REG
Adding support for a new message ADD_MEM_REG. This command request a new region to be added and mapped by the vhost-user backend. It is designed for supporting memory hotplug, avoiding the limitation from SET_MEM_TABLE (supports only 8 regions). It is only available if the protocol feature VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS has been negotiated. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Diffstat (limited to 'src/vhost_user/dummy_slave.rs')
-rw-r--r--src/vhost_user/dummy_slave.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vhost_user/dummy_slave.rs b/src/vhost_user/dummy_slave.rs
index 989888f..895537b 100644
--- a/src/vhost_user/dummy_slave.rs
+++ b/src/vhost_user/dummy_slave.rs
@@ -248,4 +248,8 @@ impl VhostUserSlaveReqHandlerMut for DummySlaveReqHandler {
fn get_max_mem_slots(&mut self) -> Result<u64> {
Ok(MAX_MEM_SLOTS as u64)
}
+
+ fn add_mem_region(&mut self, _region: &VhostUserSingleMemoryRegion, _fd: RawFd) -> Result<()> {
+ Ok(())
+ }
}