aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorJag Raman <jag.raman@oracle.com>2022-05-23 08:15:47 -0400
committerGitHub <noreply@github.com>2022-05-23 13:15:47 +0100
commitb52bff72d4eb646a453d19e19ddbd13ed6111a09 (patch)
tree493045e75edc44a0696dfaffd84896a8e0cdaf7f /samples
parentb427c6084311f0c620bf4afe7746739e8c887977 (diff)
downloadlibvfio-user-b52bff72d4eb646a453d19e19ddbd13ed6111a09.zip
libvfio-user-b52bff72d4eb646a453d19e19ddbd13ed6111a09.tar.gz
libvfio-user-b52bff72d4eb646a453d19e19ddbd13ed6111a09.tar.bz2
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 <jag.raman@oracle.com> Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples')
-rw-r--r--samples/client.c10
1 files changed, 5 insertions, 5 deletions
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));