mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: api: Introduce new "add-device" HTTP endpoint
This commit introduces the new command "add-device" that will let a user hotplug a VFIO PCI device to an already running VM. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
0f1396acef
commit
0e58741a09
@@ -540,6 +540,16 @@ impl Vm {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn add_device(&mut self, path: String) -> Result<()> {
|
||||
self.devices
|
||||
.lock()
|
||||
.unwrap()
|
||||
.add_device(path)
|
||||
.map_err(Error::DeviceManager)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn os_signal_handler(signals: Signals, console_input_clone: Arc<Console>, on_tty: bool) {
|
||||
for signal in signals.forever() {
|
||||
match signal {
|
||||
|
||||
Reference in New Issue
Block a user