vfio: Add VM state change handler to know state of VM
commit02a7e71b1e5b1313060927e7c86a10be2d7083a7
authorKirti Wankhede <kwankhede@nvidia.com>
Mon, 26 Oct 2020 09:36:15 +0000 (26 15:06 +0530)
committerAlex Williamson <alex.williamson@redhat.com>
Sun, 1 Nov 2020 19:30:50 +0000 (1 12:30 -0700)
treeb7be495a9c2ab9d141a12f4536a95b74d05ddcc0
parenta9e271ec9b36ef4c7b5bc3b234c85d93931e192e
vfio: Add VM state change handler to know state of VM

VM state change handler is called on change in VM's state. Based on
VM state, VFIO device state should be changed.
Added read/write helper functions for migration region.
Added function to set device_state.

Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
Reviewed-by: Neo Jia <cjia@nvidia.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
[aw: lx -> HWADDR_PRIx, remove redundant parens]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/migration.c
hw/vfio/trace-events
include/hw/vfio/vfio-common.h