]> git.proxmox.com Git - mirror_qemu.git/commit - hw/vfio/common.c
vfio: listener unregister before unset container
authorPeter Xu <peterx@redhat.com>
Mon, 22 Jan 2018 06:02:43 +0000 (14:02 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 7 Feb 2018 13:09:24 +0000 (14:09 +0100)
commit369686267a4612d4000a1b67720c7f0aedd27539
tree181484d91e605369559b19d7f241e3500710e199
parent0bbe435410c37c230c6e7bd926931a13810816e2
vfio: listener unregister before unset container

After next patch, listener unregister will need the container to be
alive.  Let's move this unregister phase to be before unset container,
since that operation will free the backend container in kernel,
otherwise we'll get these after next patch:

qemu-system-x86_64: VFIO_UNMAP_DMA: -22
qemu-system-x86_64: vfio_dma_unmap(0x559bf53a4590, 0x0, 0xa0000) = -22 (Invalid argument)

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180122060244.29368-4-peterx@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/vfio/common.c