mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
vfio: Get migration capability flags for container
Added helper functions to get IOMMU info capability chain. Added function to get migration capability information from that capability chain for IOMMU container. Similar change was proposed earlier: https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg03759.html Disable migration for devices if IOMMU module doesn't support migration capability. Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com> Cc: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Cc: Eric Auger <eric.auger@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
74ee653799
commit
87ea529c50
3 changed files with 91 additions and 9 deletions
|
@ -832,9 +832,14 @@ err:
|
|||
|
||||
int vfio_migration_probe(VFIODevice *vbasedev, Error **errp)
|
||||
{
|
||||
VFIOContainer *container = vbasedev->group->container;
|
||||
struct vfio_region_info *info = NULL;
|
||||
Error *local_err = NULL;
|
||||
int ret;
|
||||
int ret = -ENOTSUP;
|
||||
|
||||
if (!container->dirty_pages_supported) {
|
||||
goto add_blocker;
|
||||
}
|
||||
|
||||
ret = vfio_get_dev_region_info(vbasedev, VFIO_REGION_TYPE_MIGRATION,
|
||||
VFIO_REGION_SUBTYPE_MIGRATION, &info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue