aboutsummaryrefslogtreecommitdiff
path: root/lib/migration_priv.h
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 /lib/migration_priv.h
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 'lib/migration_priv.h')
-rw-r--r--lib/migration_priv.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/migration_priv.h b/lib/migration_priv.h
index bf7c7b0..d5643af 100644
--- a/lib/migration_priv.h
+++ b/lib/migration_priv.h
@@ -70,47 +70,47 @@ struct migr_state_data {
const char *name;
};
-#define VFIO_DEVICE_STATE_ERROR (VFIO_DEVICE_STATE_SAVING | VFIO_DEVICE_STATE_RESUMING)
+#define VFIO_DEVICE_STATE_V1_ERROR (VFIO_DEVICE_STATE_V1_SAVING | VFIO_DEVICE_STATE_V1_RESUMING)
/* valid migration state transitions */
static const struct migr_state_data migr_states[(VFIO_DEVICE_STATE_MASK + 1)] = {
- [VFIO_DEVICE_STATE_STOP] = {
+ [VFIO_DEVICE_STATE_V1_STOP] = {
.state =
- (1 << VFIO_DEVICE_STATE_STOP) |
- (1 << VFIO_DEVICE_STATE_RUNNING),
+ (1 << VFIO_DEVICE_STATE_V1_STOP) |
+ (1 << VFIO_DEVICE_STATE_V1_RUNNING),
.name = "stopped"
},
- [VFIO_DEVICE_STATE_RUNNING] = {
+ [VFIO_DEVICE_STATE_V1_RUNNING] = {
.state =
- (1 << VFIO_DEVICE_STATE_STOP) |
- (1 << VFIO_DEVICE_STATE_RUNNING) |
- (1 << VFIO_DEVICE_STATE_SAVING) |
- (1 << (VFIO_DEVICE_STATE_RUNNING | VFIO_DEVICE_STATE_SAVING)) |
- (1 << VFIO_DEVICE_STATE_RESUMING) |
- (1 << VFIO_DEVICE_STATE_ERROR),
+ (1 << VFIO_DEVICE_STATE_V1_STOP) |
+ (1 << VFIO_DEVICE_STATE_V1_RUNNING) |
+ (1 << VFIO_DEVICE_STATE_V1_SAVING) |
+ (1 << (VFIO_DEVICE_STATE_V1_RUNNING | VFIO_DEVICE_STATE_V1_SAVING)) |
+ (1 << VFIO_DEVICE_STATE_V1_RESUMING) |
+ (1 << VFIO_DEVICE_STATE_V1_ERROR),
.name = "running"
},
- [VFIO_DEVICE_STATE_SAVING] = {
+ [VFIO_DEVICE_STATE_V1_SAVING] = {
.state =
- (1 << VFIO_DEVICE_STATE_STOP) |
- (1 << VFIO_DEVICE_STATE_RUNNING) |
- (1 << VFIO_DEVICE_STATE_SAVING) |
- (1 << VFIO_DEVICE_STATE_ERROR),
+ (1 << VFIO_DEVICE_STATE_V1_STOP) |
+ (1 << VFIO_DEVICE_STATE_V1_RUNNING) |
+ (1 << VFIO_DEVICE_STATE_V1_SAVING) |
+ (1 << VFIO_DEVICE_STATE_V1_ERROR),
.name = "stop-and-copy"
},
- [VFIO_DEVICE_STATE_RUNNING | VFIO_DEVICE_STATE_SAVING] = {
+ [VFIO_DEVICE_STATE_V1_RUNNING | VFIO_DEVICE_STATE_V1_SAVING] = {
.state =
- (1 << VFIO_DEVICE_STATE_STOP) |
- (1 << VFIO_DEVICE_STATE_SAVING) |
- (1 << VFIO_DEVICE_STATE_RUNNING | VFIO_DEVICE_STATE_SAVING) |
- (1 << VFIO_DEVICE_STATE_ERROR),
+ (1 << VFIO_DEVICE_STATE_V1_STOP) |
+ (1 << VFIO_DEVICE_STATE_V1_SAVING) |
+ (1 << VFIO_DEVICE_STATE_V1_RUNNING | VFIO_DEVICE_STATE_V1_SAVING) |
+ (1 << VFIO_DEVICE_STATE_V1_ERROR),
.name = "pre-copy"
},
- [VFIO_DEVICE_STATE_RESUMING] = {
+ [VFIO_DEVICE_STATE_V1_RESUMING] = {
.state =
- (1 << VFIO_DEVICE_STATE_RUNNING) |
- (1 << VFIO_DEVICE_STATE_RESUMING) |
- (1 << VFIO_DEVICE_STATE_ERROR),
+ (1 << VFIO_DEVICE_STATE_V1_RUNNING) |
+ (1 << VFIO_DEVICE_STATE_V1_RESUMING) |
+ (1 << VFIO_DEVICE_STATE_V1_ERROR),
.name = "resuming"
}
};