mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-31 07:19:06 +00:00
gpu: IOMMUFD provide proper ID
We need a proper ID otherwise QEMU sometimes fails with invalid ID. Use the same pattern as with the old VFIO implementation. Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
This commit is contained in:
parent
e09ae2cc0b
commit
804e5cd332
@ -224,10 +224,11 @@ func GetDeviceFromVFIODev(device config.DeviceInfo) ([]*config.VFIODev, error) {
|
||||
deviceID := getPCIDeviceProperty(deviceBDF, PCISysFsDevicesDevice)
|
||||
pciClass := getPCIDeviceProperty(deviceBDF, PCISysFsDevicesClass)
|
||||
|
||||
id, err := extractIndex(device.HostPath)
|
||||
i, err := extractIndex(device.HostPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
id := utils.MakeNameID("vfio", device.ID+i, maxDevIDSize)
|
||||
|
||||
vfio := config.VFIODev{
|
||||
ID: id,
|
||||
|
Loading…
Reference in New Issue
Block a user