1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2022-2023, Advanced Micro Devices, Inc.
6 #ifndef VFIO_CDX_PRIVATE_H
7 #define VFIO_CDX_PRIVATE_H
9 #define VFIO_CDX_OFFSET_SHIFT 40
11 static inline u64
vfio_cdx_index_to_offset(u32 index
)
13 return ((u64
)(index
) << VFIO_CDX_OFFSET_SHIFT
);
20 struct eventfd_ctx
*trigger
;
24 struct vfio_cdx_region
{
31 struct vfio_cdx_device
{
32 struct vfio_device vdev
;
33 struct vfio_cdx_region
*regions
;
34 struct vfio_cdx_irq
*cdx_irqs
;
36 #define BME_SUPPORT BIT(0)
41 int vfio_cdx_set_irqs_ioctl(struct vfio_cdx_device
*vdev
,
42 u32 flags
, unsigned int index
,
43 unsigned int start
, unsigned int count
,
46 void vfio_cdx_irqs_cleanup(struct vfio_cdx_device
*vdev
);
48 #endif /* VFIO_CDX_PRIVATE_H */