mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
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: Shalini Chellathurai Saroja <shalini@linux.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
5c73acec32
commit
8a1acc7ebc
@ -2446,8 +2446,15 @@ qemuDomainAttachMediatedDevice(virQEMUDriverPtr driver,
|
||||
virDomainDeviceDef dev = { VIR_DOMAIN_DEVICE_HOSTDEV,
|
||||
{ .hostdev = hostdev } };
|
||||
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user