vfio/migration: Emit VFIO migration QAPI event
authorAvihai Horon <avihaih@nvidia.com>
Wed, 15 May 2024 13:21:36 +0000 (16:21 +0300)
committerCédric Le Goater <clg@redhat.com>
Thu, 16 May 2024 14:59:19 +0000 (16:59 +0200)
commit5e1f8905ca72775452f714008c3906c9d86158ae
treeba2323d1ccfca706c607d66f5b61918dede28e6c
parenta0359b56ecb2002fbecd249b1ea71df618dbe4a2
vfio/migration: Emit VFIO migration QAPI event

Emit VFIO migration QAPI event when a VFIO device changes its migration
state. This can be used by management applications to get updates on the
current state of the VFIO device for their own purposes.

A new per VFIO device capability, "migration-events", is added so events
can be enabled only for the required devices. It is disabled by default.

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/pci.c
include/hw/vfio/vfio-common.h