mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
vfio/container: Implement attach/detach_device
No functional change intended. Signed-off-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
f79baf8c95
commit
1eb31f13b2
2 changed files with 21 additions and 7 deletions
|
@ -1498,3 +1498,19 @@ retry:
|
|||
|
||||
return info;
|
||||
}
|
||||
|
||||
int vfio_attach_device(char *name, VFIODevice *vbasedev,
|
||||
AddressSpace *as, Error **errp)
|
||||
{
|
||||
const VFIOIOMMUOps *ops = &vfio_legacy_ops;
|
||||
|
||||
return ops->attach_device(name, vbasedev, as, errp);
|
||||
}
|
||||
|
||||
void vfio_detach_device(VFIODevice *vbasedev)
|
||||
{
|
||||
if (!vbasedev->bcontainer) {
|
||||
return;
|
||||
}
|
||||
vbasedev->bcontainer->ops->detach_device(vbasedev);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue