History

Merge branches 'for-3.18/always-poll-quirk', 'for-3.18/logitech', 'for-3.18/picolcd', 'for-3.18/rmi', 'for-3.18/sony', 'for-3.18/uhid', 'for-3.18/upstream' and 'for-3.18/wacom' into for-linus

Jiri Kosina committed 12 years ago

Commit ee5db7e9 parents 467669c 5235166 368d4e5 604b607 5b65c2a 981c5b4 8493ecc 5df4eb0 5ae6e894357 files · +172503 −102549Browse files

Showing the changes to include/uapi (20 of 4357 files). Show all

Unified · Split

20 files
  1. include/uapi/asm-generic/unistd.h +3 −1
  2. include/uapi/drm/drm.h +1 −1
  3. include/uapi/drm/drm_mode.h +5 −0
  4. include/uapi/drm/nouveau_drm.h +11 −0
  5. include/uapi/drm/radeon_drm.h +4 −1
  6. include/uapi/drm/tegra_drm.h +46 −0
  7. include/uapi/linux/bsg.h +6 −5
  8. include/uapi/linux/fcntl.h +15 −0
  9. include/uapi/linux/in6.h +1 −1
  10. include/uapi/linux/kexec.h +11 −0
  11. include/uapi/linux/kvm.h +4 −2
  12. include/uapi/linux/memfd.h +8 −0
  13. include/uapi/linux/serio.h +1 −0
  14. include/uapi/linux/uhid.h +95 −25
  15. include/uapi/linux/uinput.h +9 −0
  16. include/uapi/linux/vfio.h +34 −0
  17. include/uapi/linux/virtio_blk.h +5 −0
  18. include/uapi/rdma/ib_user_mad.h +42 −0
  19. include/uapi/rdma/ib_user_verbs.h +16 −0
  20. include/uapi/rdma/rdma_user_cm.h +1 −0
