mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: add endpoint api for NMI support
Add http endpoint for trigger nmi. Signed-off-by: Yi Wang <foxywang@tencent.com>
This commit is contained in:
@@ -9,7 +9,7 @@ use crate::api::http::{error_response, EndpointHandler, HttpError};
|
||||
use crate::api::VmCoredump;
|
||||
use crate::api::{
|
||||
AddDisk, ApiAction, ApiRequest, VmAddDevice, VmAddFs, VmAddNet, VmAddPmem, VmAddUserDevice,
|
||||
VmAddVdpa, VmAddVsock, VmBoot, VmConfig, VmCounters, VmDelete, VmPause, VmPowerButton,
|
||||
VmAddVdpa, VmAddVsock, VmBoot, VmConfig, VmCounters, VmDelete, VmNmi, VmPause, VmPowerButton,
|
||||
VmReboot, VmReceiveMigration, VmRemoveDevice, VmResize, VmResizeZone, VmRestore, VmResume,
|
||||
VmSendMigration, VmShutdown, VmSnapshot,
|
||||
};
|
||||
@@ -172,6 +172,7 @@ vm_action_put_handler!(VmReboot);
|
||||
vm_action_put_handler!(VmPause);
|
||||
vm_action_put_handler!(VmResume);
|
||||
vm_action_put_handler!(VmPowerButton);
|
||||
vm_action_put_handler!(VmNmi);
|
||||
|
||||
vm_action_put_handler_body!(VmAddDevice);
|
||||
vm_action_put_handler_body!(AddDisk);
|
||||
|
||||
@@ -8,7 +8,7 @@ use self::http_endpoint::{VmActionHandler, VmCreate, VmInfo, VmmPing, VmmShutdow
|
||||
use crate::api::VmCoredump;
|
||||
use crate::api::{
|
||||
AddDisk, ApiError, ApiRequest, VmAddDevice, VmAddFs, VmAddNet, VmAddPmem, VmAddUserDevice,
|
||||
VmAddVdpa, VmAddVsock, VmBoot, VmCounters, VmDelete, VmPause, VmPowerButton, VmReboot,
|
||||
VmAddVdpa, VmAddVsock, VmBoot, VmCounters, VmDelete, VmNmi, VmPause, VmPowerButton, VmReboot,
|
||||
VmReceiveMigration, VmRemoveDevice, VmResize, VmResizeZone, VmRestore, VmResume,
|
||||
VmSendMigration, VmShutdown, VmSnapshot,
|
||||
};
|
||||
@@ -268,6 +268,8 @@ pub static HTTP_ROUTES: Lazy<HttpRoutes> = Lazy::new(|| {
|
||||
.insert(endpoint!("/vmm.ping"), Box::new(VmmPing {}));
|
||||
r.routes
|
||||
.insert(endpoint!("/vmm.shutdown"), Box::new(VmmShutdown {}));
|
||||
r.routes
|
||||
.insert(endpoint!("/vm.nmi"), Box::new(VmActionHandler::new(&VmNmi)));
|
||||
|
||||
r
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user