vmm: Trigger hotplug notification to the guest
Whenever the user wants to hotplug a new VFIO PCI device, the VMM will have to trigger a hotplug notification through the GED device. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
0e58741a09
commit
d0218e94a3
2 changed files with 7 additions and 0 deletions
|
|
@ -75,5 +75,6 @@ bitflags! {
|
|||
const NO_DEVICES_CHANGED = 0;
|
||||
const CPU_DEVICES_CHANGED = 0b1;
|
||||
const MEMORY_DEVICES_CHANGED = 0b10;
|
||||
const PCI_DEVICES_CHANGED = 0b100;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -547,6 +547,12 @@ impl Vm {
|
|||
.add_device(path)
|
||||
.map_err(Error::DeviceManager)?;
|
||||
|
||||
self.devices
|
||||
.lock()
|
||||
.unwrap()
|
||||
.notify_hotplug(HotPlugNotificationFlags::PCI_DEVICES_CHANGED)
|
||||
.map_err(Error::DeviceManager)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue