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:
Yi Wang
2023-11-26 18:59:54 +08:00
committed by Rob Bradford
parent f8ac38d113
commit f40dd4a993
5 changed files with 58 additions and 2 deletions
+9
View File
@@ -1840,6 +1840,15 @@ impl RequestHandler for Vmm {
}
}
fn vm_nmi(&mut self) -> result::Result<(), VmError> {
if let Some(ref mut vm) = self.vm {
info!("nmi");
vm.power_button()
} else {
Err(VmError::VmNotRunning)
}
}
fn vm_receive_migration(
&mut self,
receive_data_migration: VmReceiveMigrationData,