mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-virtio: rng: Expect an identifier upon device creation
This identifier is chosen from the DeviceManager so that it will manage all identifiers across the VM, which will ensure uniqueness. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
9eb7413fab
commit
2e91b73881
@@ -1437,7 +1437,7 @@ impl DeviceManager {
|
||||
let id = String::from(RNG_DEVICE_NAME);
|
||||
|
||||
let virtio_rng_device = Arc::new(Mutex::new(
|
||||
vm_virtio::Rng::new(rng_path, rng_config.iommu)
|
||||
vm_virtio::Rng::new(id.clone(), rng_path, rng_config.iommu)
|
||||
.map_err(DeviceManagerError::CreateVirtioRng)?,
|
||||
));
|
||||
devices.push((
|
||||
|
||||
Reference in New Issue
Block a user