vfio: Move the saving of the config space to the right place in VFIO migration
authorShenming Lu <lushenming@huawei.com>
Wed, 10 Mar 2021 03:02:31 +0000 (11:02 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 16 Mar 2021 16:06:44 +0000 (10:06 -0600)
commitd329f5032e17f3ecc7f8c2c3c5f130ec671000d2
treef50ace555b1fd49dc4ea3702ed63dc92f29b88c9
parent1a8e22bd20c2586df0bc0fdce8d5a3b42fffb1ac
vfio: Move the saving of the config space to the right place in VFIO migration

On ARM64 the VFIO SET_IRQS ioctl is dependent on the VM interrupt
setup, if the restoring of the VFIO PCI device config space is
before the VGIC, an error might occur in the kernel.

So we move the saving of the config space to the non-iterable
process, thus it will be called after the VGIC according to
their priorities.

As for the possible dependence of the device specific migration
data on it's config space, we can let the vendor driver to
include any config info it needs in its own data stream.

Signed-off-by: Shenming Lu <lushenming@huawei.com>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Message-Id: <20210310030233.1133-2-lushenming@huawei.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/migration.c