From b52bff72d4eb646a453d19e19ddbd13ed6111a09 Mon Sep 17 00:00:00 2001 From: Jag Raman Date: Mon, 23 May 2022 08:15:47 -0400 Subject: libvfio-user.h: sync VFIO_DEVICE_STATE_XXXX definitions with upstream (#690) Rename VFIO_DEVICE_STATE_XXXX defines as VFIO_DEVICE_STATE_V1_XXXX. Upstream renamed these variable to be of the XXXX_V1_XXXX format and switched an enum for VFIO_DEVICE_STATE_XXXX. Signed-off-by: Jagannathan Raman Reviewed-by: John Levon Reviewed-by: Thanos Makatos --- samples/client.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'samples') diff --git a/samples/client.c b/samples/client.c index d1c699d..38da81d 100644 --- a/samples/client.c +++ b/samples/client.c @@ -868,7 +868,7 @@ migrate_from(int sock, size_t *nr_iters, struct iovec **migr_iters, * XXX set device state to pre-copy. This is technically optional but any * VMM that cares about performance needs this. */ - device_state = VFIO_DEVICE_STATE_SAVING | VFIO_DEVICE_STATE_RUNNING; + device_state = VFIO_DEVICE_STATE_V1_SAVING | VFIO_DEVICE_STATE_V1_RUNNING; ret = access_region(sock, VFU_PCI_DEV_MIGR_REGION_IDX, true, offsetof(struct vfio_user_migration_info, device_state), &device_state, sizeof(device_state)); @@ -889,7 +889,7 @@ migrate_from(int sock, size_t *nr_iters, struct iovec **migr_iters, printf("client: setting device state to stop-and-copy\n"); - device_state = VFIO_DEVICE_STATE_SAVING; + device_state = VFIO_DEVICE_STATE_V1_SAVING; ret = access_region(sock, VFU_PCI_DEV_MIGR_REGION_IDX, true, offsetof(struct vfio_user_migration_info, device_state), &device_state, sizeof(device_state)); @@ -905,7 +905,7 @@ migrate_from(int sock, size_t *nr_iters, struct iovec **migr_iters, } /* XXX read device state, migration must have finished now */ - device_state = VFIO_DEVICE_STATE_STOP; + device_state = VFIO_DEVICE_STATE_V1_STOP; ret = access_region(sock, VFU_PCI_DEV_MIGR_REGION_IDX, true, offsetof(struct vfio_user_migration_info, device_state), &device_state, sizeof(device_state)); @@ -925,7 +925,7 @@ migrate_to(char *old_sock_path, int *server_max_fds, int ret, sock; char *sock_path; struct stat sb; - uint32_t device_state = VFIO_DEVICE_STATE_RESUMING; + uint32_t device_state = VFIO_DEVICE_STATE_V1_RESUMING; uint64_t data_offset, data_len; size_t i; uint32_t dst_crc; @@ -1020,7 +1020,7 @@ migrate_to(char *old_sock_path, int *server_max_fds, } /* XXX set device state to running */ - device_state = VFIO_DEVICE_STATE_RUNNING; + device_state = VFIO_DEVICE_STATE_V1_RUNNING; ret = access_region(sock, VFU_PCI_DEV_MIGR_REGION_IDX, true, offsetof(struct vfio_user_migration_info, device_state), &device_state, sizeof(device_state)); -- cgit v1.1