mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: vm: Remove vsock device from config
When doing device unplug remove the vsock device from the configuration if present. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -741,6 +741,13 @@ impl Vm {
|
||||
if let Some(pmem) = config.pmem.as_mut() {
|
||||
pmem.retain(|dev| dev.id.as_ref() != Some(&_id));
|
||||
}
|
||||
|
||||
// Remove if vsock device
|
||||
if let Some(vsock) = config.vsock.as_ref() {
|
||||
if vsock.id.as_ref() == Some(&_id) {
|
||||
config.vsock = None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.device_manager
|
||||
|
||||
Reference in New Issue
Block a user