diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-10-05 13:54:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 13:54:26 +0100 |
commit | 8d82bd5f20fac5d8b4dab510d2294e076a6dd93d (patch) | |
tree | cb287e9436e387d14ca0d81a2182dd10fca8bd86 /lib/private.h | |
parent | e7f0fc73cdab811948adf5227c04f722a7c3105b (diff) | |
download | libvfio-user-8d82bd5f20fac5d8b4dab510d2294e076a6dd93d.zip libvfio-user-8d82bd5f20fac5d8b4dab510d2294e076a6dd93d.tar.gz libvfio-user-8d82bd5f20fac5d8b4dab510d2294e076a6dd93d.tar.bz2 |
make migration state callback optionally asynchronous (#608)
Some devices need the migration state callback to be asynchronous. The simplest way to implement this is to require from the callback to return -1 and set errno to EBUSY, not process any other new messages (vfu_ctx_run returns -1 and sets errno to EBUSY), and provide a way to the user to complete migration (vfu_migr_done).
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'lib/private.h')
-rw-r--r-- | lib/private.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private.h b/lib/private.h index 93a354b..05d2fa4 100644 --- a/lib/private.h +++ b/lib/private.h @@ -169,6 +169,8 @@ struct vfu_ctx { size_t client_max_data_xfer_size; struct migration *migration; + bool migr_trans_pending; + vfu_msg_t *migr_trans_msg; uint32_t irq_count[VFU_DEV_NUM_IRQS]; vfu_irqs_t *irqs; |