Merge pull request #10577 from Apokleos/fix-vfiodev-name

runtime-rs: fix vfio device name combination issue
This commit is contained in:
Fupan Li 2024-11-26 09:35:45 +08:00 committed by GitHub
commit 28166c8a32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -438,7 +438,7 @@ impl VfioDevice {
let mut hostdev: HostDevice = self
.set_vfio_config(iommu_devs_path.clone(), device)
.context("set vfio config failed")?;
let dev_prefix = self.get_vfio_prefix();
let dev_prefix = format!("{}_{}", self.get_vfio_prefix(), &vfio_group);
hostdev.hostdev_id = make_device_nameid(&dev_prefix, index, MAX_DEV_ID_SIZE);
self.devices.push(hostdev);