aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio/trace-events
diff options
context:
space:
mode:
authorAvihai Horon <avihaih@nvidia.com>2023-08-02 11:14:48 +0300
committerCédric Le Goater <clg@redhat.com>2023-09-11 08:34:05 +0200
commit94f775e428f8057ee66425f421b68fe8c94cebcc (patch)
tree20e1fb58116d78fcd4fde0404a4d257ddaf81b11 /hw/vfio/trace-events
parent3d4d0f0e06630d0098e7940323fe0f96ff87f34f (diff)
downloadqemu-94f775e428f8057ee66425f421b68fe8c94cebcc.zip
qemu-94f775e428f8057ee66425f421b68fe8c94cebcc.tar.gz
qemu-94f775e428f8057ee66425f421b68fe8c94cebcc.tar.bz2
vfio/migration: Add P2P support for VFIO migration
VFIO migration uAPI defines an optional intermediate P2P quiescent state. While in the P2P quiescent state, P2P DMA transactions cannot be initiated by the device, but the device can respond to incoming ones. Additionally, all outstanding P2P transactions are guaranteed to have been completed by the time the device enters this state. The purpose of this state is to support migration of multiple devices that might do P2P transactions between themselves. Add support for P2P migration by transitioning all the devices to the P2P quiescent state before stopping or starting the devices. Use the new VMChangeStateHandler prepare_cb to achieve that behavior. This will allow migration of multiple VFIO devices if all of them support P2P migration. Signed-off-by: Avihai Horon <avihaih@nvidia.com> Tested-by: YangHang Liu <yanghliu@redhat.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/trace-events')
-rw-r--r--hw/vfio/trace-events1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events
index ee7509e..329736a 100644
--- a/hw/vfio/trace-events
+++ b/hw/vfio/trace-events
@@ -167,3 +167,4 @@ vfio_save_setup(const char *name, uint64_t data_buffer_size) " (%s) data buffer
vfio_state_pending_estimate(const char *name, uint64_t precopy, uint64_t postcopy, uint64_t precopy_init_size, uint64_t precopy_dirty_size) " (%s) precopy 0x%"PRIx64" postcopy 0x%"PRIx64" precopy initial size 0x%"PRIx64" precopy dirty size 0x%"PRIx64
vfio_state_pending_exact(const char *name, uint64_t precopy, uint64_t postcopy, uint64_t stopcopy_size, uint64_t precopy_init_size, uint64_t precopy_dirty_size) " (%s) precopy 0x%"PRIx64" postcopy 0x%"PRIx64" stopcopy size 0x%"PRIx64" precopy initial size 0x%"PRIx64" precopy dirty size 0x%"PRIx64
vfio_vmstate_change(const char *name, int running, const char *reason, const char *dev_state) " (%s) running %d reason %s device state %s"
+vfio_vmstate_change_prepare(const char *name, int running, const char *reason, const char *dev_state) " (%s) running %d reason %s device state %s"