diff options
Diffstat (limited to 'include/vfio-user.h')
-rw-r--r-- | include/vfio-user.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/include/vfio-user.h b/include/vfio-user.h index 053ead2..09a756e 100644 --- a/include/vfio-user.h +++ b/include/vfio-user.h @@ -133,67 +133,6 @@ struct vfio_user_irq_info { uint32_t subindex; } __attribute__((packed)); -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) - -/* copied from <linux/vfio.h> */ - -#define VFIO_DEVICE_STATE_STOP (0) -#define VFIO_DEVICE_STATE_RUNNING (1 << 0) -#define VFIO_DEVICE_STATE_SAVING (1 << 1) -#define VFIO_DEVICE_STATE_RESUMING (1 << 2) -#define VFIO_DEVICE_STATE_MASK (VFIO_DEVICE_STATE_RUNNING | \ - VFIO_DEVICE_STATE_SAVING | \ - VFIO_DEVICE_STATE_RESUMING) - -#define VFIO_DEVICE_STATE_VALID(state) \ - (state & VFIO_DEVICE_STATE_RESUMING ? \ - (state & VFIO_DEVICE_STATE_MASK) == VFIO_DEVICE_STATE_RESUMING : 1) - -#define VFIO_DEVICE_STATE_IS_ERROR(state) \ - ((state & VFIO_DEVICE_STATE_MASK) == (VFIO_DEVICE_STATE_SAVING | \ - VFIO_DEVICE_STATE_RESUMING)) - -#define VFIO_DEVICE_STATE_SET_ERROR(state) \ - ((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 */ - __u64 size; /* in bytes */ - __u64 *data; /* one bit per page */ -}; - -struct vfio_iommu_type1_dirty_bitmap { - __u32 argsz; - __u32 flags; -#define VFIO_IOMMU_DIRTY_PAGES_FLAG_START (1 << 0) -#define VFIO_IOMMU_DIRTY_PAGES_FLAG_STOP (1 << 1) -#define VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP (1 << 2) - __u8 data[]; -}; - -struct vfio_iommu_type1_dirty_bitmap_get { - __u64 iova; /* IO virtual address */ - __u64 size; /* Size of iova range */ - struct vfio_bitmap bitmap; -}; - -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) */ - #ifdef __cplusplus } #endif |