mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Add support for adding a single memory region
Assuming vhost-user devices support CONFIGURE_MEM_SLOTS protocol feature, we introduce a new method to the VirtioDevice trait in order to update one single memory at a time. In case CONFIGURE_MEM_SLOTS is not supported by the backend (feature not acked), we fallback onto the current way of updating the memory mappings, that is with SET_MEM_TABLE. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -84,9 +84,13 @@ pub enum Error {
|
||||
MasterReqHandlerCreation(vhost::vhost_user::Error),
|
||||
/// Set slave request fd failed.
|
||||
VhostUserSetSlaveRequestFd(vhost::Error),
|
||||
/// Add memory region failed.
|
||||
VhostUserAddMemReg(VhostError),
|
||||
/// Invalid used address.
|
||||
UsedAddress,
|
||||
/// Invalid features provided from vhost-user backend
|
||||
InvalidFeatures,
|
||||
/// Missing file descriptor for the region.
|
||||
MissingRegionFd,
|
||||
}
|
||||
type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
Reference in New Issue
Block a user