提交 8a1acc7e 编写于 作者: B Bjoern Walk 提交者: John Ferlan

qemu: hotplug: fix mdev attach for vfio-ccw

Mediated devices of model 'vfio-ccw' are using CCW addresses, so make
sure to call the correct address preparation code for the model.
Reviewed-by: NShalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: NBjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 5c73acec
......@@ -2446,8 +2446,15 @@ qemuDomainAttachMediatedDevice(virQEMUDriverPtr driver,
virDomainDeviceDef dev = { VIR_DOMAIN_DEVICE_HOSTDEV,
{ .hostdev = hostdev } };
if (qemuDomainEnsurePCIAddress(vm, &dev, driver) < 0)
return -1;
switch (hostdev->source.subsys.u.mdev.model) {
case VIR_MDEV_MODEL_TYPE_VFIO_PCI:
if (qemuDomainEnsurePCIAddress(vm, &dev, driver) < 0)
return -1;
break;
case VIR_MDEV_MODEL_TYPE_VFIO_CCW:
case VIR_MDEV_MODEL_TYPE_LAST:
break;
}
if (qemuHostdevPrepareMediatedDevices(driver,
vm->def->name,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册