blob: 1ca071f8ec62bcb88f6e6b26270bee40a1bc01dd [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>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define VFIO_API_VERSION 0
25#define VFIO_TYPE1_IOMMU 1
Christopher Ferris38062f92014-07-09 15:33:25 -070026#define VFIO_SPAPR_TCE_IOMMU 2
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070027#define VFIO_TYPE1v2_IOMMU 3
Elliott Hughes8cb52b02013-11-21 13:43:23 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070029#define VFIO_DMA_CC_IOMMU 4
Christopher Ferris82d75042015-01-26 10:57:07 -080030#define VFIO_EEH 5
31#define VFIO_TYPE1_NESTING_IOMMU 6
Christopher Ferris05d08e92016-02-04 13:16:38 -080032#define VFIO_SPAPR_TCE_v2_IOMMU 7
Christopher Ferris82d75042015-01-26 10:57:07 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080034#define VFIO_TYPE (';')
Christopher Ferris38062f92014-07-09 15:33:25 -070035#define VFIO_BASE 100
Ben Cheng655a7c02013-10-16 16:09:24 -070036#define VFIO_GET_API_VERSION _IO(VFIO_TYPE, VFIO_BASE + 0)
37#define VFIO_CHECK_EXTENSION _IO(VFIO_TYPE, VFIO_BASE + 1)
Christopher Ferris82d75042015-01-26 10:57:07 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080039#define VFIO_SET_IOMMU _IO(VFIO_TYPE, VFIO_BASE + 2)
Christopher Ferris38062f92014-07-09 15:33:25 -070040struct vfio_group_status {
Tao Baod7db5942015-01-28 10:07:51 -080041 __u32 argsz;
42 __u32 flags;
Christopher Ferris82d75042015-01-26 10:57:07 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080044#define VFIO_GROUP_FLAGS_VIABLE (1 << 0)
Christopher Ferris38062f92014-07-09 15:33:25 -070045#define VFIO_GROUP_FLAGS_CONTAINER_SET (1 << 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
47#define VFIO_GROUP_GET_STATUS _IO(VFIO_TYPE, VFIO_BASE + 3)
Christopher Ferris82d75042015-01-26 10:57:07 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
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 Ferris82d75042015-01-26 10:57:07 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080054 __u32 argsz;
Tao Baod7db5942015-01-28 10:07:51 -080055 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070056#define VFIO_DEVICE_FLAGS_RESET (1 << 0)
57#define VFIO_DEVICE_FLAGS_PCI (1 << 1)
Christopher Ferris82d75042015-01-26 10:57:07 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080059#define VFIO_DEVICE_FLAGS_PLATFORM (1 << 2)
60#define VFIO_DEVICE_FLAGS_AMBA (1 << 3)
61 __u32 num_regions;
Tao Baod7db5942015-01-28 10:07:51 -080062 __u32 num_irqs;
Christopher Ferris05d08e92016-02-04 13:16:38 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070064};
65#define VFIO_DEVICE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 7)
66struct vfio_region_info {
Tao Baod7db5942015-01-28 10:07:51 -080067 __u32 argsz;
Christopher Ferris05d08e92016-02-04 13:16:38 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070070#define VFIO_REGION_INFO_FLAG_READ (1 << 0)
71#define VFIO_REGION_INFO_FLAG_WRITE (1 << 1)
Christopher Ferris38062f92014-07-09 15:33:25 -070072#define VFIO_REGION_INFO_FLAG_MMAP (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 __u32 index;
75 __u32 resv;
76 __u64 size;
Tao Baod7db5942015-01-28 10:07:51 -080077 __u64 offset;
Christopher Ferris05d08e92016-02-04 13:16:38 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070079};
80#define VFIO_DEVICE_GET_REGION_INFO _IO(VFIO_TYPE, VFIO_BASE + 8)
81struct vfio_irq_info {
Tao Baod7db5942015-01-28 10:07:51 -080082 __u32 argsz;
Christopher Ferris05d08e92016-02-04 13:16:38 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070085#define VFIO_IRQ_INFO_EVENTFD (1 << 0)
86#define VFIO_IRQ_INFO_MASKABLE (1 << 1)
Christopher Ferris38062f92014-07-09 15:33:25 -070087#define VFIO_IRQ_INFO_AUTOMASKED (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070089#define VFIO_IRQ_INFO_NORESIZE (1 << 3)
Tao Baod7db5942015-01-28 10:07:51 -080090 __u32 index;
91 __u32 count;
Christopher Ferris38062f92014-07-09 15:33:25 -070092};
Christopher Ferris05d08e92016-02-04 13:16:38 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define VFIO_DEVICE_GET_IRQ_INFO _IO(VFIO_TYPE, VFIO_BASE + 9)
95struct vfio_irq_set {
Tao Baod7db5942015-01-28 10:07:51 -080096 __u32 argsz;
Tao Baod7db5942015-01-28 10:07:51 -080097 __u32 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070099#define VFIO_IRQ_SET_DATA_NONE (1 << 0)
100#define VFIO_IRQ_SET_DATA_BOOL (1 << 1)
101#define VFIO_IRQ_SET_DATA_EVENTFD (1 << 2)
Christopher Ferris38062f92014-07-09 15:33:25 -0700102#define VFIO_IRQ_SET_ACTION_MASK (1 << 3)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700104#define VFIO_IRQ_SET_ACTION_UNMASK (1 << 4)
105#define VFIO_IRQ_SET_ACTION_TRIGGER (1 << 5)
Tao Baod7db5942015-01-28 10:07:51 -0800106 __u32 index;
Tao Baod7db5942015-01-28 10:07:51 -0800107 __u32 start;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 __u32 count;
110 __u8 data[];
Ben Cheng655a7c02013-10-16 16:09:24 -0700111};
Christopher Ferris38062f92014-07-09 15:33:25 -0700112#define VFIO_DEVICE_SET_IRQS _IO(VFIO_TYPE, VFIO_BASE + 10)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114#define VFIO_IRQ_SET_DATA_TYPE_MASK (VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_DATA_BOOL | VFIO_IRQ_SET_DATA_EVENTFD)
115#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 -0700116#define VFIO_DEVICE_RESET _IO(VFIO_TYPE, VFIO_BASE + 11)
Christopher Ferris38062f92014-07-09 15:33:25 -0700117enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 VFIO_PCI_BAR0_REGION_INDEX,
120 VFIO_PCI_BAR1_REGION_INDEX,
121 VFIO_PCI_BAR2_REGION_INDEX,
Tao Baod7db5942015-01-28 10:07:51 -0800122 VFIO_PCI_BAR3_REGION_INDEX,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 VFIO_PCI_BAR4_REGION_INDEX,
125 VFIO_PCI_BAR5_REGION_INDEX,
126 VFIO_PCI_ROM_REGION_INDEX,
Tao Baod7db5942015-01-28 10:07:51 -0800127 VFIO_PCI_CONFIG_REGION_INDEX,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 VFIO_PCI_VGA_REGION_INDEX,
130 VFIO_PCI_NUM_REGIONS
Ben Cheng655a7c02013-10-16 16:09:24 -0700131};
Christopher Ferris38062f92014-07-09 15:33:25 -0700132enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 VFIO_PCI_INTX_IRQ_INDEX,
135 VFIO_PCI_MSI_IRQ_INDEX,
136 VFIO_PCI_MSIX_IRQ_INDEX,
Tao Baod7db5942015-01-28 10:07:51 -0800137 VFIO_PCI_ERR_IRQ_INDEX,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 VFIO_PCI_REQ_IRQ_INDEX,
Tao Baod7db5942015-01-28 10:07:51 -0800140 VFIO_PCI_NUM_IRQS
Ben Cheng655a7c02013-10-16 16:09:24 -0700141};
Christopher Ferris38062f92014-07-09 15:33:25 -0700142struct vfio_pci_dependent_device {
Christopher Ferris82d75042015-01-26 10:57:07 -0800143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144 __u32 group_id;
145 __u16 segment;
146 __u8 bus;
147 __u8 devfn;
Christopher Ferris82d75042015-01-26 10:57:07 -0800148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700149};
150struct vfio_pci_hot_reset_info {
Tao Baod7db5942015-01-28 10:07:51 -0800151 __u32 argsz;
152 __u32 flags;
Christopher Ferris82d75042015-01-26 10:57:07 -0800153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 __u32 count;
155 struct vfio_pci_dependent_device devices[];
Christopher Ferris38062f92014-07-09 15:33:25 -0700156};
157#define VFIO_DEVICE_GET_PCI_HOT_RESET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
Christopher Ferris82d75042015-01-26 10:57:07 -0800158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700159struct vfio_pci_hot_reset {
Tao Baod7db5942015-01-28 10:07:51 -0800160 __u32 argsz;
161 __u32 flags;
162 __u32 count;
Christopher Ferris82d75042015-01-26 10:57:07 -0800163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800164 __s32 group_fds[];
Christopher Ferris38062f92014-07-09 15:33:25 -0700165};
166#define VFIO_DEVICE_PCI_HOT_RESET _IO(VFIO_TYPE, VFIO_BASE + 13)
167struct vfio_iommu_type1_info {
Christopher Ferris82d75042015-01-26 10:57:07 -0800168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800169 __u32 argsz;
170 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700171#define VFIO_IOMMU_INFO_PGSIZES (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800172 __u64 iova_pgsizes;
Christopher Ferris82d75042015-01-26 10:57:07 -0800173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700174};
Ben Cheng655a7c02013-10-16 16:09:24 -0700175#define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
176struct vfio_iommu_type1_dma_map {
Tao Baod7db5942015-01-28 10:07:51 -0800177 __u32 argsz;
Christopher Ferris82d75042015-01-26 10:57:07 -0800178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800179 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700180#define VFIO_DMA_MAP_FLAG_READ (1 << 0)
181#define VFIO_DMA_MAP_FLAG_WRITE (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -0800182 __u64 vaddr;
Christopher Ferris82d75042015-01-26 10:57:07 -0800183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800184 __u64 iova;
185 __u64 size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700186};
187#define VFIO_IOMMU_MAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 13)
Christopher Ferris82d75042015-01-26 10:57:07 -0800188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700189struct vfio_iommu_type1_dma_unmap {
Tao Baod7db5942015-01-28 10:07:51 -0800190 __u32 argsz;
191 __u32 flags;
192 __u64 iova;
Christopher Ferris82d75042015-01-26 10:57:07 -0800193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800194 __u64 size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700195};
196#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14)
Christopher Ferris38062f92014-07-09 15:33:25 -0700197#define VFIO_IOMMU_ENABLE _IO(VFIO_TYPE, VFIO_BASE + 15)
Christopher Ferris82d75042015-01-26 10:57:07 -0800198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700199#define VFIO_IOMMU_DISABLE _IO(VFIO_TYPE, VFIO_BASE + 16)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800200struct vfio_iommu_spapr_tce_ddw_info {
201 __u64 pgsizes;
202 __u32 max_dynamic_windows_supported;
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 __u32 levels;
205};
Christopher Ferris38062f92014-07-09 15:33:25 -0700206struct vfio_iommu_spapr_tce_info {
Tao Baod7db5942015-01-28 10:07:51 -0800207 __u32 argsz;
Christopher Ferris82d75042015-01-26 10:57:07 -0800208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800209 __u32 flags;
210#define VFIO_IOMMU_SPAPR_INFO_DDW (1 << 0)
Tao Baod7db5942015-01-28 10:07:51 -0800211 __u32 dma32_window_start;
212 __u32 dma32_window_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 struct vfio_iommu_spapr_tce_ddw_info ddw;
Christopher Ferris38062f92014-07-09 15:33:25 -0700215};
216#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800217struct vfio_eeh_pe_err {
Christopher Ferris82d75042015-01-26 10:57:07 -0800218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800219 __u32 type;
220 __u32 func;
221 __u64 addr;
222 __u64 mask;
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224};
Christopher Ferris82d75042015-01-26 10:57:07 -0800225struct vfio_eeh_pe_op {
Tao Baod7db5942015-01-28 10:07:51 -0800226 __u32 argsz;
227 __u32 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800229 __u32 op;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800230 union {
231 struct vfio_eeh_pe_err err;
232 };
Christopher Ferris82d75042015-01-26 10:57:07 -0800233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234};
235#define VFIO_EEH_PE_DISABLE 0
236#define VFIO_EEH_PE_ENABLE 1
237#define VFIO_EEH_PE_UNFREEZE_IO 2
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239#define VFIO_EEH_PE_UNFREEZE_DMA 3
240#define VFIO_EEH_PE_GET_STATE 4
241#define VFIO_EEH_PE_STATE_NORMAL 0
242#define VFIO_EEH_PE_STATE_RESET 1
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244#define VFIO_EEH_PE_STATE_STOPPED 2
245#define VFIO_EEH_PE_STATE_STOPPED_DMA 4
246#define VFIO_EEH_PE_STATE_UNAVAIL 5
247#define VFIO_EEH_PE_RESET_DEACTIVATE 5
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249#define VFIO_EEH_PE_RESET_HOT 6
250#define VFIO_EEH_PE_RESET_FUNDAMENTAL 7
251#define VFIO_EEH_PE_CONFIGURE 8
Christopher Ferris05d08e92016-02-04 13:16:38 -0800252#define VFIO_EEH_PE_INJECT_ERR 9
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -0800254#define VFIO_EEH_PE_OP _IO(VFIO_TYPE, VFIO_BASE + 21)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800255struct vfio_iommu_spapr_register_memory {
256 __u32 argsz;
257 __u32 flags;
258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 __u64 vaddr;
260 __u64 size;
261};
262#define VFIO_IOMMU_SPAPR_REGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 17)
263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264#define VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 18)
265struct vfio_iommu_spapr_tce_create {
266 __u32 argsz;
267 __u32 flags;
268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 __u32 page_shift;
270 __u64 window_size;
271 __u32 levels;
272 __u64 start_addr;
273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274};
275#define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19)
276struct vfio_iommu_spapr_tce_remove {
277 __u32 argsz;
278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279 __u32 flags;
280 __u64 start_addr;
281};
282#define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20)
Christopher Ferris82d75042015-01-26 10:57:07 -0800283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700284#endif