summaryrefslogtreecommitdiffstats
path: root/hw/vfio/migration.c
diff options
context:
space:
mode:
authorStefan Hajnoczi2022-09-28 23:03:40 +0200
committerStefan Hajnoczi2022-09-28 23:03:40 +0200
commitdc6c2342a0c1103bf4b2750dd756609d6ab7ecac (patch)
tree42791236d54019a7c614d12fe0f4fb221ba5568d /hw/vfio/migration.c
parentMerge tag 'pull-xen-20220927' of https://xenbits.xen.org/git-http/people/aper... (diff)
parentvfio/common: Fix vfio_iommu_type1_info use after free (diff)
downloadqemu-dc6c2342a0c1103bf4b2750dd756609d6ab7ecac.tar.gz
qemu-dc6c2342a0c1103bf4b2750dd756609d6ab7ecac.tar.xz
qemu-dc6c2342a0c1103bf4b2750dd756609d6ab7ecac.zip
Merge tag 'vfio-updates-20220927.1' of https://gitlab.com/alex.williamson/qemu into staging
VFIO updates 2022-09-27 * Fix initial values for migration state (Kunkun Jiang) * Fix a use-after-free error path (Alex Williamson) # -----BEGIN PGP SIGNATURE----- # # iQJPBAABCAA5FiEEQvbATlQL0amee4qQI5ubbjuwiyIFAmMzXKwbHGFsZXgud2ls # bGlhbXNvbkByZWRoYXQuY29tAAoJECObm247sIsiOv8QAKJstXXq92FxT+wBXt0Q # wnMJjE1hvCHXki7FfPSRPmVgoMppWD1vhr7TajeOkidtqnX48V863/RGZfxX+oQU # bEPPT6QaWnYhagslrRjIj4R+5O5N6rY9A2zzpG2vv1x9qv8r9WLicKvwjzinTgAp # PyU9Ajgu2OUpD6O64iXIeD2MnfblSN3N+bBvZ7alDifFC1D8CfX9D3X76bdERC6X # LFEenZ/3ZwZh46z1xv4v3opI2aBp9oh1gca9NKc/jUKg11AuswhmmUSmb+lVDDnt # UBNTqgHtnGBfAMcxQ1cA6AtRvtwwneJkQC4nkUmOEWuMImUEhTQw7vcTpDFFyHzz # dcYRjioHu15EmuHeP/W+139fnGeCDpr1/XJcJ2avUp/9oNeRDsAi4w/lEHXHv5Rm # KHuXSIswC/6+dgvdOwRw2OlbzX5KjSVlqXJia+QexEliCxpcs8OYEJ7ZgRdFCO8t # unWssLs7x1O40J7cngnyT8addLGwbwExrJggpG70suSQB5mMIJzNIVanUpUkzy2g # 9kAwW3fTUXqW7O+2RYbjFUoY0yR1eHO8EExiPHyO3hxCDNjglwpM20C4M7fs3Eo6 # /1zwagtjxblsWTPK9dOsq3y4yoXlhX+0EpM9PYPV8OleayTRyhS7O/FzHmqpJNlt # G524RusuIU+xNwUTEKgFFHgm # =5YPM # -----END PGP SIGNATURE----- # gpg: Signature made Tue 27 Sep 2022 16:27:24 EDT # gpg: using RSA key 42F6C04E540BD1A99E7B8A90239B9B6E3BB08B22 # gpg: issuer "alex.williamson@redhat.com" # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [full] # gpg: aka "Alex Williamson <alex@shazbot.org>" [full] # gpg: aka "Alex Williamson <alwillia@redhat.com>" [full] # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" [full] # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B 8A90 239B 9B6E 3BB0 8B22 * tag 'vfio-updates-20220927.1' of https://gitlab.com/alex.williamson/qemu: vfio/common: Fix vfio_iommu_type1_info use after free vfio/migration: Fix incorrect initialization value for parameters in VFIOMigration Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/vfio/migration.c')
-rw-r--r--hw/vfio/migration.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index a6ad1f8945..3de4252111 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -806,6 +806,8 @@ static int vfio_migration_init(VFIODevice *vbasedev,
}
vbasedev->migration = g_new0(VFIOMigration, 1);
+ vbasedev->migration->device_state = VFIO_DEVICE_STATE_RUNNING;
+ vbasedev->migration->vm_running = runstate_is_running();
ret = vfio_region_setup(obj, vbasedev, &vbasedev->migration->region,
info->index, "migration");