blob: 8b397f401f422e9cf7555bd4b4eaebc9c13a6e5b [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPIVFIO_H
20#define _UAPIVFIO_H
21#include <linux/types.h>
22#include <linux/ioctl.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define VFIO_API_VERSION 0
24#define VFIO_TYPE1_IOMMU 1
Christopher Ferris38062f92014-07-09 15:33:25 -070025#define VFIO_SPAPR_TCE_IOMMU 2
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070026#define VFIO_TYPE1v2_IOMMU 3
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070027#define VFIO_DMA_CC_IOMMU 4
Christopher Ferris82d75042015-01-26 10:57:07 -080028#define VFIO_EEH 5
29#define VFIO_TYPE1_NESTING_IOMMU 6
Christopher Ferris05d08e92016-02-04 13:16:38 -080030#define VFIO_SPAPR_TCE_v2_IOMMU 7
Christopher Ferris106b3a82016-08-24 12:15:38 -070031#define VFIO_NOIOMMU_IOMMU 8
Christopher Ferris05d08e92016-02-04 13:16:38 -080032#define VFIO_TYPE (';')
Christopher Ferris38062f92014-07-09 15:33:25 -070033#define VFIO_BASE 100
Christopher Ferris106b3a82016-08-24 12:15:38 -070034struct vfio_info_cap_header {
Christopher Ferris106b3a82016-08-24 12:15:38 -070035 __u16 id;
36 __u16 version;
37 __u32 next;
38};
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define VFIO_GET_API_VERSION _IO(VFIO_TYPE, VFIO_BASE + 0)
40#define VFIO_CHECK_EXTENSION _IO(VFIO_TYPE, VFIO_BASE + 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -080041#define VFIO_SET_IOMMU _IO(VFIO_TYPE, VFIO_BASE + 2)
Christopher Ferris38062f92014-07-09 15:33:25 -070042struct vfio_group_status {
Tao Baod7db5942015-01-28 10:07:51 -080043 __u32 argsz;
44 __u32 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -080045#define VFIO_GROUP_FLAGS_VIABLE (1 << 0)
Christopher Ferris38062f92014-07-09 15:33:25 -070046#define VFIO_GROUP_FLAGS_CONTAINER_SET (1 << 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070047};
48#define VFIO_GROUP_GET_STATUS _IO(VFIO_TYPE, VFIO_BASE + 3)
Christopher Ferris05d08e92016-02-04 13:16:38 -080049#define VFIO_GROUP_SET_CONTAINER _IO(VFIO_TYPE, VFIO_BASE + 4)
Christopher Ferris38062f92014-07-09 15:33:25 -070050#define VFIO_GROUP_UNSET_CONTAINER _IO(VFIO_TYPE, VFIO_BASE + 5)
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define VFIO_GROUP_GET_DEVICE_FD _IO(VFIO_TYPE, VFIO_BASE + 6)
52struct vfio_device_info {
Christopher Ferris05d08e92016-02-04 13:16:38 -080053 __u32 argsz;
Tao Baod7db5942015-01-28 10:07:51 -080054 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define VFIO_DEVICE_FLAGS_RESET (1 << 0)
56#define VFIO_DEVICE_FLAGS_PCI (1 << 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -080057#define VFIO_DEVICE_FLAGS_PLATFORM (1 << 2)
58#define VFIO_DEVICE_FLAGS_AMBA (1 << 3)
Christopher Ferris525ce912017-07-26 13:12:53 -070059#define VFIO_DEVICE_FLAGS_CCW (1 << 4)
Christopher Ferris05d08e92016-02-04 13:16:38 -080060 __u32 num_regions;
Tao Baod7db5942015-01-28 10:07:51 -080061 __u32 num_irqs;
Ben Cheng655a7c02013-10-16 16:09:24 -070062};
63#define VFIO_DEVICE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 7)
Christopher Ferris48af7cb2017-02-21 12:35:09 -080064#define VFIO_DEVICE_API_PCI_STRING "vfio-pci"
65#define VFIO_DEVICE_API_PLATFORM_STRING "vfio-platform"
66#define VFIO_DEVICE_API_AMBA_STRING "vfio-amba"
Christopher Ferris525ce912017-07-26 13:12:53 -070067#define VFIO_DEVICE_API_CCW_STRING "vfio-ccw"
Ben Cheng655a7c02013-10-16 16:09:24 -070068struct vfio_region_info {
Tao Baod7db5942015-01-28 10:07:51 -080069 __u32 argsz;
70 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070071#define VFIO_REGION_INFO_FLAG_READ (1 << 0)
72#define VFIO_REGION_INFO_FLAG_WRITE (1 << 1)
Christopher Ferris38062f92014-07-09 15:33:25 -070073#define VFIO_REGION_INFO_FLAG_MMAP (1 << 2)
Christopher Ferris106b3a82016-08-24 12:15:38 -070074#define VFIO_REGION_INFO_FLAG_CAPS (1 << 3)
Tao Baod7db5942015-01-28 10:07:51 -080075 __u32 index;
Christopher Ferris106b3a82016-08-24 12:15:38 -070076 __u32 cap_offset;
Tao Baod7db5942015-01-28 10:07:51 -080077 __u64 size;
Tao Baod7db5942015-01-28 10:07:51 -080078 __u64 offset;
Ben Cheng655a7c02013-10-16 16:09:24 -070079};
Christopher Ferris106b3a82016-08-24 12:15:38 -070080#define VFIO_DEVICE_GET_REGION_INFO _IO(VFIO_TYPE, VFIO_BASE + 8)
81#define VFIO_REGION_INFO_CAP_SPARSE_MMAP 1
82struct vfio_region_sparse_mmap_area {
83 __u64 offset;
Christopher Ferris106b3a82016-08-24 12:15:38 -070084 __u64 size;
85};
86struct vfio_region_info_cap_sparse_mmap {
87 struct vfio_info_cap_header header;
Christopher Ferris106b3a82016-08-24 12:15:38 -070088 __u32 nr_areas;
89 __u32 reserved;
90 struct vfio_region_sparse_mmap_area areas[];
91};
Christopher Ferris106b3a82016-08-24 12:15:38 -070092#define VFIO_REGION_INFO_CAP_TYPE 2
93struct vfio_region_info_cap_type {
94 struct vfio_info_cap_header header;
95 __u32 type;
Christopher Ferris106b3a82016-08-24 12:15:38 -070096 __u32 subtype;
97};
98#define VFIO_REGION_TYPE_PCI_VENDOR_TYPE (1 << 31)
99#define VFIO_REGION_TYPE_PCI_VENDOR_MASK (0xffff)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700100#define VFIO_REGION_SUBTYPE_INTEL_IGD_OPREGION (1)
101#define VFIO_REGION_SUBTYPE_INTEL_IGD_HOST_CFG (2)
102#define VFIO_REGION_SUBTYPE_INTEL_IGD_LPC_CFG (3)
Christopher Ferris76a1d452018-06-27 14:12:29 -0700103#define VFIO_REGION_INFO_CAP_MSIX_MAPPABLE 3
Christopher Ferris106b3a82016-08-24 12:15:38 -0700104struct vfio_irq_info {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700105 __u32 argsz;
Tao Baod7db5942015-01-28 10:07:51 -0800106 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define VFIO_IRQ_INFO_EVENTFD (1 << 0)
108#define VFIO_IRQ_INFO_MASKABLE (1 << 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700109#define VFIO_IRQ_INFO_AUTOMASKED (1 << 2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700110#define VFIO_IRQ_INFO_NORESIZE (1 << 3)
Tao Baod7db5942015-01-28 10:07:51 -0800111 __u32 index;
112 __u32 count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700113};
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define VFIO_DEVICE_GET_IRQ_INFO _IO(VFIO_TYPE, VFIO_BASE + 9)
115struct vfio_irq_set {
Tao Baod7db5942015-01-28 10:07:51 -0800116 __u32 argsz;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700117 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700118#define VFIO_IRQ_SET_DATA_NONE (1 << 0)
119#define VFIO_IRQ_SET_DATA_BOOL (1 << 1)
120#define VFIO_IRQ_SET_DATA_EVENTFD (1 << 2)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700121#define VFIO_IRQ_SET_ACTION_MASK (1 << 3)
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#define VFIO_IRQ_SET_ACTION_UNMASK (1 << 4)
123#define VFIO_IRQ_SET_ACTION_TRIGGER (1 << 5)
Tao Baod7db5942015-01-28 10:07:51 -0800124 __u32 index;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700125 __u32 start;
Tao Baod7db5942015-01-28 10:07:51 -0800126 __u32 count;
127 __u8 data[];
Ben Cheng655a7c02013-10-16 16:09:24 -0700128};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700129#define VFIO_DEVICE_SET_IRQS _IO(VFIO_TYPE, VFIO_BASE + 10)
Tao Baod7db5942015-01-28 10:07:51 -0800130#define VFIO_IRQ_SET_DATA_TYPE_MASK (VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_DATA_BOOL | VFIO_IRQ_SET_DATA_EVENTFD)
131#define VFIO_IRQ_SET_ACTION_TYPE_MASK (VFIO_IRQ_SET_ACTION_MASK | VFIO_IRQ_SET_ACTION_UNMASK | VFIO_IRQ_SET_ACTION_TRIGGER)
Ben Cheng655a7c02013-10-16 16:09:24 -0700132#define VFIO_DEVICE_RESET _IO(VFIO_TYPE, VFIO_BASE + 11)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700133enum {
Tao Baod7db5942015-01-28 10:07:51 -0800134 VFIO_PCI_BAR0_REGION_INDEX,
135 VFIO_PCI_BAR1_REGION_INDEX,
136 VFIO_PCI_BAR2_REGION_INDEX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700137 VFIO_PCI_BAR3_REGION_INDEX,
Tao Baod7db5942015-01-28 10:07:51 -0800138 VFIO_PCI_BAR4_REGION_INDEX,
139 VFIO_PCI_BAR5_REGION_INDEX,
140 VFIO_PCI_ROM_REGION_INDEX,
Tao Baod7db5942015-01-28 10:07:51 -0800141 VFIO_PCI_CONFIG_REGION_INDEX,
142 VFIO_PCI_VGA_REGION_INDEX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700143 VFIO_PCI_NUM_REGIONS = 9
Ben Cheng655a7c02013-10-16 16:09:24 -0700144};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700145enum {
Tao Baod7db5942015-01-28 10:07:51 -0800146 VFIO_PCI_INTX_IRQ_INDEX,
147 VFIO_PCI_MSI_IRQ_INDEX,
148 VFIO_PCI_MSIX_IRQ_INDEX,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700149 VFIO_PCI_ERR_IRQ_INDEX,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800150 VFIO_PCI_REQ_IRQ_INDEX,
Tao Baod7db5942015-01-28 10:07:51 -0800151 VFIO_PCI_NUM_IRQS
Ben Cheng655a7c02013-10-16 16:09:24 -0700152};
Christopher Ferris525ce912017-07-26 13:12:53 -0700153enum {
154 VFIO_CCW_CONFIG_REGION_INDEX,
155 VFIO_CCW_NUM_REGIONS
156};
157enum {
158 VFIO_CCW_IO_IRQ_INDEX,
159 VFIO_CCW_NUM_IRQS
160};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700161struct vfio_pci_dependent_device {
Tao Baod7db5942015-01-28 10:07:51 -0800162 __u32 group_id;
163 __u16 segment;
164 __u8 bus;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700165 __u8 devfn;
Christopher Ferris38062f92014-07-09 15:33:25 -0700166};
167struct vfio_pci_hot_reset_info {
Tao Baod7db5942015-01-28 10:07:51 -0800168 __u32 argsz;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700169 __u32 flags;
Tao Baod7db5942015-01-28 10:07:51 -0800170 __u32 count;
171 struct vfio_pci_dependent_device devices[];
Christopher Ferris38062f92014-07-09 15:33:25 -0700172};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700173#define VFIO_DEVICE_GET_PCI_HOT_RESET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
Christopher Ferris38062f92014-07-09 15:33:25 -0700174struct vfio_pci_hot_reset {
Tao Baod7db5942015-01-28 10:07:51 -0800175 __u32 argsz;
176 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700177 __u32 count;
Tao Baod7db5942015-01-28 10:07:51 -0800178 __s32 group_fds[];
Christopher Ferris38062f92014-07-09 15:33:25 -0700179};
180#define VFIO_DEVICE_PCI_HOT_RESET _IO(VFIO_TYPE, VFIO_BASE + 13)
Christopher Ferris76a1d452018-06-27 14:12:29 -0700181struct vfio_device_gfx_plane_info {
182 __u32 argsz;
183 __u32 flags;
184#define VFIO_GFX_PLANE_TYPE_PROBE (1 << 0)
185#define VFIO_GFX_PLANE_TYPE_DMABUF (1 << 1)
186#define VFIO_GFX_PLANE_TYPE_REGION (1 << 2)
187 __u32 drm_plane_type;
188 __u32 drm_format;
189 __u64 drm_format_mod;
190 __u32 width;
191 __u32 height;
192 __u32 stride;
193 __u32 size;
194 __u32 x_pos;
195 __u32 y_pos;
196 __u32 x_hot;
197 __u32 y_hot;
198 union {
199 __u32 region_index;
200 __u32 dmabuf_id;
201 };
202};
203#define VFIO_DEVICE_QUERY_GFX_PLANE _IO(VFIO_TYPE, VFIO_BASE + 14)
204#define VFIO_DEVICE_GET_GFX_DMABUF _IO(VFIO_TYPE, VFIO_BASE + 15)
205struct vfio_device_ioeventfd {
206 __u32 argsz;
207 __u32 flags;
208#define VFIO_DEVICE_IOEVENTFD_8 (1 << 0)
209#define VFIO_DEVICE_IOEVENTFD_16 (1 << 1)
210#define VFIO_DEVICE_IOEVENTFD_32 (1 << 2)
211#define VFIO_DEVICE_IOEVENTFD_64 (1 << 3)
212#define VFIO_DEVICE_IOEVENTFD_SIZE_MASK (0xf)
213 __u64 offset;
214 __u64 data;
215 __s32 fd;
216};
217#define VFIO_DEVICE_IOEVENTFD _IO(VFIO_TYPE, VFIO_BASE + 16)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700218struct vfio_iommu_type1_info {
Tao Baod7db5942015-01-28 10:07:51 -0800219 __u32 argsz;
220 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700221#define VFIO_IOMMU_INFO_PGSIZES (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700222 __u64 iova_pgsizes;
Christopher Ferris38062f92014-07-09 15:33:25 -0700223};
Ben Cheng655a7c02013-10-16 16:09:24 -0700224#define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
225struct vfio_iommu_type1_dma_map {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700226 __u32 argsz;
Tao Baod7db5942015-01-28 10:07:51 -0800227 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700228#define VFIO_DMA_MAP_FLAG_READ (1 << 0)
229#define VFIO_DMA_MAP_FLAG_WRITE (1 << 1)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700230 __u64 vaddr;
Tao Baod7db5942015-01-28 10:07:51 -0800231 __u64 iova;
232 __u64 size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700233};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700234#define VFIO_IOMMU_MAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 13)
Christopher Ferris38062f92014-07-09 15:33:25 -0700235struct vfio_iommu_type1_dma_unmap {
Tao Baod7db5942015-01-28 10:07:51 -0800236 __u32 argsz;
237 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700238 __u64 iova;
Tao Baod7db5942015-01-28 10:07:51 -0800239 __u64 size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700240};
241#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700242#define VFIO_IOMMU_ENABLE _IO(VFIO_TYPE, VFIO_BASE + 15)
Christopher Ferris38062f92014-07-09 15:33:25 -0700243#define VFIO_IOMMU_DISABLE _IO(VFIO_TYPE, VFIO_BASE + 16)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800244struct vfio_iommu_spapr_tce_ddw_info {
245 __u64 pgsizes;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700246 __u32 max_dynamic_windows_supported;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800247 __u32 levels;
248};
Christopher Ferris38062f92014-07-09 15:33:25 -0700249struct vfio_iommu_spapr_tce_info {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700250 __u32 argsz;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800251 __u32 flags;
252#define VFIO_IOMMU_SPAPR_INFO_DDW (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800253 __u32 dma32_window_start;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700254 __u32 dma32_window_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800255 struct vfio_iommu_spapr_tce_ddw_info ddw;
Christopher Ferris38062f92014-07-09 15:33:25 -0700256};
257#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700258struct vfio_eeh_pe_err {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800259 __u32 type;
260 __u32 func;
261 __u64 addr;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700262 __u64 mask;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800263};
Christopher Ferris82d75042015-01-26 10:57:07 -0800264struct vfio_eeh_pe_op {
Tao Baod7db5942015-01-28 10:07:51 -0800265 __u32 argsz;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700266 __u32 flags;
Tao Baod7db5942015-01-28 10:07:51 -0800267 __u32 op;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800268 union {
269 struct vfio_eeh_pe_err err;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700270 };
Christopher Ferris82d75042015-01-26 10:57:07 -0800271};
272#define VFIO_EEH_PE_DISABLE 0
273#define VFIO_EEH_PE_ENABLE 1
Christopher Ferris106b3a82016-08-24 12:15:38 -0700274#define VFIO_EEH_PE_UNFREEZE_IO 2
Christopher Ferris82d75042015-01-26 10:57:07 -0800275#define VFIO_EEH_PE_UNFREEZE_DMA 3
276#define VFIO_EEH_PE_GET_STATE 4
277#define VFIO_EEH_PE_STATE_NORMAL 0
Christopher Ferris106b3a82016-08-24 12:15:38 -0700278#define VFIO_EEH_PE_STATE_RESET 1
Christopher Ferris82d75042015-01-26 10:57:07 -0800279#define VFIO_EEH_PE_STATE_STOPPED 2
280#define VFIO_EEH_PE_STATE_STOPPED_DMA 4
281#define VFIO_EEH_PE_STATE_UNAVAIL 5
Christopher Ferris106b3a82016-08-24 12:15:38 -0700282#define VFIO_EEH_PE_RESET_DEACTIVATE 5
Christopher Ferris82d75042015-01-26 10:57:07 -0800283#define VFIO_EEH_PE_RESET_HOT 6
284#define VFIO_EEH_PE_RESET_FUNDAMENTAL 7
285#define VFIO_EEH_PE_CONFIGURE 8
Christopher Ferris106b3a82016-08-24 12:15:38 -0700286#define VFIO_EEH_PE_INJECT_ERR 9
Christopher Ferris82d75042015-01-26 10:57:07 -0800287#define VFIO_EEH_PE_OP _IO(VFIO_TYPE, VFIO_BASE + 21)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800288struct vfio_iommu_spapr_register_memory {
289 __u32 argsz;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700290 __u32 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800291 __u64 vaddr;
292 __u64 size;
293};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700294#define VFIO_IOMMU_SPAPR_REGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 17)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800295#define VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 18)
296struct vfio_iommu_spapr_tce_create {
297 __u32 argsz;
298 __u32 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800299 __u32 page_shift;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700300 __u32 __resv1;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800301 __u64 window_size;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700302 __u32 levels;
303 __u32 __resv2;
304 __u64 start_addr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800305};
306#define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19)
307struct vfio_iommu_spapr_tce_remove {
308 __u32 argsz;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800309 __u32 flags;
310 __u64 start_addr;
311};
312#define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20)
Ben Cheng655a7c02013-10-16 16:09:24 -0700313#endif