Commit 7b20e84e authored by John Levon's avatar John Levon Committed by Tomasz Zawadzki
Browse files

vfio_user: specify migration callback version



The intention of the migration callback version value is to identify
incompatibilities with the version of libvfio-user. Thus, it doesn't make
sense to pull in the value from libvfio-user itself.

Signed-off-by: default avatarJohn Levon <john.levon@nutanix.com>
Change-Id: Ie0579a9d1d771afcb1df88dd5b1c5d9632124ea7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21523


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 12c640c0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@ struct nvme_migr_cq_state {
};
SPDK_STATIC_ASSERT(sizeof(struct nvme_migr_cq_state) == 0x20, "Incorrect size");

#define VFIO_USER_MIGR_CALLBACK_VERS	1
#define VFIO_USER_NVME_MIGR_MAGIC	0xAFEDBC23

/* The device state is in VFIO MIGRATION BAR(9) region, keep the device state page aligned.
@@ -4108,7 +4109,7 @@ vfio_user_dev_info_fill(struct nvmf_vfio_user_transport *vu_transport,
	};

	const vfu_migration_callbacks_t migr_callbacks = {
		.version = VFU_MIGR_CALLBACKS_VERS,
		.version = VFIO_USER_MIGR_CALLBACK_VERS,
		.transition = &vfio_user_migration_device_state_transition,
		.get_pending_bytes = &vfio_user_migration_get_pending_bytes,
		.prepare_data = &vfio_user_migration_prepare_data,