include/uapi/asm-generic/unistd.h+3−1
@@ -703,9 +703,11 @@ __SYSCALL(__NR_renameat2, sys_renameat2) · 702 unmodified lines
703703 __SYSCALL(__NR_seccomp, sys_seccomp)
704704 #define __NR_getrandom 278
705705 __SYSCALL(__NR_getrandom, sys_getrandom)
706+#define __NR_memfd_create 279
707+__SYSCALL(__NR_memfd_create, sys_memfd_create)
706708
707709 #undef __NR_syscalls
708−#define __NR_syscalls 279
710+#define __NR_syscalls 280
709711
710712 /*
711713 * All syscalls below here should go away really,
include/uapi/drm/drm.h+1−1
@@ -780,7 +780,7 @@ struct drm_prime_handle { · 779 unmodified lines
780780
781781 /**
782782 * Device specific ioctls should only be in their respective headers
783− * The device specific ioctl range is from 0x40 to 0x99.
783+ * The device specific ioctl range is from 0x40 to 0x9f.
784784 * Generic IOCTLS restart at 0xA0.
785785 *
786786 * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and
include/uapi/drm/drm_mode.h+5−0
@@ -88,6 +88,11 @@ · 87 unmodified lines
8888 #define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */
8989 #define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */
9090
91+/* Picture aspect ratio options */
92+#define DRM_MODE_PICTURE_ASPECT_NONE 0
93+#define DRM_MODE_PICTURE_ASPECT_4_3 1
94+#define DRM_MODE_PICTURE_ASPECT_16_9 2
95+
9196 /* Dithering mode options */
9297 #define DRM_MODE_DITHERING_OFF 0
9398 #define DRM_MODE_DITHERING_ON 1
include/uapi/drm/nouveau_drm.h+11−0
@@ -25,6 +25,16 @@ · 24 unmodified lines
2525 #ifndef __NOUVEAU_DRM_H__
2626 #define __NOUVEAU_DRM_H__
2727
28+#define DRM_NOUVEAU_EVENT_NVIF 0x80000000
29+
30+/* reserved object handles when using deprecated object APIs - these
31+ * are here so that libdrm can allow interoperability with the new
32+ * object APIs
33+ */
34+#define NOUVEAU_ABI16_CLIENT 0xffffffff
35+#define NOUVEAU_ABI16_DEVICE 0xdddddddd
36+#define NOUVEAU_ABI16_CHAN(n) (0xcccc0000 | (n))
37+
2838 #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)
2939 #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
3040 #define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
@@ -123,6 +133,7 @@ struct drm_nouveau_gem_cpu_fini { · 92 unmodified lines
123133 #define DRM_NOUVEAU_GROBJ_ALLOC 0x04 /* deprecated */
124134 #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 /* deprecated */
125135 #define DRM_NOUVEAU_GPUOBJ_FREE 0x06 /* deprecated */
136+#define DRM_NOUVEAU_NVIF 0x07
126137 #define DRM_NOUVEAU_GEM_NEW 0x40
127138 #define DRM_NOUVEAU_GEM_PUSHBUF 0x41
128139 #define DRM_NOUVEAU_GEM_CPU_PREP 0x42
include/uapi/drm/radeon_drm.h+4−1
@@ -796,7 +796,9 @@ struct drm_radeon_gem_info { · 795 unmodified lines
796796 uint64_t vram_visible;
797797 };
798798
799−#define RADEON_GEM_NO_BACKING_STORE 1
799+#define RADEON_GEM_NO_BACKING_STORE (1 << 0)
800+#define RADEON_GEM_GTT_UC (1 << 1)
801+#define RADEON_GEM_GTT_WC (1 << 2)
800802
801803 struct drm_radeon_gem_create {
802804 uint64_t size;
@@ -942,6 +944,7 @@ struct drm_radeon_cs_chunk { · 139 unmodified lines
942944 };
943945
944946 /* drm_radeon_cs_reloc.flags */
947+#define RADEON_RELOC_PRIO_MASK (0xf << 0)
945948
946949 struct drm_radeon_cs_reloc {
947950 uint32_t handle;
include/uapi/drm/tegra_drm.h+46−0
@@ -129,6 +129,44 @@ struct drm_tegra_submit { · 128 unmodified lines
129129 __u32 reserved[5]; /* future expansion */
130130 };
131131
132+#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0
133+#define DRM_TEGRA_GEM_TILING_MODE_TILED 1
134+#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2
135+
136+struct drm_tegra_gem_set_tiling {
137+ /* input */
138+ __u32 handle;
139+ __u32 mode;
140+ __u32 value;
141+ __u32 pad;
142+};
143+
144+struct drm_tegra_gem_get_tiling {
145+ /* input */
146+ __u32 handle;
147+ /* output */
148+ __u32 mode;
149+ __u32 value;
150+ __u32 pad;
151+};
152+
153+#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0)
154+#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP)
155+
156+struct drm_tegra_gem_set_flags {
157+ /* input */
158+ __u32 handle;
159+ /* output */
160+ __u32 flags;
161+};
162+
163+struct drm_tegra_gem_get_flags {
164+ /* input */
165+ __u32 handle;
166+ /* output */
167+ __u32 flags;
168+};
169+
132170 #define DRM_TEGRA_GEM_CREATE 0x00
133171 #define DRM_TEGRA_GEM_MMAP 0x01
134172 #define DRM_TEGRA_SYNCPT_READ 0x02
@@ -139,6 +177,10 @@ struct drm_tegra_submit { · 4 unmodified lines
139177 #define DRM_TEGRA_GET_SYNCPT 0x07
140178 #define DRM_TEGRA_SUBMIT 0x08
141179 #define DRM_TEGRA_GET_SYNCPT_BASE 0x09
180+#define DRM_TEGRA_GEM_SET_TILING 0x0a
181+#define DRM_TEGRA_GEM_GET_TILING 0x0b
182+#define DRM_TEGRA_GEM_SET_FLAGS 0x0c
183+#define DRM_TEGRA_GEM_GET_FLAGS 0x0d
142184
143185 #define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create)
144186 #define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap)
@@ -150,5 +192,9 @@ struct drm_tegra_submit { · 5 unmodified lines
150192 #define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt)
151193 #define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit)
152194 #define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base)
195+#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling)
196+#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling)
197+#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags)
198+#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags)
153199
154200 #endif
include/uapi/linux/bsg.h+6−5
@@ -10,12 +10,13 @@ · 9 unmodified lines
1010 #define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2
1111
1212 /*
13− * For flags member below
14− * sg.h sg_io_hdr also has bits defined for it's flags member. However
15− * none of these bits are implemented/used by bsg. The bits below are
16− * allocated to not conflict with sg.h ones anyway.
13+ * For flag constants below:
14+ * sg.h sg_io_hdr also has bits defined for it's flags member. These
15+ * two flag values (0x10 and 0x20) have the same meaning in sg.h . For
16+ * bsg the BSG_FLAG_Q_AT_HEAD flag is ignored since it is the deafult.
1717 */
18−#define BSG_FLAG_Q_AT_TAIL 0x10 /* default, == 0 at this bit, is Q_AT_HEAD */
18+#define BSG_FLAG_Q_AT_TAIL 0x10 /* default is Q_AT_HEAD */
19+#define BSG_FLAG_Q_AT_HEAD 0x20
1920
2021 struct sg_io_v4 {
2122 __s32 guard; /* [i] 'Q' to differentiate from v3 */
include/uapi/linux/fcntl.h+15−0
@@ -27,6 +27,21 @@ · 26 unmodified lines
2727 #define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
2828 #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
2929
30+/*
31+ * Set/Get seals
32+ */
33+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
34+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
35+
36+/*
37+ * Types of seals
38+ */
39+#define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
40+#define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
41+#define F_SEAL_GROW 0x0004 /* prevent file from growing */
42+#define F_SEAL_WRITE 0x0008 /* prevent writes */
43+/* (1U << 31) is reserved for signed error codes */
44+
3045 /*
3146 * Types of directory notifications that may be requested.
3247 */
include/uapi/linux/in6.h+1−1
@@ -233,7 +233,6 @@ struct in6_flowlabel_req { · 232 unmodified lines
233233 #if 0 /* not yet */
234234 #define IPV6_USE_MIN_MTU 63
235235 #endif
236−#define IPV6_AUTOFLOWLABEL 64
237236
238237 /*
239238 * Netfilter (1)
@@ -262,6 +261,7 @@ struct in6_flowlabel_req { · 22 unmodified lines
262261 * IP6T_SO_ORIGINAL_DST 80
263262 */
264263
264+#define IPV6_AUTOFLOWLABEL 70
265265 /* RFC5014: Source address selection */
266266 #define IPV6_ADDR_PREFERENCES 72
267267
include/uapi/linux/kexec.h+11−0
@@ -13,6 +13,17 @@ · 12 unmodified lines
1313 #define KEXEC_PRESERVE_CONTEXT 0x00000002
1414 #define KEXEC_ARCH_MASK 0xffff0000
1515
16+/*
17+ * Kexec file load interface flags.
18+ * KEXEC_FILE_UNLOAD : Unload already loaded kexec/kdump image.
19+ * KEXEC_FILE_ON_CRASH : Load/unload operation belongs to kdump image.
20+ * KEXEC_FILE_NO_INITRAMFS : No initramfs is being loaded. Ignore the initrd
21+ * fd field.
22+ */
23+#define KEXEC_FILE_UNLOAD 0x00000001
24+#define KEXEC_FILE_ON_CRASH 0x00000002
25+#define KEXEC_FILE_NO_INITRAMFS 0x00000004
26+
1627 /* These values match the ELF architecture values.
1728 * Unless there is a good reason that should continue to be the case.
1829 */
include/uapi/linux/kvm.h+4−2
@@ -162,7 +162,7 @@ struct kvm_pit_config { · 161 unmodified lines
162162 #define KVM_EXIT_TPR_ACCESS 12
163163 #define KVM_EXIT_S390_SIEIC 13
164164 #define KVM_EXIT_S390_RESET 14
165−#define KVM_EXIT_DCR 15
165+#define KVM_EXIT_DCR 15 /* deprecated */
166166 #define KVM_EXIT_NMI 16
167167 #define KVM_EXIT_INTERNAL_ERROR 17
168168 #define KVM_EXIT_OSI 18
@@ -268,7 +268,7 @@ struct kvm_run { · 99 unmodified lines
268268 __u64 trans_exc_code;
269269 __u32 pgm_code;
270270 } s390_ucontrol;
271− /* KVM_EXIT_DCR */
271+ /* KVM_EXIT_DCR (deprecated) */
272272 struct {
273273 __u32 dcrn;
274274 __u32 data;
@@ -763,6 +763,8 @@ struct kvm_ppc_smmu_info { · 488 unmodified lines
763763 #define KVM_CAP_VM_ATTRIBUTES 101
764764 #define KVM_CAP_ARM_PSCI_0_2 102
765765 #define KVM_CAP_PPC_FIXUP_HCALL 103
766+#define KVM_CAP_PPC_ENABLE_HCALL 104
767+#define KVM_CAP_CHECK_EXTENSION_VM 105
766768
767769 #ifdef KVM_CAP_IRQ_ROUTING
768770
include/uapi/linux/memfd.h+8−0
@@ -0,0 +1,8 @@
1+#ifndef _UAPI_LINUX_MEMFD_H
2+#define _UAPI_LINUX_MEMFD_H
3+
4+/* flags for memfd_create(2) (unsigned int) */
5+#define MFD_CLOEXEC 0x0001U
6+#define MFD_ALLOW_SEALING 0x0002U
7+
8+#endif /* _UAPI_LINUX_MEMFD_H */
include/uapi/linux/serio.h+1−0
@@ -76,5 +76,6 @@ · 75 unmodified lines
7676 #define SERIO_HAMPSHIRE 0x3b
7777 #define SERIO_PS2MULT 0x3c
7878 #define SERIO_TSC40 0x3d
79+#define SERIO_WACOM_IV 0x3e
7980
8081 #endif /* _UAPI_SERIO_H */
include/uapi/linux/uhid.h+95−25
@@ -24,35 +24,23 @@ · 23 unmodified lines
2424 #include <linux/hid.h>
2525
2626 enum uhid_event_type {
27− UHID_CREATE,
27+ __UHID_LEGACY_CREATE,
2828 UHID_DESTROY,
2929 UHID_START,
3030 UHID_STOP,
3131 UHID_OPEN,
3232 UHID_CLOSE,
3333 UHID_OUTPUT,
34− UHID_OUTPUT_EV, /* obsolete! */
35− UHID_INPUT,
36− UHID_FEATURE,
37− UHID_FEATURE_ANSWER,
34+ __UHID_LEGACY_OUTPUT_EV,
35+ __UHID_LEGACY_INPUT,
36+ UHID_GET_REPORT,
37+ UHID_GET_REPORT_REPLY,
3838 UHID_CREATE2,
3939 UHID_INPUT2,
40+ UHID_SET_REPORT,
41+ UHID_SET_REPORT_REPLY,
4042 };
4143
42−struct uhid_create_req {
43− __u8 name[128];
44− __u8 phys[64];
45− __u8 uniq[64];
46− __u8 __user *rd_data;
47− __u16 rd_size;
48−
49− __u16 bus;
50− __u32 vendor;
51− __u32 product;
52− __u32 version;
53− __u32 country;
54−} __attribute__((__packed__));
55−
5644 struct uhid_create2_req {
5745 __u8 name[128];
5846 __u8 phys[64];
@@ -66,6 +54,16 @@ struct uhid_create2_req { · 7 unmodified lines
6654 __u8 rd_data[HID_MAX_DESCRIPTOR_SIZE];
6755 } __attribute__((__packed__));
6856
57+enum uhid_dev_flag {
58+ UHID_DEV_NUMBERED_FEATURE_REPORTS = (1ULL << 0),
59+ UHID_DEV_NUMBERED_OUTPUT_REPORTS = (1ULL << 1),
60+ UHID_DEV_NUMBERED_INPUT_REPORTS = (1ULL << 2),
61+};
62+
63+struct uhid_start_req {
64+ __u64 dev_flags;
65+};
66+
6967 #define UHID_DATA_MAX 4096
7068
7169 enum uhid_report_type {
@@ -74,36 +72,94 @@ enum uhid_report_type { · 2 unmodified lines
7472 UHID_INPUT_REPORT,
7573 };
7674
77−struct uhid_input_req {
75+struct uhid_input2_req {
76+ __u16 size;
77+ __u8 data[UHID_DATA_MAX];
78+} __attribute__((__packed__));
79+
80+struct uhid_output_req {
7881 __u8 data[UHID_DATA_MAX];
7982 __u16 size;
83+ __u8 rtype;
8084 } __attribute__((__packed__));
8185
82−struct uhid_input2_req {
86+struct uhid_get_report_req {
87+ __u32 id;
88+ __u8 rnum;
89+ __u8 rtype;
90+} __attribute__((__packed__));
91+
92+struct uhid_get_report_reply_req {
93+ __u32 id;
94+ __u16 err;
8395 __u16 size;
8496 __u8 data[UHID_DATA_MAX];
8597 } __attribute__((__packed__));
8698
87−struct uhid_output_req {
99+struct uhid_set_report_req {
100+ __u32 id;
101+ __u8 rnum;
102+ __u8 rtype;
103+ __u16 size;
104+ __u8 data[UHID_DATA_MAX];
105+} __attribute__((__packed__));
106+
107+struct uhid_set_report_reply_req {
108+ __u32 id;
109+ __u16 err;
110+} __attribute__((__packed__));
111+
112+/*
113+ * Compat Layer
114+ * All these commands and requests are obsolete. You should avoid using them in
115+ * new code. We support them for backwards-compatibility, but you might not get
116+ * access to new feature in case you use them.
117+ */
118+
119+enum uhid_legacy_event_type {
120+ UHID_CREATE = __UHID_LEGACY_CREATE,
121+ UHID_OUTPUT_EV = __UHID_LEGACY_OUTPUT_EV,
122+ UHID_INPUT = __UHID_LEGACY_INPUT,
123+ UHID_FEATURE = UHID_GET_REPORT,
124+ UHID_FEATURE_ANSWER = UHID_GET_REPORT_REPLY,
125+};
126+
127+/* Obsolete! Use UHID_CREATE2. */
128+struct uhid_create_req {
129+ __u8 name[128];
130+ __u8 phys[64];
131+ __u8 uniq[64];
132+ __u8 __user *rd_data;
133+ __u16 rd_size;
134+
135+ __u16 bus;
136+ __u32 vendor;
137+ __u32 product;
138+ __u32 version;
139+ __u32 country;
140+} __attribute__((__packed__));
141+
142+/* Obsolete! Use UHID_INPUT2. */
143+struct uhid_input_req {
88144 __u8 data[UHID_DATA_MAX];
89145 __u16 size;
90− __u8 rtype;
91146 } __attribute__((__packed__));
92147
93−/* Obsolete! Newer kernels will no longer send these events but instead convert
94− * it into raw output reports via UHID_OUTPUT. */
148+/* Obsolete! Kernel uses UHID_OUTPUT exclusively now. */
95149 struct uhid_output_ev_req {
96150 __u16 type;
97151 __u16 code;
98152 __s32 value;
99153 } __attribute__((__packed__));
100154
155+/* Obsolete! Kernel uses ABI compatible UHID_GET_REPORT. */
101156 struct uhid_feature_req {
102157 __u32 id;
103158 __u8 rnum;
104159 __u8 rtype;
105160 } __attribute__((__packed__));
106161
162+/* Obsolete! Use ABI compatible UHID_GET_REPORT_REPLY. */
107163 struct uhid_feature_answer_req {
108164 __u32 id;
109165 __u16 err;
@@ -111,6 +167,15 @@ struct uhid_feature_answer_req { · 1 unmodified line
111167 __u8 data[UHID_DATA_MAX];
112168 } __attribute__((__packed__));
113169
170+/*
171+ * UHID Events
172+ * All UHID events from and to the kernel are encoded as "struct uhid_event".
173+ * The "type" field contains a UHID_* type identifier. All payload depends on
174+ * that type and can be accessed via ev->u.XYZ accordingly.
175+ * If user-space writes short events, they're extended with 0s by the kernel. If
176+ * the kernel writes short events, user-space shall extend them with 0s.
177+ */
178+
114179 struct uhid_event {
115180 __u32 type;
116181
@@ -120,9 +185,14 @@ struct uhid_event { · 3 unmodified lines
120185 struct uhid_output_req output;
121186 struct uhid_output_ev_req output_ev;
122187 struct uhid_feature_req feature;
188+ struct uhid_get_report_req get_report;
123189 struct uhid_feature_answer_req feature_answer;
190+ struct uhid_get_report_reply_req get_report_reply;
124191 struct uhid_create2_req create2;
125192 struct uhid_input2_req input2;
193+ struct uhid_set_report_req set_report;
194+ struct uhid_set_report_reply_req set_report_reply;
195+ struct uhid_start_req start;
126196 } u;
127197 } __attribute__((__packed__));
128198
include/uapi/linux/uinput.h+9−0
@@ -84,6 +84,15 @@ struct uinput_ff_erase { · 83 unmodified lines
8484 */
8585 #define UI_GET_SYSNAME(len) _IOC(_IOC_READ, UINPUT_IOCTL_BASE, 300, len)
8686
87+/**
88+ * UI_GET_VERSION - Return version of uinput protocol
89+ *
90+ * This writes uinput protocol version implemented by the kernel into
91+ * the integer pointed to by the ioctl argument. The protocol version
92+ * is hard-coded in the kernel and is independent of the uinput device.
93+ */
94+#define UI_GET_VERSION _IOR(UINPUT_IOCTL_BASE, 301, unsigned int)
95+
8796 /*
8897 * To write a force-feedback-capable driver, the upload_effect
8998 * and erase_effect callbacks in input_dev must be implemented.
include/uapi/linux/vfio.h+34−0
@@ -30,6 +30,9 @@ · 29 unmodified lines
3030 */
3131 #define VFIO_DMA_CC_IOMMU 4
3232
33+/* Check if EEH is supported */
34+#define VFIO_EEH 5
35+
3336 /*
3437 * The IOCTL interface is designed for extensibility by embedding the
3538 * structure length (argsz) and flags into structures passed between
@@ -455,6 +458,37 @@ struct vfio_iommu_spapr_tce_info { · 419 unmodified lines
455458
456459 #define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
457460
461+/*
462+ * EEH PE operation struct provides ways to:
463+ * - enable/disable EEH functionality;
464+ * - unfreeze IO/DMA for frozen PE;
465+ * - read PE state;
466+ * - reset PE;
467+ * - configure PE.
468+ */
469+struct vfio_eeh_pe_op {
470+ __u32 argsz;
471+ __u32 flags;
472+ __u32 op;
473+};
474+
475+#define VFIO_EEH_PE_DISABLE 0 /* Disable EEH functionality */
476+#define VFIO_EEH_PE_ENABLE 1 /* Enable EEH functionality */
477+#define VFIO_EEH_PE_UNFREEZE_IO 2 /* Enable IO for frozen PE */
478+#define VFIO_EEH_PE_UNFREEZE_DMA 3 /* Enable DMA for frozen PE */
479+#define VFIO_EEH_PE_GET_STATE 4 /* PE state retrieval */
480+#define VFIO_EEH_PE_STATE_NORMAL 0 /* PE in functional state */
481+#define VFIO_EEH_PE_STATE_RESET 1 /* PE reset in progress */
482+#define VFIO_EEH_PE_STATE_STOPPED 2 /* Stopped DMA and IO */
483+#define VFIO_EEH_PE_STATE_STOPPED_DMA 4 /* Stopped DMA only */
484+#define VFIO_EEH_PE_STATE_UNAVAIL 5 /* State unavailable */
485+#define VFIO_EEH_PE_RESET_DEACTIVATE 5 /* Deassert PE reset */
486+#define VFIO_EEH_PE_RESET_HOT 6 /* Assert hot reset */
487+#define VFIO_EEH_PE_RESET_FUNDAMENTAL 7 /* Assert fundamental reset */
488+#define VFIO_EEH_PE_CONFIGURE 8 /* PE configuration */
489+
490+#define VFIO_EEH_PE_OP _IO(VFIO_TYPE, VFIO_BASE + 21)
491+
458492 /* ***************************************************************** */
459493
460494 #endif /* _UAPIVFIO_H */
include/uapi/linux/virtio_blk.h+5−0
@@ -40,6 +40,7 @@ · 39 unmodified lines
4040 #define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */
4141 #define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */
4242 #define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */
43+#define VIRTIO_BLK_F_MQ 12 /* support more than one vq */
4344
4445 #ifndef __KERNEL__
4546 /* Old (deprecated) name for VIRTIO_BLK_F_WCE. */
@@ -77,6 +78,10 @@ struct virtio_blk_config { · 31 unmodified lines
7778
7879 /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */
7980 __u8 wce;
81+ __u8 unused;
82+
83+ /* number of vqs, only available when VIRTIO_BLK_F_MQ is set */
84+ __u16 num_queues;
8085 } __attribute__((packed));
8186
8287 /*
include/uapi/rdma/ib_user_mad.h+42−0
@@ -191,6 +191,45 @@ struct ib_user_mad_reg_req { · 190 unmodified lines
191191 __u8 rmpp_version;
192192 };
193193
194+/**
195+ * ib_user_mad_reg_req2 - MAD registration request
196+ *
197+ * @id - Set by the _kernel_; used by userspace to identify the
198+ * registered agent in future requests.
199+ * @qpn - Queue pair number; must be 0 or 1.
200+ * @mgmt_class - Indicates which management class of MADs should be
201+ * receive by the caller. This field is only required if
202+ * the user wishes to receive unsolicited MADs, otherwise
203+ * it should be 0.
204+ * @mgmt_class_version - Indicates which version of MADs for the given
205+ * management class to receive.
206+ * @res - Ignored.
207+ * @flags - additional registration flags; Must be in the set of
208+ * flags defined in IB_USER_MAD_REG_FLAGS_CAP
209+ * @method_mask - The caller wishes to receive unsolicited MADs for the
210+ * methods whose bit(s) is(are) set.
211+ * @oui - Indicates IEEE OUI to use when mgmt_class is a vendor
212+ * class in the range from 0x30 to 0x4f. Otherwise not
213+ * used.
214+ * @rmpp_version - If set, indicates the RMPP version to use.
215+ */
216+enum {
217+ IB_USER_MAD_USER_RMPP = (1 << 0),
218+};
219+#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
220+struct ib_user_mad_reg_req2 {
221+ __u32 id;
222+ __u32 qpn;
223+ __u8 mgmt_class;
224+ __u8 mgmt_class_version;
225+ __u16 res;
226+ __u32 flags;
227+ __u64 method_mask[2];
228+ __u32 oui;
229+ __u8 rmpp_version;
230+ __u8 reserved[3];
231+};
232+
194233 #define IB_IOCTL_MAGIC 0x1b
195234
196235 #define IB_USER_MAD_REGISTER_AGENT _IOWR(IB_IOCTL_MAGIC, 1, \
@@ -200,4 +239,7 @@ struct ib_user_mad_reg_req { · 3 unmodified lines
200239
201240 #define IB_USER_MAD_ENABLE_PKEY _IO(IB_IOCTL_MAGIC, 3)
202241
242+#define IB_USER_MAD_REGISTER_AGENT2 _IOWR(IB_IOCTL_MAGIC, 4, \
243+ struct ib_user_mad_reg_req2)
244+
203245 #endif /* IB_USER_MAD_H */
include/uapi/rdma/ib_user_verbs.h+16−0
@@ -276,6 +276,22 @@ struct ib_uverbs_reg_mr_resp { · 275 unmodified lines
276276 __u32 rkey;
277277 };
278278
279+struct ib_uverbs_rereg_mr {
280+ __u64 response;
281+ __u32 mr_handle;
282+ __u32 flags;
283+ __u64 start;
284+ __u64 length;
285+ __u64 hca_va;
286+ __u32 pd_handle;
287+ __u32 access_flags;
288+};
289+
290+struct ib_uverbs_rereg_mr_resp {
291+ __u32 lkey;
292+ __u32 rkey;
293+};
294+
279295 struct ib_uverbs_dereg_mr {
280296 __u32 mr_handle;
281297 };
include/uapi/rdma/rdma_user_cm.h+1−0
@@ -34,6 +34,7 @@ · 33 unmodified lines
3434 #define RDMA_USER_CM_H
3535
3636 #include <linux/types.h>
37+#include <linux/socket.h>
3738 #include <linux/in6.h>
3839 #include <rdma/ib_user_verbs.h>
3940 #include <rdma/ib_user_sa.h>