vmm: Add support for hotplugging a vDPA device

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2022-03-11 11:32:53 +01:00
parent c73c6039c3
commit 3fea5f5396
8 changed files with 175 additions and 9 deletions

View File

@@ -102,6 +102,9 @@ pub enum HttpError {
/// Could not add a network device to a VM
VmAddNet(ApiError),
/// Could not add a vDPA device to a VM
VmAddVdpa(ApiError),
/// Could not add a vsock device to a VM
VmAddVsock(ApiError),
@@ -220,6 +223,7 @@ lazy_static! {
r.routes.insert(endpoint!("/vm.add-fs"), Box::new(VmActionHandler::new(VmAction::AddFs(Arc::default()))));
r.routes.insert(endpoint!("/vm.add-net"), Box::new(VmActionHandler::new(VmAction::AddNet(Arc::default()))));
r.routes.insert(endpoint!("/vm.add-pmem"), Box::new(VmActionHandler::new(VmAction::AddPmem(Arc::default()))));
r.routes.insert(endpoint!("/vm.add-vdpa"), Box::new(VmActionHandler::new(VmAction::AddVdpa(Arc::default()))));
r.routes.insert(endpoint!("/vm.add-vsock"), Box::new(VmActionHandler::new(VmAction::AddVsock(Arc::default()))));
r.routes.insert(endpoint!("/vm.boot"), Box::new(VmActionHandler::new(VmAction::Boot)));
r.routes.insert(endpoint!("/vm.counters"), Box::new(VmActionHandler::new(VmAction::Counters)));