aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio
diff options
context:
space:
mode:
authorAvihai Horon <avihaih@nvidia.com>2022-10-16 11:57:52 +0300
committerAlex Williamson <alex.williamson@redhat.com>2022-11-03 15:57:31 -0600
commit2461e752199ca457bf0973b6c8a77dc30585809c (patch)
treed9ceb117ac5ca2be11e9f44d320b8da6083ca5b4 /hw/vfio
parentece5f8374d0416a339f0c0a9399faa2c42d4ad6f (diff)
downloadqemu-2461e752199ca457bf0973b6c8a77dc30585809c.zip
qemu-2461e752199ca457bf0973b6c8a77dc30585809c.tar.gz
qemu-2461e752199ca457bf0973b6c8a77dc30585809c.tar.bz2
vfio/migration: Fix wrong enum usage
vfio_migration_init() initializes VFIOMigration->device_state using enum of VFIO migration protocol v2. Current implemented protocol is v1 so v1 enum should be used. Fix it. Fixes: 429c72800654 ("vfio/migration: Fix incorrect initialization value for parameters in VFIOMigration") Signed-off-by: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Link: https://lore.kernel.org/r/20221016085752.32740-1-avihaih@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio')
-rw-r--r--hw/vfio/migration.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 3de4252..c74453e 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -806,7 +806,7 @@ static int vfio_migration_init(VFIODevice *vbasedev,
}
vbasedev->migration = g_new0(VFIOMigration, 1);
- vbasedev->migration->device_state = VFIO_DEVICE_STATE_RUNNING;
+ vbasedev->migration->device_state = VFIO_DEVICE_STATE_V1_RUNNING;
vbasedev->migration->vm_running = runstate_is_running();
ret = vfio_region_setup(obj, vbasedev, &vbasedev->migration->region,