vfio/migration: Enhance VFIO migration state tracing
authorAvihai Horon <avihaih@nvidia.com>
Wed, 15 May 2024 13:21:38 +0000 (16:21 +0300)
committerCédric Le Goater <clg@redhat.com>
Thu, 16 May 2024 14:59:20 +0000 (16:59 +0200)
commit11ebce2a5544cacab31e8ff169c6f0ceef37f4e8
tree50d6ac19098309bfab030f1ce0c1098ea486a851
parent64366eddf15a6224263c1152f9b0a1a97965e932
vfio/migration: Enhance VFIO migration state tracing

Move trace_vfio_migration_set_state() to the top of the function, add
recover_state to it, and add a new trace event to
vfio_migration_set_device_state().

This improves tracing of device state changes as state changes are now
also logged when vfio_migration_set_state() fails (covering recover
state and device reset transitions) and in no-op state transitions to
the same state.

Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/migration.c
hw/vfio/trace-events