diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-02-25 15:21:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 15:21:18 +0000 |
commit | f3ae6834f058e047d44cf376c4407a1b1291fffe (patch) | |
tree | fe815b3b54624ad8044f4a41064db46071a39fbf /include | |
parent | 12c0d05a9e50ee272cf3998e52545cacc8ec75d2 (diff) | |
download | libvfio-user-f3ae6834f058e047d44cf376c4407a1b1291fffe.zip libvfio-user-f3ae6834f058e047d44cf376c4407a1b1291fffe.tar.gz libvfio-user-f3ae6834f058e047d44cf376c4407a1b1291fffe.tar.bz2 |
don't redefine migration defines (#373)
RHEL kernels have some of the migration work backported
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vfio-user.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/vfio-user.h b/include/vfio-user.h index 161524e..11eb366 100644 --- a/include/vfio-user.h +++ b/include/vfio-user.h @@ -126,11 +126,6 @@ struct vfio_user_irq_info { /* copied from <linux/vfio.h> */ -#define VFIO_REGION_TYPE_MIGRATION (3) -#define VFIO_REGION_SUBTYPE_MIGRATION (1) - -struct vfio_device_migration_info { - __u32 device_state; /* VFIO device state */ #define VFIO_DEVICE_STATE_STOP (0) #define VFIO_DEVICE_STATE_RUNNING (1 << 0) #define VFIO_DEVICE_STATE_SAVING (1 << 1) @@ -151,11 +146,19 @@ struct vfio_device_migration_info { ((state & ~VFIO_DEVICE_STATE_MASK) | VFIO_DEVICE_SATE_SAVING | \ VFIO_DEVICE_STATE_RESUMING) +/* RHEL kernels have some of it backported */ +#ifndef VFIO_REGION_TYPE_MIGRATION /* not a RHEL kernel */ +#define VFIO_REGION_TYPE_MIGRATION (3) +#define VFIO_REGION_SUBTYPE_MIGRATION (1) + +struct vfio_device_migration_info { + __u32 device_state; /* VFIO device state */ __u32 reserved; __u64 pending_bytes; __u64 data_offset; __u64 data_size; }; +#endif /* not a RHEL kernel */ struct vfio_bitmap { __u64 pgsize; /* page size for bitmap in bytes */ |