summaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-09-22 05:02:18 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-09-24 11:18:41 -0400
commit646db260b843d2f758559a5483174354c304acf8 (patch)
tree73cf06896311567e8fcb75730d4461fd689a3d3f /include/uapi
parenta645654b817feba05e5156345325d19fc85ebc9f (diff)
parent1f93e4a96c9109378204c147b3eec0d0e8100fde (diff)
Merge tag 'v4.3-rc2' into topic/drm-misc
Backmerge Linux 4.3-rc2 because of conflicts in the dp helper code between bugfixes and new code. Just adjacent lines really. On top of that there's a silent conflict in the new fsl-dcu driver merged into 4.3 and commit 844f9111f6f54f88eb2f0fac121b82ce77193866 Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Date: Wed Sep 2 10:42:40 2015 +0200 drm/atomic: Make prepare_fb/cleanup_fb only take state, v3. which Thierry Reding spotted and provided a fixup for. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/asm-generic/unistd.h4
-rw-r--r--include/uapi/drm/i915_drm.h2
-rw-r--r--include/uapi/linux/Kbuild3
-rw-r--r--include/uapi/linux/audit.h8
-rw-r--r--include/uapi/linux/bpf.h29
-rw-r--r--include/uapi/linux/dlm_device.h2
-rw-r--r--include/uapi/linux/dm-ioctl.h4
-rw-r--r--include/uapi/linux/elf-em.h3
-rw-r--r--include/uapi/linux/ethtool.h5
-rw-r--r--include/uapi/linux/fib_rules.h2
-rw-r--r--include/uapi/linux/gsmmux.h1
-rw-r--r--include/uapi/linux/if_bridge.h1
-rw-r--r--include/uapi/linux/if_ether.h1
-rw-r--r--include/uapi/linux/if_link.h16
-rw-r--r--include/uapi/linux/if_packet.h3
-rw-r--r--include/uapi/linux/if_tunnel.h1
-rw-r--r--include/uapi/linux/ila.h15
-rw-r--r--include/uapi/linux/ip_vs.h5
-rw-r--r--include/uapi/linux/ipv6.h3
-rw-r--r--include/uapi/linux/kernel-page-flags.h1
-rw-r--r--include/uapi/linux/kvm.h7
-rw-r--r--include/uapi/linux/lwtunnel.h47
-rw-r--r--include/uapi/linux/mei.h19
-rw-r--r--include/uapi/linux/membarrier.h53
-rw-r--r--include/uapi/linux/mpls.h2
-rw-r--r--include/uapi/linux/mpls_iptunnel.h28
-rw-r--r--include/uapi/linux/ndctl.h12
-rw-r--r--include/uapi/linux/neighbour.h1
-rw-r--r--include/uapi/linux/netfilter/nf_conntrack_sctp.h2
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h23
-rw-r--r--include/uapi/linux/netfilter/nfnetlink_conntrack.h1
-rw-r--r--include/uapi/linux/netfilter/nfnetlink_cttimeout.h2
-rw-r--r--include/uapi/linux/netfilter/xt_CT.h8
-rw-r--r--include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h4
-rw-r--r--include/uapi/linux/netlink.h1
-rw-r--r--include/uapi/linux/nfs4.h2
-rw-r--r--include/uapi/linux/nfsacl.h1
-rw-r--r--include/uapi/linux/nvme.h1
-rw-r--r--include/uapi/linux/openvswitch.h60
-rw-r--r--include/uapi/linux/perf_event.h35
-rw-r--r--include/uapi/linux/prctl.h7
-rw-r--r--include/uapi/linux/ptrace.h6
-rw-r--r--include/uapi/linux/rtnetlink.h13
-rw-r--r--include/uapi/linux/securebits.h11
-rw-r--r--include/uapi/linux/snmp.h2
-rw-r--r--include/uapi/linux/target_core_user.h4
-rw-r--r--include/uapi/linux/toshiba.h32
-rw-r--r--include/uapi/linux/usb/ch9.h12
-rw-r--r--include/uapi/linux/userfaultfd.h169
-rw-r--r--include/uapi/linux/v4l2-controls.h4
-rw-r--r--include/uapi/linux/vsp1.h2
-rw-r--r--include/uapi/misc/cxl.h4
-rw-r--r--include/uapi/rdma/Kbuild1
-rw-r--r--include/uapi/rdma/hfi/Kbuild2
-rw-r--r--include/uapi/rdma/hfi/hfi1_user.h427
-rw-r--r--include/uapi/rdma/rdma_netlink.h82
-rw-r--r--include/uapi/scsi/Kbuild1
-rw-r--r--include/uapi/scsi/cxlflash_ioctl.h174
-rw-r--r--include/uapi/xen/privcmd.h4
59 files changed, 1345 insertions, 30 deletions
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index e016bd9b1a04..8da542a2874d 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -709,9 +709,11 @@ __SYSCALL(__NR_memfd_create, sys_memfd_create)
709__SYSCALL(__NR_bpf, sys_bpf) 709__SYSCALL(__NR_bpf, sys_bpf)
710#define __NR_execveat 281 710#define __NR_execveat 281
711__SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat) 711__SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat)
712#define __NR_membarrier 282
713__SYSCALL(__NR_membarrier, sys_membarrier)
712 714
713#undef __NR_syscalls 715#undef __NR_syscalls
714#define __NR_syscalls 282 716#define __NR_syscalls 283
715 717
716/* 718/*
717 * All syscalls below here should go away really, 719 * All syscalls below here should go away really,
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index dbd16a2d37db..fd5aa47bd689 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -358,7 +358,7 @@ typedef struct drm_i915_irq_wait {
358#define I915_PARAM_HAS_RESOURCE_STREAMER 36 358#define I915_PARAM_HAS_RESOURCE_STREAMER 36
359 359
360typedef struct drm_i915_getparam { 360typedef struct drm_i915_getparam {
361 s32 param; 361 __s32 param;
362 /* 362 /*
363 * WARNING: Using pointers instead of fixed-size u64 means we need to write 363 * WARNING: Using pointers instead of fixed-size u64 means we need to write
364 * compat32 code. Don't repeat this mistake. 364 * compat32 code. Don't repeat this mistake.
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 1ff9942718fe..f7b2db44eb4b 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -243,6 +243,7 @@ header-y += limits.h
243header-y += llc.h 243header-y += llc.h
244header-y += loop.h 244header-y += loop.h
245header-y += lp.h 245header-y += lp.h
246header-y += lwtunnel.h
246header-y += magic.h 247header-y += magic.h
247header-y += major.h 248header-y += major.h
248header-y += map_to_7segment.h 249header-y += map_to_7segment.h
@@ -251,6 +252,7 @@ header-y += mdio.h
251header-y += media.h 252header-y += media.h
252header-y += media-bus-format.h 253header-y += media-bus-format.h
253header-y += mei.h 254header-y += mei.h
255header-y += membarrier.h
254header-y += memfd.h 256header-y += memfd.h
255header-y += mempolicy.h 257header-y += mempolicy.h
256header-y += meye.h 258header-y += meye.h
@@ -455,3 +457,4 @@ header-y += xfrm.h
455header-y += xilinx-v4l2-controls.h 457header-y += xilinx-v4l2-controls.h
456header-y += zorro.h 458header-y += zorro.h
457header-y += zorro_ids.h 459header-y += zorro_ids.h
460header-y += userfaultfd.h
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index d3475e1f15ec..843540c398eb 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -266,6 +266,7 @@
266#define AUDIT_OBJ_UID 109 266#define AUDIT_OBJ_UID 109
267#define AUDIT_OBJ_GID 110 267#define AUDIT_OBJ_GID 110
268#define AUDIT_FIELD_COMPARE 111 268#define AUDIT_FIELD_COMPARE 111
269#define AUDIT_EXE 112
269 270
270#define AUDIT_ARG0 200 271#define AUDIT_ARG0 200
271#define AUDIT_ARG1 (AUDIT_ARG0+1) 272#define AUDIT_ARG1 (AUDIT_ARG0+1)
@@ -324,8 +325,10 @@ enum {
324 325
325#define AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT 0x00000001 326#define AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT 0x00000001
326#define AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME 0x00000002 327#define AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME 0x00000002
328#define AUDIT_FEATURE_BITMAP_EXECUTABLE_PATH 0x00000004
327#define AUDIT_FEATURE_BITMAP_ALL (AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT | \ 329#define AUDIT_FEATURE_BITMAP_ALL (AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT | \
328 AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME) 330 AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME | \
331 AUDIT_FEATURE_BITMAP_EXECUTABLE_PATH)
329 332
330/* deprecated: AUDIT_VERSION_* */ 333/* deprecated: AUDIT_VERSION_* */
331#define AUDIT_VERSION_LATEST AUDIT_FEATURE_BITMAP_ALL 334#define AUDIT_VERSION_LATEST AUDIT_FEATURE_BITMAP_ALL
@@ -382,6 +385,9 @@ enum {
382#define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) 385#define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
383#define AUDIT_ARCH_SPARC (EM_SPARC) 386#define AUDIT_ARCH_SPARC (EM_SPARC)
384#define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT) 387#define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
388#define AUDIT_ARCH_TILEGX (EM_TILEGX|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
389#define AUDIT_ARCH_TILEGX32 (EM_TILEGX|__AUDIT_ARCH_LE)
390#define AUDIT_ARCH_TILEPRO (EM_TILEPRO|__AUDIT_ARCH_LE)
385#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) 391#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
386 392
387#define AUDIT_PERM_EXEC 1 393#define AUDIT_PERM_EXEC 1
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 29ef6f99e43d..92a48e2d5461 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -114,6 +114,7 @@ enum bpf_map_type {
114 BPF_MAP_TYPE_HASH, 114 BPF_MAP_TYPE_HASH,
115 BPF_MAP_TYPE_ARRAY, 115 BPF_MAP_TYPE_ARRAY,
116 BPF_MAP_TYPE_PROG_ARRAY, 116 BPF_MAP_TYPE_PROG_ARRAY,
117 BPF_MAP_TYPE_PERF_EVENT_ARRAY,
117}; 118};
118 119
119enum bpf_prog_type { 120enum bpf_prog_type {
@@ -249,6 +250,28 @@ enum bpf_func_id {
249 * Return: 0 on success 250 * Return: 0 on success
250 */ 251 */
251 BPF_FUNC_get_current_comm, 252 BPF_FUNC_get_current_comm,
253
254 /**
255 * bpf_get_cgroup_classid(skb) - retrieve a proc's classid
256 * @skb: pointer to skb
257 * Return: classid if != 0
258 */
259 BPF_FUNC_get_cgroup_classid,
260 BPF_FUNC_skb_vlan_push, /* bpf_skb_vlan_push(skb, vlan_proto, vlan_tci) */
261 BPF_FUNC_skb_vlan_pop, /* bpf_skb_vlan_pop(skb) */
262
263 /**
264 * bpf_skb_[gs]et_tunnel_key(skb, key, size, flags)
265 * retrieve or populate tunnel metadata
266 * @skb: pointer to skb
267 * @key: pointer to 'struct bpf_tunnel_key'
268 * @size: size of 'struct bpf_tunnel_key'
269 * @flags: room for future extensions
270 * Retrun: 0 on success
271 */
272 BPF_FUNC_skb_get_tunnel_key,
273 BPF_FUNC_skb_set_tunnel_key,
274 BPF_FUNC_perf_event_read, /* u64 bpf_perf_event_read(&map, index) */
252 __BPF_FUNC_MAX_ID, 275 __BPF_FUNC_MAX_ID,
253}; 276};
254 277
@@ -269,6 +292,12 @@ struct __sk_buff {
269 __u32 ifindex; 292 __u32 ifindex;
270 __u32 tc_index; 293 __u32 tc_index;
271 __u32 cb[5]; 294 __u32 cb[5];
295 __u32 hash;
296};
297
298struct bpf_tunnel_key {
299 __u32 tunnel_id;
300 __u32 remote_ipv4;
272}; 301};
273 302
274#endif /* _UAPI__LINUX_BPF_H__ */ 303#endif /* _UAPI__LINUX_BPF_H__ */
diff --git a/include/uapi/linux/dlm_device.h b/include/uapi/linux/dlm_device.h
index 3060783c4191..df56c8ff0769 100644
--- a/include/uapi/linux/dlm_device.h
+++ b/include/uapi/linux/dlm_device.h
@@ -26,7 +26,7 @@
26/* Version of the device interface */ 26/* Version of the device interface */
27#define DLM_DEVICE_VERSION_MAJOR 6 27#define DLM_DEVICE_VERSION_MAJOR 6
28#define DLM_DEVICE_VERSION_MINOR 0 28#define DLM_DEVICE_VERSION_MINOR 0
29#define DLM_DEVICE_VERSION_PATCH 1 29#define DLM_DEVICE_VERSION_PATCH 2
30 30
31/* struct passed to the lock write */ 31/* struct passed to the lock write */
32struct dlm_lock_params { 32struct dlm_lock_params {
diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h
index 061aca3a962d..d34611e35a30 100644
--- a/include/uapi/linux/dm-ioctl.h
+++ b/include/uapi/linux/dm-ioctl.h
@@ -267,9 +267,9 @@ enum {
267#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) 267#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
268 268
269#define DM_VERSION_MAJOR 4 269#define DM_VERSION_MAJOR 4
270#define DM_VERSION_MINOR 32 270#define DM_VERSION_MINOR 33
271#define DM_VERSION_PATCHLEVEL 0 271#define DM_VERSION_PATCHLEVEL 0
272#define DM_VERSION_EXTRA "-ioctl (2015-6-26)" 272#define DM_VERSION_EXTRA "-ioctl (2015-8-18)"
273 273
274/* Status bits */ 274/* Status bits */
275#define DM_READONLY_FLAG (1 << 0) /* In/Out */ 275#define DM_READONLY_FLAG (1 << 0) /* In/Out */
diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h
index b08829667ed7..b56dfcfe922a 100644
--- a/include/uapi/linux/elf-em.h
+++ b/include/uapi/linux/elf-em.h
@@ -38,6 +38,9 @@
38#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */ 38#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */
39#define EM_TI_C6000 140 /* TI C6X DSPs */ 39#define EM_TI_C6000 140 /* TI C6X DSPs */
40#define EM_AARCH64 183 /* ARM 64 bit */ 40#define EM_AARCH64 183 /* ARM 64 bit */
41#define EM_TILEPRO 188 /* Tilera TILEPro */
42#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
43#define EM_TILEGX 191 /* Tilera TILE-Gx */
41#define EM_FRV 0x5441 /* Fujitsu FR-V */ 44#define EM_FRV 0x5441 /* Fujitsu FR-V */
42#define EM_AVR32 0x18ad /* Atmel AVR32 */ 45#define EM_AVR32 0x18ad /* Atmel AVR32 */
43 46
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index cd67aec187d9..cd1629170103 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1093,6 +1093,11 @@ struct ethtool_sfeatures {
1093 * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values, 1093 * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values,
1094 * respectively. For example, if the device supports HWTSTAMP_TX_ON, 1094 * respectively. For example, if the device supports HWTSTAMP_TX_ON,
1095 * then (1 << HWTSTAMP_TX_ON) in 'tx_types' will be set. 1095 * then (1 << HWTSTAMP_TX_ON) in 'tx_types' will be set.
1096 *
1097 * Drivers should only report the filters they actually support without
1098 * upscaling in the SIOCSHWTSTAMP ioctl. If the SIOCSHWSTAMP request for
1099 * HWTSTAMP_FILTER_V1_SYNC is supported by HWTSTAMP_FILTER_V1_EVENT, then the
1100 * driver should only report HWTSTAMP_FILTER_V1_EVENT in this op.
1096 */ 1101 */
1097struct ethtool_ts_info { 1102struct ethtool_ts_info {
1098 __u32 cmd; 1103 __u32 cmd;
diff --git a/include/uapi/linux/fib_rules.h b/include/uapi/linux/fib_rules.h
index 2b82d7e30974..96161b8202b5 100644
--- a/include/uapi/linux/fib_rules.h
+++ b/include/uapi/linux/fib_rules.h
@@ -43,7 +43,7 @@ enum {
43 FRA_UNUSED5, 43 FRA_UNUSED5,
44 FRA_FWMARK, /* mark */ 44 FRA_FWMARK, /* mark */
45 FRA_FLOW, /* flow/class id */ 45 FRA_FLOW, /* flow/class id */
46 FRA_UNUSED6, 46 FRA_TUN_ID,
47 FRA_SUPPRESS_IFGROUP, 47 FRA_SUPPRESS_IFGROUP,
48 FRA_SUPPRESS_PREFIXLEN, 48 FRA_SUPPRESS_PREFIXLEN,
49 FRA_TABLE, /* Extended table id */ 49 FRA_TABLE, /* Extended table id */
diff --git a/include/uapi/linux/gsmmux.h b/include/uapi/linux/gsmmux.h
index c06742d52856..ab055d8cddef 100644
--- a/include/uapi/linux/gsmmux.h
+++ b/include/uapi/linux/gsmmux.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/if.h> 4#include <linux/if.h>
5#include <linux/ioctl.h> 5#include <linux/ioctl.h>
6#include <linux/types.h>
6 7
7struct gsm_config 8struct gsm_config
8{ 9{
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h
index eaaea6208b42..3635b7797508 100644
--- a/include/uapi/linux/if_bridge.h
+++ b/include/uapi/linux/if_bridge.h
@@ -182,6 +182,7 @@ struct br_mdb_entry {
182#define MDB_TEMPORARY 0 182#define MDB_TEMPORARY 0
183#define MDB_PERMANENT 1 183#define MDB_PERMANENT 1
184 __u8 state; 184 __u8 state;
185 __u16 vid;
185 struct { 186 struct {
186 union { 187 union {
187 __be32 ip4; 188 __be32 ip4;
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index aa63ed023c2b..ea9221b0331a 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -42,6 +42,7 @@
42#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ 42#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */
43#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ 43#define ETH_P_PUP 0x0200 /* Xerox PUP packet */
44#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ 44#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */
45#define ETH_P_TSN 0x22F0 /* TSN (IEEE 1722) packet */
45#define ETH_P_IP 0x0800 /* Internet Protocol packet */ 46#define ETH_P_IP 0x0800 /* Internet Protocol packet */
46#define ETH_P_X25 0x0805 /* CCITT X.25 */ 47#define ETH_P_X25 0x0805 /* CCITT X.25 */
47#define ETH_P_ARP 0x0806 /* Address Resolution packet */ 48#define ETH_P_ARP 0x0806 /* Address Resolution packet */
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 2c7e8e3d3981..3a5f263cfc2f 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -148,6 +148,7 @@ enum {
148 IFLA_PHYS_SWITCH_ID, 148 IFLA_PHYS_SWITCH_ID,
149 IFLA_LINK_NETNSID, 149 IFLA_LINK_NETNSID,
150 IFLA_PHYS_PORT_NAME, 150 IFLA_PHYS_PORT_NAME,
151 IFLA_PROTO_DOWN,
151 __IFLA_MAX 152 __IFLA_MAX
152}; 153};
153 154
@@ -229,6 +230,8 @@ enum {
229 IFLA_BR_AGEING_TIME, 230 IFLA_BR_AGEING_TIME,
230 IFLA_BR_STP_STATE, 231 IFLA_BR_STP_STATE,
231 IFLA_BR_PRIORITY, 232 IFLA_BR_PRIORITY,
233 IFLA_BR_VLAN_FILTERING,
234 IFLA_BR_VLAN_PROTOCOL,
232 __IFLA_BR_MAX, 235 __IFLA_BR_MAX,
233}; 236};
234 237
@@ -339,6 +342,15 @@ enum macvlan_macaddr_mode {
339 342
340#define MACVLAN_FLAG_NOPROMISC 1 343#define MACVLAN_FLAG_NOPROMISC 1
341 344
345/* VRF section */
346enum {
347 IFLA_VRF_UNSPEC,
348 IFLA_VRF_TABLE,
349 __IFLA_VRF_MAX
350};
351
352#define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
353
342/* IPVLAN section */ 354/* IPVLAN section */
343enum { 355enum {
344 IFLA_IPVLAN_UNSPEC, 356 IFLA_IPVLAN_UNSPEC,
@@ -381,6 +393,7 @@ enum {
381 IFLA_VXLAN_REMCSUM_RX, 393 IFLA_VXLAN_REMCSUM_RX,
382 IFLA_VXLAN_GBP, 394 IFLA_VXLAN_GBP,
383 IFLA_VXLAN_REMCSUM_NOPARTIAL, 395 IFLA_VXLAN_REMCSUM_NOPARTIAL,
396 IFLA_VXLAN_COLLECT_METADATA,
384 __IFLA_VXLAN_MAX 397 __IFLA_VXLAN_MAX
385}; 398};
386#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) 399#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
@@ -397,6 +410,8 @@ enum {
397 IFLA_GENEVE_REMOTE, 410 IFLA_GENEVE_REMOTE,
398 IFLA_GENEVE_TTL, 411 IFLA_GENEVE_TTL,
399 IFLA_GENEVE_TOS, 412 IFLA_GENEVE_TOS,
413 IFLA_GENEVE_PORT, /* destination port */
414 IFLA_GENEVE_COLLECT_METADATA,
400 __IFLA_GENEVE_MAX 415 __IFLA_GENEVE_MAX
401}; 416};
402#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) 417#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
@@ -431,6 +446,7 @@ enum {
431 IFLA_BOND_AD_ACTOR_SYS_PRIO, 446 IFLA_BOND_AD_ACTOR_SYS_PRIO,
432 IFLA_BOND_AD_USER_PORT_KEY, 447 IFLA_BOND_AD_USER_PORT_KEY,
433 IFLA_BOND_AD_ACTOR_SYSTEM, 448 IFLA_BOND_AD_ACTOR_SYSTEM,
449 IFLA_BOND_TLB_DYNAMIC_LB,
434 __IFLA_BOND_MAX, 450 __IFLA_BOND_MAX,
435}; 451};
436 452
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h
index d3d715f8c88f..9e7edfd8141e 100644
--- a/include/uapi/linux/if_packet.h
+++ b/include/uapi/linux/if_packet.h
@@ -55,6 +55,7 @@ struct sockaddr_ll {
55#define PACKET_TX_HAS_OFF 19 55#define PACKET_TX_HAS_OFF 19
56#define PACKET_QDISC_BYPASS 20 56#define PACKET_QDISC_BYPASS 20
57#define PACKET_ROLLOVER_STATS 21 57#define PACKET_ROLLOVER_STATS 21
58#define PACKET_FANOUT_DATA 22
58 59
59#define PACKET_FANOUT_HASH 0 60#define PACKET_FANOUT_HASH 0
60#define PACKET_FANOUT_LB 1 61#define PACKET_FANOUT_LB 1
@@ -62,6 +63,8 @@ struct sockaddr_ll {
62#define PACKET_FANOUT_ROLLOVER 3 63#define PACKET_FANOUT_ROLLOVER 3
63#define PACKET_FANOUT_RND 4 64#define PACKET_FANOUT_RND 4
64#define PACKET_FANOUT_QM 5 65#define PACKET_FANOUT_QM 5
66#define PACKET_FANOUT_CBPF 6
67#define PACKET_FANOUT_EBPF 7
65#define PACKET_FANOUT_FLAG_ROLLOVER 0x1000 68#define PACKET_FANOUT_FLAG_ROLLOVER 0x1000
66#define PACKET_FANOUT_FLAG_DEFRAG 0x8000 69#define PACKET_FANOUT_FLAG_DEFRAG 0x8000
67 70
diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
index bd3cc11a431f..af4de90ba27d 100644
--- a/include/uapi/linux/if_tunnel.h
+++ b/include/uapi/linux/if_tunnel.h
@@ -112,6 +112,7 @@ enum {
112 IFLA_GRE_ENCAP_FLAGS, 112 IFLA_GRE_ENCAP_FLAGS,
113 IFLA_GRE_ENCAP_SPORT, 113 IFLA_GRE_ENCAP_SPORT,
114 IFLA_GRE_ENCAP_DPORT, 114 IFLA_GRE_ENCAP_DPORT,
115 IFLA_GRE_COLLECT_METADATA,
115 __IFLA_GRE_MAX, 116 __IFLA_GRE_MAX,
116}; 117};
117 118
diff --git a/include/uapi/linux/ila.h b/include/uapi/linux/ila.h
new file mode 100644
index 000000000000..7ed9e670814e
--- /dev/null
+++ b/include/uapi/linux/ila.h
@@ -0,0 +1,15 @@
1/* ila.h - ILA Interface */
2
3#ifndef _UAPI_LINUX_ILA_H
4#define _UAPI_LINUX_ILA_H
5
6enum {
7 ILA_ATTR_UNSPEC,
8 ILA_ATTR_LOCATOR, /* u64 */
9
10 __ILA_ATTR_MAX,
11};
12
13#define ILA_ATTR_MAX (__ILA_ATTR_MAX - 1)
14
15#endif /* _UAPI_LINUX_ILA_H */
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h
index 3199243f2028..391395c06c7e 100644
--- a/include/uapi/linux/ip_vs.h
+++ b/include/uapi/linux/ip_vs.h
@@ -406,6 +406,11 @@ enum {
406 IPVS_DAEMON_ATTR_STATE, /* sync daemon state (master/backup) */ 406 IPVS_DAEMON_ATTR_STATE, /* sync daemon state (master/backup) */
407 IPVS_DAEMON_ATTR_MCAST_IFN, /* multicast interface name */ 407 IPVS_DAEMON_ATTR_MCAST_IFN, /* multicast interface name */
408 IPVS_DAEMON_ATTR_SYNC_ID, /* SyncID we belong to */ 408 IPVS_DAEMON_ATTR_SYNC_ID, /* SyncID we belong to */
409 IPVS_DAEMON_ATTR_SYNC_MAXLEN, /* UDP Payload Size */
410 IPVS_DAEMON_ATTR_MCAST_GROUP, /* IPv4 Multicast Address */
411 IPVS_DAEMON_ATTR_MCAST_GROUP6, /* IPv6 Multicast Address */
412 IPVS_DAEMON_ATTR_MCAST_PORT, /* Multicast Port (base) */
413 IPVS_DAEMON_ATTR_MCAST_TTL, /* Multicast TTL */
409 __IPVS_DAEMON_ATTR_MAX, 414 __IPVS_DAEMON_ATTR_MAX,
410}; 415};
411 416
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h
index 5efa54ae567c..38b4fef20219 100644
--- a/include/uapi/linux/ipv6.h
+++ b/include/uapi/linux/ipv6.h
@@ -171,6 +171,9 @@ enum {
171 DEVCONF_USE_OPTIMISTIC, 171 DEVCONF_USE_OPTIMISTIC,
172 DEVCONF_ACCEPT_RA_MTU, 172 DEVCONF_ACCEPT_RA_MTU,
173 DEVCONF_STABLE_SECRET, 173 DEVCONF_STABLE_SECRET,
174 DEVCONF_USE_OIF_ADDRS_ONLY,
175 DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,
176 DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
174 DEVCONF_MAX 177 DEVCONF_MAX
175}; 178};
176 179
diff --git a/include/uapi/linux/kernel-page-flags.h b/include/uapi/linux/kernel-page-flags.h
index a6c4962e5d46..5da5f8751ce7 100644
--- a/include/uapi/linux/kernel-page-flags.h
+++ b/include/uapi/linux/kernel-page-flags.h
@@ -33,6 +33,7 @@
33#define KPF_THP 22 33#define KPF_THP 22
34#define KPF_BALLOON 23 34#define KPF_BALLOON 23
35#define KPF_ZERO_PAGE 24 35#define KPF_ZERO_PAGE 24
36#define KPF_IDLE 25
36 37
37 38
38#endif /* _UAPILINUX_KERNEL_PAGE_FLAGS_H */ 39#endif /* _UAPILINUX_KERNEL_PAGE_FLAGS_H */
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 716ad4ae4d4b..a9256f0331ae 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -237,6 +237,7 @@ struct kvm_run {
237 __u32 count; 237 __u32 count;
238 __u64 data_offset; /* relative to kvm_run start */ 238 __u64 data_offset; /* relative to kvm_run start */
239 } io; 239 } io;
240 /* KVM_EXIT_DEBUG */
240 struct { 241 struct {
241 struct kvm_debug_exit_arch arch; 242 struct kvm_debug_exit_arch arch;
242 } debug; 243 } debug;
@@ -285,6 +286,7 @@ struct kvm_run {
285 __u32 data; 286 __u32 data;
286 __u8 is_write; 287 __u8 is_write;
287 } dcr; 288 } dcr;
289 /* KVM_EXIT_INTERNAL_ERROR */
288 struct { 290 struct {
289 __u32 suberror; 291 __u32 suberror;
290 /* Available with KVM_CAP_INTERNAL_ERROR_DATA: */ 292 /* Available with KVM_CAP_INTERNAL_ERROR_DATA: */
@@ -295,6 +297,7 @@ struct kvm_run {
295 struct { 297 struct {
296 __u64 gprs[32]; 298 __u64 gprs[32];
297 } osi; 299 } osi;
300 /* KVM_EXIT_PAPR_HCALL */
298 struct { 301 struct {
299 __u64 nr; 302 __u64 nr;
300 __u64 ret; 303 __u64 ret;
@@ -317,6 +320,7 @@ struct kvm_run {
317 struct { 320 struct {
318#define KVM_SYSTEM_EVENT_SHUTDOWN 1 321#define KVM_SYSTEM_EVENT_SHUTDOWN 1
319#define KVM_SYSTEM_EVENT_RESET 2 322#define KVM_SYSTEM_EVENT_RESET 2
323#define KVM_SYSTEM_EVENT_CRASH 3
320 __u32 type; 324 __u32 type;
321 __u64 flags; 325 __u64 flags;
322 } system_event; 326 } system_event;
@@ -481,6 +485,7 @@ struct kvm_s390_psw {
481 ((ai) << 26)) 485 ((ai) << 26))
482#define KVM_S390_INT_IO_MIN 0x00000000u 486#define KVM_S390_INT_IO_MIN 0x00000000u
483#define KVM_S390_INT_IO_MAX 0xfffdffffu 487#define KVM_S390_INT_IO_MAX 0xfffdffffu
488#define KVM_S390_INT_IO_AI_MASK 0x04000000u
484 489
485 490
486struct kvm_s390_interrupt { 491struct kvm_s390_interrupt {
@@ -817,6 +822,8 @@ struct kvm_ppc_smmu_info {
817#define KVM_CAP_DISABLE_QUIRKS 116 822#define KVM_CAP_DISABLE_QUIRKS 116
818#define KVM_CAP_X86_SMM 117 823#define KVM_CAP_X86_SMM 117
819#define KVM_CAP_MULTI_ADDRESS_SPACE 118 824#define KVM_CAP_MULTI_ADDRESS_SPACE 118
825#define KVM_CAP_GUEST_DEBUG_HW_BPS 119
826#define KVM_CAP_GUEST_DEBUG_HW_WPS 120
820 827
821#ifdef KVM_CAP_IRQ_ROUTING 828#ifdef KVM_CAP_IRQ_ROUTING
822 829
diff --git a/include/uapi/linux/lwtunnel.h b/include/uapi/linux/lwtunnel.h
new file mode 100644
index 000000000000..34141a5dfe74
--- /dev/null
+++ b/include/uapi/linux/lwtunnel.h
@@ -0,0 +1,47 @@
1#ifndef _UAPI_LWTUNNEL_H_
2#define _UAPI_LWTUNNEL_H_
3
4#include <linux/types.h>
5
6enum lwtunnel_encap_types {
7 LWTUNNEL_ENCAP_NONE,
8 LWTUNNEL_ENCAP_MPLS,
9 LWTUNNEL_ENCAP_IP,
10 LWTUNNEL_ENCAP_ILA,
11 LWTUNNEL_ENCAP_IP6,
12 __LWTUNNEL_ENCAP_MAX,
13};
14
15#define LWTUNNEL_ENCAP_MAX (__LWTUNNEL_ENCAP_MAX - 1)
16
17enum lwtunnel_ip_t {
18 LWTUNNEL_IP_UNSPEC,
19 LWTUNNEL_IP_ID,
20 LWTUNNEL_IP_DST,
21 LWTUNNEL_IP_SRC,
22 LWTUNNEL_IP_TTL,
23 LWTUNNEL_IP_TOS,
24 LWTUNNEL_IP_SPORT,
25 LWTUNNEL_IP_DPORT,
26 LWTUNNEL_IP_FLAGS,
27 __LWTUNNEL_IP_MAX,
28};
29
30#define LWTUNNEL_IP_MAX (__LWTUNNEL_IP_MAX - 1)
31
32enum lwtunnel_ip6_t {
33 LWTUNNEL_IP6_UNSPEC,
34 LWTUNNEL_IP6_ID,
35 LWTUNNEL_IP6_DST,
36 LWTUNNEL_IP6_SRC,
37 LWTUNNEL_IP6_HOPLIMIT,
38 LWTUNNEL_IP6_TC,
39 LWTUNNEL_IP6_SPORT,
40 LWTUNNEL_IP6_DPORT,
41 LWTUNNEL_IP6_FLAGS,
42 __LWTUNNEL_IP6_MAX,
43};
44
45#define LWTUNNEL_IP6_MAX (__LWTUNNEL_IP6_MAX - 1)
46
47#endif /* _UAPI_LWTUNNEL_H_ */
diff --git a/include/uapi/linux/mei.h b/include/uapi/linux/mei.h
index bc0d8b69c49e..7c3b64f6a215 100644
--- a/include/uapi/linux/mei.h
+++ b/include/uapi/linux/mei.h
@@ -107,4 +107,23 @@ struct mei_connect_client_data {
107 }; 107 };
108}; 108};
109 109
110/**
111 * DOC: set and unset event notification for a connected client
112 *
113 * The IOCTL argument is 1 for enabling event notification and 0 for
114 * disabling the service
115 * Return: -EOPNOTSUPP if the devices doesn't support the feature
116 */
117#define IOCTL_MEI_NOTIFY_SET _IOW('H', 0x02, __u32)
118
119/**
120 * DOC: retrieve notification
121 *
122 * The IOCTL output argument is 1 if an event was is pending and 0 otherwise
123 * the ioctl has to be called in order to acknowledge pending event
124 *
125 * Return: -EOPNOTSUPP if the devices doesn't support the feature
126 */
127#define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32)
128
110#endif /* _LINUX_MEI_H */ 129#endif /* _LINUX_MEI_H */
diff --git a/include/uapi/linux/membarrier.h b/include/uapi/linux/membarrier.h
new file mode 100644
index 000000000000..e0b108bd2624
--- /dev/null
+++ b/include/uapi/linux/membarrier.h
@@ -0,0 +1,53 @@
1#ifndef _UAPI_LINUX_MEMBARRIER_H
2#define _UAPI_LINUX_MEMBARRIER_H
3
4/*
5 * linux/membarrier.h
6 *
7 * membarrier system call API
8 *
9 * Copyright (c) 2010, 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * SOFTWARE.
28 */
29
30/**
31 * enum membarrier_cmd - membarrier system call command
32 * @MEMBARRIER_CMD_QUERY: Query the set of supported commands. It returns
33 * a bitmask of valid commands.
34 * @MEMBARRIER_CMD_SHARED: Execute a memory barrier on all running threads.
35 * Upon return from system call, the caller thread
36 * is ensured that all running threads have passed
37 * through a state where all memory accesses to
38 * user-space addresses match program order between
39 * entry to and return from the system call
40 * (non-running threads are de facto in such a
41 * state). This covers threads from all processes
42 * running on the system. This command returns 0.
43 *
44 * Command to be passed to the membarrier system call. The commands need to
45 * be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to
46 * the value 0.
47 */
48enum membarrier_cmd {
49 MEMBARRIER_CMD_QUERY = 0,
50 MEMBARRIER_CMD_SHARED = (1 << 0),
51};
52
53#endif /* _UAPI_LINUX_MEMBARRIER_H */
diff --git a/include/uapi/linux/mpls.h b/include/uapi/linux/mpls.h
index 139d4dd1cab8..24a6cb1aec86 100644
--- a/include/uapi/linux/mpls.h
+++ b/include/uapi/linux/mpls.h
@@ -41,4 +41,6 @@ struct mpls_label {
41#define MPLS_LABEL_OAMALERT 14 /* RFC3429 */ 41#define MPLS_LABEL_OAMALERT 14 /* RFC3429 */
42#define MPLS_LABEL_EXTENSION 15 /* RFC7274 */ 42#define MPLS_LABEL_EXTENSION 15 /* RFC7274 */
43 43
44#define MPLS_LABEL_FIRST_UNRESERVED 16 /* RFC3032 */
45
44#endif /* _UAPI_MPLS_H */ 46#endif /* _UAPI_MPLS_H */
diff --git a/include/uapi/linux/mpls_iptunnel.h b/include/uapi/linux/mpls_iptunnel.h
new file mode 100644
index 000000000000..d80a0498f77e
--- /dev/null
+++ b/include/uapi/linux/mpls_iptunnel.h
@@ -0,0 +1,28 @@
1/*
2 * mpls tunnel api
3 *
4 * Authors:
5 * Roopa Prabhu <roopa@cumulusnetworks.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13#ifndef _UAPI_LINUX_MPLS_IPTUNNEL_H
14#define _UAPI_LINUX_MPLS_IPTUNNEL_H
15
16/* MPLS tunnel attributes
17 * [RTA_ENCAP] = {
18 * [MPLS_IPTUNNEL_DST]
19 * }
20 */
21enum {
22 MPLS_IPTUNNEL_UNSPEC,
23 MPLS_IPTUNNEL_DST,
24 __MPLS_IPTUNNEL_MAX,
25};
26#define MPLS_IPTUNNEL_MAX (__MPLS_IPTUNNEL_MAX - 1)
27
28#endif /* _UAPI_LINUX_MPLS_IPTUNNEL_H */
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index 2b94ea2287bb..5b4a4be06e2b 100644
--- a/include/uapi/linux/ndctl.h
+++ b/include/uapi/linux/ndctl.h
@@ -87,7 +87,7 @@ struct nd_cmd_ars_status {
87 __u32 handle; 87 __u32 handle;
88 __u32 flags; 88 __u32 flags;
89 __u64 err_address; 89 __u64 err_address;
90 __u64 mask; 90 __u64 length;
91 } __packed records[0]; 91 } __packed records[0];
92} __packed; 92} __packed;
93 93
@@ -111,6 +111,11 @@ enum {
111 ND_CMD_VENDOR = 9, 111 ND_CMD_VENDOR = 9,
112}; 112};
113 113
114enum {
115 ND_ARS_VOLATILE = 1,
116 ND_ARS_PERSISTENT = 2,
117};
118
114static inline const char *nvdimm_bus_cmd_name(unsigned cmd) 119static inline const char *nvdimm_bus_cmd_name(unsigned cmd)
115{ 120{
116 static const char * const names[] = { 121 static const char * const names[] = {
@@ -194,4 +199,9 @@ enum nd_driver_flags {
194enum { 199enum {
195 ND_MIN_NAMESPACE_SIZE = 0x00400000, 200 ND_MIN_NAMESPACE_SIZE = 0x00400000,
196}; 201};
202
203enum ars_masks {
204 ARS_STATUS_MASK = 0x0000FFFF,
205 ARS_EXT_STATUS_SHIFT = 16,
206};
197#endif /* __NDCTL_H__ */ 207#endif /* __NDCTL_H__ */
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h
index 2e35c61bbdd1..788655bfa0f3 100644
--- a/include/uapi/linux/neighbour.h
+++ b/include/uapi/linux/neighbour.h
@@ -106,6 +106,7 @@ struct ndt_stats {
106 __u64 ndts_rcv_probes_ucast; 106 __u64 ndts_rcv_probes_ucast;
107 __u64 ndts_periodic_gc_runs; 107 __u64 ndts_periodic_gc_runs;
108 __u64 ndts_forced_gc_runs; 108 __u64 ndts_forced_gc_runs;
109 __u64 ndts_table_fulls;
109}; 110};
110 111
111enum { 112enum {
diff --git a/include/uapi/linux/netfilter/nf_conntrack_sctp.h b/include/uapi/linux/netfilter/nf_conntrack_sctp.h
index ceeefe6681b5..ed4e776e1242 100644
--- a/include/uapi/linux/netfilter/nf_conntrack_sctp.h
+++ b/include/uapi/linux/netfilter/nf_conntrack_sctp.h
@@ -13,6 +13,8 @@ enum sctp_conntrack {
13 SCTP_CONNTRACK_SHUTDOWN_SENT, 13 SCTP_CONNTRACK_SHUTDOWN_SENT,
14 SCTP_CONNTRACK_SHUTDOWN_RECD, 14 SCTP_CONNTRACK_SHUTDOWN_RECD,
15 SCTP_CONNTRACK_SHUTDOWN_ACK_SENT, 15 SCTP_CONNTRACK_SHUTDOWN_ACK_SENT,
16 SCTP_CONNTRACK_HEARTBEAT_SENT,
17 SCTP_CONNTRACK_HEARTBEAT_ACKED,
16 SCTP_CONNTRACK_MAX 18 SCTP_CONNTRACK_MAX
17}; 19};
18 20
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index a99e6a997140..d8c8a7c9d88a 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -756,16 +756,25 @@ enum nft_ct_attributes {
756}; 756};
757#define NFTA_CT_MAX (__NFTA_CT_MAX - 1) 757#define NFTA_CT_MAX (__NFTA_CT_MAX - 1)
758 758
759enum nft_limit_type {
760 NFT_LIMIT_PKTS,
761 NFT_LIMIT_PKT_BYTES
762};
763
759/** 764/**
760 * enum nft_limit_attributes - nf_tables limit expression netlink attributes 765 * enum nft_limit_attributes - nf_tables limit expression netlink attributes
761 * 766 *
762 * @NFTA_LIMIT_RATE: refill rate (NLA_U64) 767 * @NFTA_LIMIT_RATE: refill rate (NLA_U64)
763 * @NFTA_LIMIT_UNIT: refill unit (NLA_U64) 768 * @NFTA_LIMIT_UNIT: refill unit (NLA_U64)
769 * @NFTA_LIMIT_BURST: burst (NLA_U32)
770 * @NFTA_LIMIT_TYPE: type of limit (NLA_U32: enum nft_limit_type)
764 */ 771 */
765enum nft_limit_attributes { 772enum nft_limit_attributes {
766 NFTA_LIMIT_UNSPEC, 773 NFTA_LIMIT_UNSPEC,
767 NFTA_LIMIT_RATE, 774 NFTA_LIMIT_RATE,
768 NFTA_LIMIT_UNIT, 775 NFTA_LIMIT_UNIT,
776 NFTA_LIMIT_BURST,
777 NFTA_LIMIT_TYPE,
769 __NFTA_LIMIT_MAX 778 __NFTA_LIMIT_MAX
770}; 779};
771#define NFTA_LIMIT_MAX (__NFTA_LIMIT_MAX - 1) 780#define NFTA_LIMIT_MAX (__NFTA_LIMIT_MAX - 1)
@@ -936,6 +945,20 @@ enum nft_redir_attributes {
936#define NFTA_REDIR_MAX (__NFTA_REDIR_MAX - 1) 945#define NFTA_REDIR_MAX (__NFTA_REDIR_MAX - 1)
937 946
938/** 947/**
948 * enum nft_dup_attributes - nf_tables dup expression netlink attributes
949 *
950 * @NFTA_DUP_SREG_ADDR: source register of address (NLA_U32: nft_registers)
951 * @NFTA_DUP_SREG_DEV: source register of output interface (NLA_U32: nft_register)
952 */
953enum nft_dup_attributes {
954 NFTA_DUP_UNSPEC,
955 NFTA_DUP_SREG_ADDR,
956 NFTA_DUP_SREG_DEV,
957 __NFTA_DUP_MAX
958};
959#define NFTA_DUP_MAX (__NFTA_DUP_MAX - 1)
960
961/**
939 * enum nft_gen_attributes - nf_tables ruleset generation attributes 962 * enum nft_gen_attributes - nf_tables ruleset generation attributes
940 * 963 *
941 * @NFTA_GEN_ID: Ruleset generation ID (NLA_U32) 964 * @NFTA_GEN_ID: Ruleset generation ID (NLA_U32)
diff --git a/include/uapi/linux/netfilter/nfnetlink_conntrack.h b/include/uapi/linux/netfilter/nfnetlink_conntrack.h
index acad6c52a652..c1a4e1441a25 100644
--- a/include/uapi/linux/netfilter/nfnetlink_conntrack.h
+++ b/include/uapi/linux/netfilter/nfnetlink_conntrack.h
@@ -61,6 +61,7 @@ enum ctattr_tuple {
61 CTA_TUPLE_UNSPEC, 61 CTA_TUPLE_UNSPEC,
62 CTA_TUPLE_IP, 62 CTA_TUPLE_IP,
63 CTA_TUPLE_PROTO, 63 CTA_TUPLE_PROTO,
64 CTA_TUPLE_ZONE,
64 __CTA_TUPLE_MAX 65 __CTA_TUPLE_MAX
65}; 66};
66#define CTA_TUPLE_MAX (__CTA_TUPLE_MAX - 1) 67#define CTA_TUPLE_MAX (__CTA_TUPLE_MAX - 1)
diff --git a/include/uapi/linux/netfilter/nfnetlink_cttimeout.h b/include/uapi/linux/netfilter/nfnetlink_cttimeout.h
index 1ab0b97b3a1e..f2c10dc140d6 100644
--- a/include/uapi/linux/netfilter/nfnetlink_cttimeout.h
+++ b/include/uapi/linux/netfilter/nfnetlink_cttimeout.h
@@ -92,6 +92,8 @@ enum ctattr_timeout_sctp {
92 CTA_TIMEOUT_SCTP_SHUTDOWN_SENT, 92 CTA_TIMEOUT_SCTP_SHUTDOWN_SENT,
93 CTA_TIMEOUT_SCTP_SHUTDOWN_RECD, 93 CTA_TIMEOUT_SCTP_SHUTDOWN_RECD,
94 CTA_TIMEOUT_SCTP_SHUTDOWN_ACK_SENT, 94 CTA_TIMEOUT_SCTP_SHUTDOWN_ACK_SENT,
95 CTA_TIMEOUT_SCTP_HEARTBEAT_SENT,
96 CTA_TIMEOUT_SCTP_HEARTBEAT_ACKED,
95 __CTA_TIMEOUT_SCTP_MAX 97 __CTA_TIMEOUT_SCTP_MAX
96}; 98};
97#define CTA_TIMEOUT_SCTP_MAX (__CTA_TIMEOUT_SCTP_MAX - 1) 99#define CTA_TIMEOUT_SCTP_MAX (__CTA_TIMEOUT_SCTP_MAX - 1)
diff --git a/include/uapi/linux/netfilter/xt_CT.h b/include/uapi/linux/netfilter/xt_CT.h
index 5a688c1ca4d7..9e520418b858 100644
--- a/include/uapi/linux/netfilter/xt_CT.h
+++ b/include/uapi/linux/netfilter/xt_CT.h
@@ -6,7 +6,13 @@
6enum { 6enum {
7 XT_CT_NOTRACK = 1 << 0, 7 XT_CT_NOTRACK = 1 << 0,
8 XT_CT_NOTRACK_ALIAS = 1 << 1, 8 XT_CT_NOTRACK_ALIAS = 1 << 1,
9 XT_CT_MASK = XT_CT_NOTRACK | XT_CT_NOTRACK_ALIAS, 9 XT_CT_ZONE_DIR_ORIG = 1 << 2,
10 XT_CT_ZONE_DIR_REPL = 1 << 3,
11 XT_CT_ZONE_MARK = 1 << 4,
12
13 XT_CT_MASK = XT_CT_NOTRACK | XT_CT_NOTRACK_ALIAS |
14 XT_CT_ZONE_DIR_ORIG | XT_CT_ZONE_DIR_REPL |
15 XT_CT_ZONE_MARK,
10}; 16};
11 17
12struct xt_ct_target_info { 18struct xt_ct_target_info {
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h b/include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h
index 205ed62e4605..cd2e940c8bf5 100644
--- a/include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h
+++ b/include/uapi/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -10,7 +10,9 @@ enum ip6t_reject_with {
10 IP6T_ICMP6_ADDR_UNREACH, 10 IP6T_ICMP6_ADDR_UNREACH,
11 IP6T_ICMP6_PORT_UNREACH, 11 IP6T_ICMP6_PORT_UNREACH,
12 IP6T_ICMP6_ECHOREPLY, 12 IP6T_ICMP6_ECHOREPLY,
13 IP6T_TCP_RESET 13 IP6T_TCP_RESET,
14 IP6T_ICMP6_POLICY_FAIL,
15 IP6T_ICMP6_REJECT_ROUTE
14}; 16};
15 17
16struct ip6t_reject_info { 18struct ip6t_reject_info {
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index cf6a65cccbdf..6f3fe16cd22a 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -110,6 +110,7 @@ struct nlmsgerr {
110#define NETLINK_TX_RING 7 110#define NETLINK_TX_RING 7
111#define NETLINK_LISTEN_ALL_NSID 8 111#define NETLINK_LISTEN_ALL_NSID 8
112#define NETLINK_LIST_MEMBERSHIPS 9 112#define NETLINK_LIST_MEMBERSHIPS 9
113#define NETLINK_CAP_ACK 10
113 114
114struct nl_pktinfo { 115struct nl_pktinfo {
115 __u32 group; 116 __u32 group;
diff --git a/include/uapi/linux/nfs4.h b/include/uapi/linux/nfs4.h
index 2119c7c274d7..2b871e0858d9 100644
--- a/include/uapi/linux/nfs4.h
+++ b/include/uapi/linux/nfs4.h
@@ -15,7 +15,7 @@
15 15
16#include <linux/types.h> 16#include <linux/types.h>
17 17
18#define NFS4_BITMAP_SIZE 2 18#define NFS4_BITMAP_SIZE 3
19#define NFS4_VERIFIER_SIZE 8 19#define NFS4_VERIFIER_SIZE 8
20#define NFS4_STATEID_SEQID_SIZE 4 20#define NFS4_STATEID_SEQID_SIZE 4
21#define NFS4_STATEID_OTHER_SIZE 12 21#define NFS4_STATEID_OTHER_SIZE 12
diff --git a/include/uapi/linux/nfsacl.h b/include/uapi/linux/nfsacl.h
index 9bb9771a107f..552726631162 100644
--- a/include/uapi/linux/nfsacl.h
+++ b/include/uapi/linux/nfsacl.h
@@ -22,6 +22,7 @@
22#define NFS_ACLCNT 0x0002 22#define NFS_ACLCNT 0x0002
23#define NFS_DFACL 0x0004 23#define NFS_DFACL 0x0004
24#define NFS_DFACLCNT 0x0008 24#define NFS_DFACLCNT 0x0008
25#define NFS_ACL_MASK 0x000f
25 26
26/* Flag for Default ACL entries */ 27/* Flag for Default ACL entries */
27#define NFS_ACL_DEFAULT 0x1000 28#define NFS_ACL_DEFAULT 0x1000
diff --git a/include/uapi/linux/nvme.h b/include/uapi/linux/nvme.h
index 732b32e92b02..8864194a4151 100644
--- a/include/uapi/linux/nvme.h
+++ b/include/uapi/linux/nvme.h
@@ -584,5 +584,6 @@ struct nvme_passthru_cmd {
584#define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io) 584#define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io)
585#define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct nvme_passthru_cmd) 585#define NVME_IOCTL_IO_CMD _IOWR('N', 0x43, struct nvme_passthru_cmd)
586#define NVME_IOCTL_RESET _IO('N', 0x44) 586#define NVME_IOCTL_RESET _IO('N', 0x44)
587#define NVME_IOCTL_SUBSYS_RESET _IO('N', 0x45)
587 588
588#endif /* _UAPI_LINUX_NVME_H */ 589#endif /* _UAPI_LINUX_NVME_H */
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index 1dab77601c21..32e07d8cbaf4 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -164,6 +164,9 @@ enum ovs_packet_cmd {
164 * %OVS_USERSPACE_ATTR_EGRESS_TUN_PORT attribute, which is sent only if the 164 * %OVS_USERSPACE_ATTR_EGRESS_TUN_PORT attribute, which is sent only if the
165 * output port is actually a tunnel port. Contains the output tunnel key 165 * output port is actually a tunnel port. Contains the output tunnel key
166 * extracted from the packet as nested %OVS_TUNNEL_KEY_ATTR_* attributes. 166 * extracted from the packet as nested %OVS_TUNNEL_KEY_ATTR_* attributes.
167 * @OVS_PACKET_ATTR_MRU: Present for an %OVS_PACKET_CMD_ACTION and
168 * %OVS_PACKET_ATTR_USERSPACE action specify the Maximum received fragment
169 * size.
167 * 170 *
168 * These attributes follow the &struct ovs_header within the Generic Netlink 171 * These attributes follow the &struct ovs_header within the Generic Netlink
169 * payload for %OVS_PACKET_* commands. 172 * payload for %OVS_PACKET_* commands.
@@ -180,6 +183,7 @@ enum ovs_packet_attr {
180 OVS_PACKET_ATTR_UNUSED2, 183 OVS_PACKET_ATTR_UNUSED2,
181 OVS_PACKET_ATTR_PROBE, /* Packet operation is a feature probe, 184 OVS_PACKET_ATTR_PROBE, /* Packet operation is a feature probe,
182 error logging should be suppressed. */ 185 error logging should be suppressed. */
186 OVS_PACKET_ATTR_MRU, /* Maximum received IP fragment size. */
183 __OVS_PACKET_ATTR_MAX 187 __OVS_PACKET_ATTR_MAX
184}; 188};
185 189
@@ -319,9 +323,13 @@ enum ovs_key_attr {
319 OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls. 323 OVS_KEY_ATTR_MPLS, /* array of struct ovs_key_mpls.
320 * The implementation may restrict 324 * The implementation may restrict
321 * the accepted length of the array. */ 325 * the accepted length of the array. */
326 OVS_KEY_ATTR_CT_STATE, /* u8 bitmask of OVS_CS_F_* */
327 OVS_KEY_ATTR_CT_ZONE, /* u16 connection tracking zone. */
328 OVS_KEY_ATTR_CT_MARK, /* u32 connection tracking mark */
329 OVS_KEY_ATTR_CT_LABEL, /* 16-octet connection tracking label */
322 330
323#ifdef __KERNEL__ 331#ifdef __KERNEL__
324 OVS_KEY_ATTR_TUNNEL_INFO, /* struct ovs_tunnel_info */ 332 OVS_KEY_ATTR_TUNNEL_INFO, /* struct ip_tunnel_info */
325#endif 333#endif
326 __OVS_KEY_ATTR_MAX 334 __OVS_KEY_ATTR_MAX
327}; 335};
@@ -431,6 +439,20 @@ struct ovs_key_nd {
431 __u8 nd_tll[ETH_ALEN]; 439 __u8 nd_tll[ETH_ALEN];
432}; 440};
433 441
442#define OVS_CT_LABEL_LEN 16
443struct ovs_key_ct_label {
444 __u8 ct_label[OVS_CT_LABEL_LEN];
445};
446
447/* OVS_KEY_ATTR_CT_STATE flags */
448#define OVS_CS_F_NEW 0x01 /* Beginning of a new connection. */
449#define OVS_CS_F_ESTABLISHED 0x02 /* Part of an existing connection. */
450#define OVS_CS_F_RELATED 0x04 /* Related to an established
451 * connection. */
452#define OVS_CS_F_INVALID 0x20 /* Could not track connection. */
453#define OVS_CS_F_REPLY_DIR 0x40 /* Flow is in the reply direction. */
454#define OVS_CS_F_TRACKED 0x80 /* Conntrack has occurred. */
455
434/** 456/**
435 * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands. 457 * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands.
436 * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow 458 * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow
@@ -595,6 +617,39 @@ struct ovs_action_hash {
595}; 617};
596 618
597/** 619/**
620 * enum ovs_ct_attr - Attributes for %OVS_ACTION_ATTR_CT action.
621 * @OVS_CT_ATTR_FLAGS: u32 connection tracking flags.
622 * @OVS_CT_ATTR_ZONE: u16 connection tracking zone.
623 * @OVS_CT_ATTR_MARK: u32 value followed by u32 mask. For each bit set in the
624 * mask, the corresponding bit in the value is copied to the connection
625 * tracking mark field in the connection.
626 * @OVS_CT_ATTR_LABEL: %OVS_CT_LABEL_LEN value followed by %OVS_CT_LABEL_LEN
627 * mask. For each bit set in the mask, the corresponding bit in the value is
628 * copied to the connection tracking label field in the connection.
629 * @OVS_CT_ATTR_HELPER: variable length string defining conntrack ALG.
630 */
631enum ovs_ct_attr {
632 OVS_CT_ATTR_UNSPEC,
633 OVS_CT_ATTR_FLAGS, /* u8 bitmask of OVS_CT_F_*. */
634 OVS_CT_ATTR_ZONE, /* u16 zone id. */
635 OVS_CT_ATTR_MARK, /* mark to associate with this connection. */
636 OVS_CT_ATTR_LABEL, /* label to associate with this connection. */
637 OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of
638 related connections. */
639 __OVS_CT_ATTR_MAX
640};
641
642#define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1)
643
644/*
645 * OVS_CT_ATTR_FLAGS flags - bitmask of %OVS_CT_F_*
646 * @OVS_CT_F_COMMIT: Commits the flow to the conntrack table. This allows
647 * future packets for the same connection to be identified as 'established'
648 * or 'related'.
649 */
650#define OVS_CT_F_COMMIT 0x01
651
652/**
598 * enum ovs_action_attr - Action types. 653 * enum ovs_action_attr - Action types.
599 * 654 *
600 * @OVS_ACTION_ATTR_OUTPUT: Output packet to port. 655 * @OVS_ACTION_ATTR_OUTPUT: Output packet to port.
@@ -623,6 +678,8 @@ struct ovs_action_hash {
623 * indicate the new packet contents. This could potentially still be 678 * indicate the new packet contents. This could potentially still be
624 * %ETH_P_MPLS if the resulting MPLS label stack is not empty. If there 679 * %ETH_P_MPLS if the resulting MPLS label stack is not empty. If there
625 * is no MPLS label stack, as determined by ethertype, no action is taken. 680 * is no MPLS label stack, as determined by ethertype, no action is taken.
681 * @OVS_ACTION_ATTR_CT: Track the connection. Populate the conntrack-related
682 * entries in the flow key.
626 * 683 *
627 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all 684 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
628 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment 685 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
@@ -648,6 +705,7 @@ enum ovs_action_attr {
648 * data immediately followed by a mask. 705 * data immediately followed by a mask.
649 * The data must be zero for the unmasked 706 * The data must be zero for the unmasked
650 * bits. */ 707 * bits. */
708 OVS_ACTION_ATTR_CT, /* One nested OVS_CT_ATTR_* . */
651 709
652 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted 710 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
653 * from userspace. */ 711 * from userspace. */
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index d97f84c080da..2881145cda86 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -330,7 +330,8 @@ struct perf_event_attr {
330 mmap2 : 1, /* include mmap with inode data */ 330 mmap2 : 1, /* include mmap with inode data */
331 comm_exec : 1, /* flag comm events that are due to an exec */ 331 comm_exec : 1, /* flag comm events that are due to an exec */
332 use_clockid : 1, /* use @clockid for time fields */ 332 use_clockid : 1, /* use @clockid for time fields */
333 __reserved_1 : 38; 333 context_switch : 1, /* context switch data */
334 __reserved_1 : 37;
334 335
335 union { 336 union {
336 __u32 wakeup_events; /* wakeup every n events */ 337 __u32 wakeup_events; /* wakeup every n events */
@@ -572,9 +573,11 @@ struct perf_event_mmap_page {
572/* 573/*
573 * PERF_RECORD_MISC_MMAP_DATA and PERF_RECORD_MISC_COMM_EXEC are used on 574 * PERF_RECORD_MISC_MMAP_DATA and PERF_RECORD_MISC_COMM_EXEC are used on
574 * different events so can reuse the same bit position. 575 * different events so can reuse the same bit position.
576 * Ditto PERF_RECORD_MISC_SWITCH_OUT.
575 */ 577 */
576#define PERF_RECORD_MISC_MMAP_DATA (1 << 13) 578#define PERF_RECORD_MISC_MMAP_DATA (1 << 13)
577#define PERF_RECORD_MISC_COMM_EXEC (1 << 13) 579#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)
580#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13)
578/* 581/*
579 * Indicates that the content of PERF_SAMPLE_IP points to 582 * Indicates that the content of PERF_SAMPLE_IP points to
580 * the actual instruction that triggered the event. See also 583 * the actual instruction that triggered the event. See also
@@ -818,6 +821,32 @@ enum perf_event_type {
818 */ 821 */
819 PERF_RECORD_LOST_SAMPLES = 13, 822 PERF_RECORD_LOST_SAMPLES = 13,
820 823
824 /*
825 * Records a context switch in or out (flagged by
826 * PERF_RECORD_MISC_SWITCH_OUT). See also
827 * PERF_RECORD_SWITCH_CPU_WIDE.
828 *
829 * struct {
830 * struct perf_event_header header;
831 * struct sample_id sample_id;
832 * };
833 */
834 PERF_RECORD_SWITCH = 14,
835
836 /*
837 * CPU-wide version of PERF_RECORD_SWITCH with next_prev_pid and
838 * next_prev_tid that are the next (switching out) or previous
839 * (switching in) pid/tid.
840 *
841 * struct {
842 * struct perf_event_header header;
843 * u32 next_prev_pid;
844 * u32 next_prev_tid;
845 * struct sample_id sample_id;
846 * };
847 */
848 PERF_RECORD_SWITCH_CPU_WIDE = 15,
849
821 PERF_RECORD_MAX, /* non-ABI */ 850 PERF_RECORD_MAX, /* non-ABI */
822}; 851};
823 852
@@ -922,6 +951,7 @@ union perf_mem_data_src {
922 * 951 *
923 * in_tx: running in a hardware transaction 952 * in_tx: running in a hardware transaction
924 * abort: aborting a hardware transaction 953 * abort: aborting a hardware transaction
954 * cycles: cycles from last branch (or 0 if not supported)
925 */ 955 */
926struct perf_branch_entry { 956struct perf_branch_entry {
927 __u64 from; 957 __u64 from;
@@ -930,7 +960,8 @@ struct perf_branch_entry {
930 predicted:1,/* target predicted */ 960 predicted:1,/* target predicted */
931 in_tx:1, /* in transaction */ 961 in_tx:1, /* in transaction */
932 abort:1, /* transaction abort */ 962 abort:1, /* transaction abort */
933 reserved:60; 963 cycles:16, /* cycle count to last branch */
964 reserved:44;
934}; 965};
935 966
936#endif /* _UAPI_LINUX_PERF_EVENT_H */ 967#endif /* _UAPI_LINUX_PERF_EVENT_H */
diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h
index 31891d9535e2..a8d0759a9e40 100644
--- a/include/uapi/linux/prctl.h
+++ b/include/uapi/linux/prctl.h
@@ -190,4 +190,11 @@ struct prctl_mm_map {
190# define PR_FP_MODE_FR (1 << 0) /* 64b FP registers */ 190# define PR_FP_MODE_FR (1 << 0) /* 64b FP registers */
191# define PR_FP_MODE_FRE (1 << 1) /* 32b compatibility */ 191# define PR_FP_MODE_FRE (1 << 1) /* 32b compatibility */
192 192
193/* Control the ambient capability set */
194#define PR_CAP_AMBIENT 47
195# define PR_CAP_AMBIENT_IS_SET 1
196# define PR_CAP_AMBIENT_RAISE 2
197# define PR_CAP_AMBIENT_LOWER 3
198# define PR_CAP_AMBIENT_CLEAR_ALL 4
199
193#endif /* _LINUX_PRCTL_H */ 200#endif /* _LINUX_PRCTL_H */
diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h
index cf1019e15f5b..a7a697986614 100644
--- a/include/uapi/linux/ptrace.h
+++ b/include/uapi/linux/ptrace.h
@@ -89,9 +89,11 @@ struct ptrace_peeksiginfo_args {
89#define PTRACE_O_TRACESECCOMP (1 << PTRACE_EVENT_SECCOMP) 89#define PTRACE_O_TRACESECCOMP (1 << PTRACE_EVENT_SECCOMP)
90 90
91/* eventless options */ 91/* eventless options */
92#define PTRACE_O_EXITKILL (1 << 20) 92#define PTRACE_O_EXITKILL (1 << 20)
93#define PTRACE_O_SUSPEND_SECCOMP (1 << 21)
93 94
94#define PTRACE_O_MASK (0x000000ff | PTRACE_O_EXITKILL) 95#define PTRACE_O_MASK (\
96 0x000000ff | PTRACE_O_EXITKILL | PTRACE_O_SUSPEND_SECCOMP)
95 97
96#include <asm/ptrace.h> 98#include <asm/ptrace.h>
97 99
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index fdd8f07f1d34..702024769c74 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -308,6 +308,8 @@ enum rtattr_type_t {
308 RTA_VIA, 308 RTA_VIA,
309 RTA_NEWDST, 309 RTA_NEWDST,
310 RTA_PREF, 310 RTA_PREF,
311 RTA_ENCAP_TYPE,
312 RTA_ENCAP,
311 __RTA_MAX 313 __RTA_MAX
312}; 314};
313 315
@@ -416,10 +418,13 @@ enum {
416 418
417#define RTAX_MAX (__RTAX_MAX - 1) 419#define RTAX_MAX (__RTAX_MAX - 1)
418 420
419#define RTAX_FEATURE_ECN 0x00000001 421#define RTAX_FEATURE_ECN (1 << 0)
420#define RTAX_FEATURE_SACK 0x00000002 422#define RTAX_FEATURE_SACK (1 << 1)
421#define RTAX_FEATURE_TIMESTAMP 0x00000004 423#define RTAX_FEATURE_TIMESTAMP (1 << 2)
422#define RTAX_FEATURE_ALLFRAG 0x00000008 424#define RTAX_FEATURE_ALLFRAG (1 << 3)
425
426#define RTAX_FEATURE_MASK (RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | \
427 RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG)
423 428
424struct rta_session { 429struct rta_session {
425 __u8 proto; 430 __u8 proto;
diff --git a/include/uapi/linux/securebits.h b/include/uapi/linux/securebits.h
index 985aac9e6bf8..35ac35cef217 100644
--- a/include/uapi/linux/securebits.h
+++ b/include/uapi/linux/securebits.h
@@ -43,9 +43,18 @@
43#define SECBIT_KEEP_CAPS (issecure_mask(SECURE_KEEP_CAPS)) 43#define SECBIT_KEEP_CAPS (issecure_mask(SECURE_KEEP_CAPS))
44#define SECBIT_KEEP_CAPS_LOCKED (issecure_mask(SECURE_KEEP_CAPS_LOCKED)) 44#define SECBIT_KEEP_CAPS_LOCKED (issecure_mask(SECURE_KEEP_CAPS_LOCKED))
45 45
46/* When set, a process cannot add new capabilities to its ambient set. */
47#define SECURE_NO_CAP_AMBIENT_RAISE 6
48#define SECURE_NO_CAP_AMBIENT_RAISE_LOCKED 7 /* make bit-6 immutable */
49
50#define SECBIT_NO_CAP_AMBIENT_RAISE (issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE))
51#define SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED \
52 (issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE_LOCKED))
53
46#define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \ 54#define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \
47 issecure_mask(SECURE_NO_SETUID_FIXUP) | \ 55 issecure_mask(SECURE_NO_SETUID_FIXUP) | \
48 issecure_mask(SECURE_KEEP_CAPS)) 56 issecure_mask(SECURE_KEEP_CAPS) | \
57 issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE))
49#define SECURE_ALL_LOCKS (SECURE_ALL_BITS << 1) 58#define SECURE_ALL_LOCKS (SECURE_ALL_BITS << 1)
50 59
51#endif /* _UAPI_LINUX_SECUREBITS_H */ 60#endif /* _UAPI_LINUX_SECUREBITS_H */
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h
index eee8968407f0..25a9ad8bcef1 100644
--- a/include/uapi/linux/snmp.h
+++ b/include/uapi/linux/snmp.h
@@ -278,6 +278,8 @@ enum
278 LINUX_MIB_TCPACKSKIPPEDCHALLENGE, /* TCPACKSkippedChallenge */ 278 LINUX_MIB_TCPACKSKIPPEDCHALLENGE, /* TCPACKSkippedChallenge */
279 LINUX_MIB_TCPWINPROBE, /* TCPWinProbe */ 279 LINUX_MIB_TCPWINPROBE, /* TCPWinProbe */
280 LINUX_MIB_TCPKEEPALIVE, /* TCPKeepAlive */ 280 LINUX_MIB_TCPKEEPALIVE, /* TCPKeepAlive */
281 LINUX_MIB_TCPMTUPFAIL, /* TCPMTUPFail */
282 LINUX_MIB_TCPMTUPSUCCESS, /* TCPMTUPSuccess */
281 __LINUX_MIB_MAX 283 __LINUX_MIB_MAX
282}; 284};
283 285
diff --git a/include/uapi/linux/target_core_user.h b/include/uapi/linux/target_core_user.h
index b67f99d3c520..95c6521d8a95 100644
--- a/include/uapi/linux/target_core_user.h
+++ b/include/uapi/linux/target_core_user.h
@@ -42,10 +42,6 @@
42#define TCMU_MAILBOX_VERSION 2 42#define TCMU_MAILBOX_VERSION 2
43#define ALIGN_SIZE 64 /* Should be enough for most CPUs */ 43#define ALIGN_SIZE 64 /* Should be enough for most CPUs */
44 44
45/* See https://gcc.gnu.org/onlinedocs/cpp/Stringification.html */
46#define xstr(s) str(s)
47#define str(s) #s
48
49struct tcmu_mailbox { 45struct tcmu_mailbox {
50 __u16 version; 46 __u16 version;
51 __u16 flags; 47 __u16 flags;
diff --git a/include/uapi/linux/toshiba.h b/include/uapi/linux/toshiba.h
index e9bef5b2f91e..c58bf4b5bb26 100644
--- a/include/uapi/linux/toshiba.h
+++ b/include/uapi/linux/toshiba.h
@@ -1,6 +1,7 @@
1/* toshiba.h -- Linux driver for accessing the SMM on Toshiba laptops 1/* toshiba.h -- Linux driver for accessing the SMM on Toshiba laptops
2 * 2 *
3 * Copyright (c) 1996-2000 Jonathan A. Buzzard (jonathan@buzzard.org.uk) 3 * Copyright (c) 1996-2000 Jonathan A. Buzzard (jonathan@buzzard.org.uk)
4 * Copyright (c) 2015 Azael Avalos <coproscefalo@gmail.com>
4 * 5 *
5 * Thanks to Juergen Heinzl <juergen@monocerus.demon.co.uk> for the pointers 6 * Thanks to Juergen Heinzl <juergen@monocerus.demon.co.uk> for the pointers
6 * on making sure the structure is aligned and packed. 7 * on making sure the structure is aligned and packed.
@@ -20,9 +21,18 @@
20#ifndef _UAPI_LINUX_TOSHIBA_H 21#ifndef _UAPI_LINUX_TOSHIBA_H
21#define _UAPI_LINUX_TOSHIBA_H 22#define _UAPI_LINUX_TOSHIBA_H
22 23
23#define TOSH_PROC "/proc/toshiba" 24/*
24#define TOSH_DEVICE "/dev/toshiba" 25 * Toshiba modules paths
25#define TOSH_SMM _IOWR('t', 0x90, int) /* broken: meant 24 bytes */ 26 */
27
28#define TOSH_PROC "/proc/toshiba"
29#define TOSH_DEVICE "/dev/toshiba"
30#define TOSHIBA_ACPI_PROC "/proc/acpi/toshiba"
31#define TOSHIBA_ACPI_DEVICE "/dev/toshiba_acpi"
32
33/*
34 * Toshiba SMM structure
35 */
26 36
27typedef struct { 37typedef struct {
28 unsigned int eax; 38 unsigned int eax;
@@ -33,5 +43,21 @@ typedef struct {
33 unsigned int edi __attribute__ ((packed)); 43 unsigned int edi __attribute__ ((packed));
34} SMMRegisters; 44} SMMRegisters;
35 45
46/*
47 * IOCTLs (0x90 - 0x91)
48 */
49
50#define TOSH_SMM _IOWR('t', 0x90, SMMRegisters)
51/*
52 * Convenience toshiba_acpi command.
53 *
54 * The System Configuration Interface (SCI) is opened/closed internally
55 * to avoid userspace of buggy BIOSes.
56 *
57 * The toshiba_acpi module checks whether the eax register is set with
58 * SCI_GET (0xf300) or SCI_SET (0xf400), returning -EINVAL if not.
59 */
60#define TOSHIBA_ACPI_SCI _IOWR('t', 0x91, SMMRegisters)
61
36 62
37#endif /* _UAPI_LINUX_TOSHIBA_H */ 63#endif /* _UAPI_LINUX_TOSHIBA_H */
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index aa33fd1b2d4f..f7adc6e01f9e 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -674,9 +674,21 @@ struct usb_otg_descriptor {
674 __u8 bmAttributes; /* support for HNP, SRP, etc */ 674 __u8 bmAttributes; /* support for HNP, SRP, etc */
675} __attribute__ ((packed)); 675} __attribute__ ((packed));
676 676
677/* USB_DT_OTG (from OTG 2.0 supplement) */
678struct usb_otg20_descriptor {
679 __u8 bLength;
680 __u8 bDescriptorType;
681
682 __u8 bmAttributes; /* support for HNP, SRP and ADP, etc */
683 __le16 bcdOTG; /* OTG and EH supplement release number
684 * in binary-coded decimal(i.e. 2.0 is 0200H)
685 */
686} __attribute__ ((packed));
687
677/* from usb_otg_descriptor.bmAttributes */ 688/* from usb_otg_descriptor.bmAttributes */
678#define USB_OTG_SRP (1 << 0) 689#define USB_OTG_SRP (1 << 0)
679#define USB_OTG_HNP (1 << 1) /* swap host/device roles */ 690#define USB_OTG_HNP (1 << 1) /* swap host/device roles */
691#define USB_OTG_ADP (1 << 2) /* support ADP */
680 692
681/*-------------------------------------------------------------------------*/ 693/*-------------------------------------------------------------------------*/
682 694
diff --git a/include/uapi/linux/userfaultfd.h b/include/uapi/linux/userfaultfd.h
new file mode 100644
index 000000000000..df0e09bb7dd5
--- /dev/null
+++ b/include/uapi/linux/userfaultfd.h
@@ -0,0 +1,169 @@
1/*
2 * include/linux/userfaultfd.h
3 *
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
5 * Copyright (C) 2015 Red Hat, Inc.
6 *
7 */
8
9#ifndef _LINUX_USERFAULTFD_H
10#define _LINUX_USERFAULTFD_H
11
12#include <linux/types.h>
13
14#include <linux/compiler.h>
15
16#define UFFD_API ((__u64)0xAA)
17/*
18 * After implementing the respective features it will become:
19 * #define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | \
20 * UFFD_FEATURE_EVENT_FORK)
21 */
22#define UFFD_API_FEATURES (0)
23#define UFFD_API_IOCTLS \
24 ((__u64)1 << _UFFDIO_REGISTER | \
25 (__u64)1 << _UFFDIO_UNREGISTER | \
26 (__u64)1 << _UFFDIO_API)
27#define UFFD_API_RANGE_IOCTLS \
28 ((__u64)1 << _UFFDIO_WAKE | \
29 (__u64)1 << _UFFDIO_COPY | \
30 (__u64)1 << _UFFDIO_ZEROPAGE)
31
32/*
33 * Valid ioctl command number range with this API is from 0x00 to
34 * 0x3F. UFFDIO_API is the fixed number, everything else can be
35 * changed by implementing a different UFFD_API. If sticking to the
36 * same UFFD_API more ioctl can be added and userland will be aware of
37 * which ioctl the running kernel implements through the ioctl command
38 * bitmask written by the UFFDIO_API.
39 */
40#define _UFFDIO_REGISTER (0x00)
41#define _UFFDIO_UNREGISTER (0x01)
42#define _UFFDIO_WAKE (0x02)
43#define _UFFDIO_COPY (0x03)
44#define _UFFDIO_ZEROPAGE (0x04)
45#define _UFFDIO_API (0x3F)
46
47/* userfaultfd ioctl ids */
48#define UFFDIO 0xAA
49#define UFFDIO_API _IOWR(UFFDIO, _UFFDIO_API, \
50 struct uffdio_api)
51#define UFFDIO_REGISTER _IOWR(UFFDIO, _UFFDIO_REGISTER, \
52 struct uffdio_register)
53#define UFFDIO_UNREGISTER _IOR(UFFDIO, _UFFDIO_UNREGISTER, \
54 struct uffdio_range)
55#define UFFDIO_WAKE _IOR(UFFDIO, _UFFDIO_WAKE, \
56 struct uffdio_range)
57#define UFFDIO_COPY _IOWR(UFFDIO, _UFFDIO_COPY, \
58 struct uffdio_copy)
59#define UFFDIO_ZEROPAGE _IOWR(UFFDIO, _UFFDIO_ZEROPAGE, \
60 struct uffdio_zeropage)
61
62/* read() structure */
63struct uffd_msg {
64 __u8 event;
65
66 __u8 reserved1;
67 __u16 reserved2;
68 __u32 reserved3;
69
70 union {
71 struct {
72 __u64 flags;
73 __u64 address;
74 } pagefault;
75
76 struct {
77 /* unused reserved fields */
78 __u64 reserved1;
79 __u64 reserved2;
80 __u64 reserved3;
81 } reserved;
82 } arg;
83} __packed;
84
85/*
86 * Start at 0x12 and not at 0 to be more strict against bugs.
87 */
88#define UFFD_EVENT_PAGEFAULT 0x12
89#if 0 /* not available yet */
90#define UFFD_EVENT_FORK 0x13
91#endif
92
93/* flags for UFFD_EVENT_PAGEFAULT */
94#define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */
95#define UFFD_PAGEFAULT_FLAG_WP (1<<1) /* If reason is VM_UFFD_WP */
96
97struct uffdio_api {
98 /* userland asks for an API number and the features to enable */
99 __u64 api;
100 /*
101 * Kernel answers below with the all available features for
102 * the API, this notifies userland of which events and/or
103 * which flags for each event are enabled in the current
104 * kernel.
105 *
106 * Note: UFFD_EVENT_PAGEFAULT and UFFD_PAGEFAULT_FLAG_WRITE
107 * are to be considered implicitly always enabled in all kernels as
108 * long as the uffdio_api.api requested matches UFFD_API.
109 */
110#if 0 /* not available yet */
111#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0)
112#define UFFD_FEATURE_EVENT_FORK (1<<1)
113#endif
114 __u64 features;
115
116 __u64 ioctls;
117};
118
119struct uffdio_range {
120 __u64 start;
121 __u64 len;
122};
123
124struct uffdio_register {
125 struct uffdio_range range;
126#define UFFDIO_REGISTER_MODE_MISSING ((__u64)1<<0)
127#define UFFDIO_REGISTER_MODE_WP ((__u64)1<<1)
128 __u64 mode;
129
130 /*
131 * kernel answers which ioctl commands are available for the
132 * range, keep at the end as the last 8 bytes aren't read.
133 */
134 __u64 ioctls;
135};
136
137struct uffdio_copy {
138 __u64 dst;
139 __u64 src;
140 __u64 len;
141 /*
142 * There will be a wrprotection flag later that allows to map
143 * pages wrprotected on the fly. And such a flag will be
144 * available if the wrprotection ioctl are implemented for the
145 * range according to the uffdio_register.ioctls.
146 */
147#define UFFDIO_COPY_MODE_DONTWAKE ((__u64)1<<0)
148 __u64 mode;
149
150 /*
151 * "copy" is written by the ioctl and must be at the end: the
152 * copy_from_user will not read the last 8 bytes.
153 */
154 __s64 copy;
155};
156
157struct uffdio_zeropage {
158 struct uffdio_range range;
159#define UFFDIO_ZEROPAGE_MODE_DONTWAKE ((__u64)1<<0)
160 __u64 mode;
161
162 /*
163 * "zeropage" is written by the ioctl and must be at the end:
164 * the copy_from_user will not read the last 8 bytes.
165 */
166 __s64 zeropage;
167};
168
169#endif /* _LINUX_USERFAULTFD_H */
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 9f6e108ff4a0..d448c536b49d 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -174,6 +174,10 @@ enum v4l2_colorfx {
174 * We reserve 16 controls for this driver. */ 174 * We reserve 16 controls for this driver. */
175#define V4L2_CID_USER_ADV7180_BASE (V4L2_CID_USER_BASE + 0x1070) 175#define V4L2_CID_USER_ADV7180_BASE (V4L2_CID_USER_BASE + 0x1070)
176 176
177/* The base for the tc358743 driver controls.
178 * We reserve 16 controls for this driver. */
179#define V4L2_CID_USER_TC358743_BASE (V4L2_CID_USER_BASE + 0x1080)
180
177/* MPEG-class control IDs */ 181/* MPEG-class control IDs */
178/* The MPEG controls are applicable to all codec controls 182/* The MPEG controls are applicable to all codec controls
179 * and the 'MPEG' part of the define is historical */ 183 * and the 'MPEG' part of the define is historical */
diff --git a/include/uapi/linux/vsp1.h b/include/uapi/linux/vsp1.h
index e18858f6e865..9a823696d816 100644
--- a/include/uapi/linux/vsp1.h
+++ b/include/uapi/linux/vsp1.h
@@ -28,7 +28,7 @@
28 _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct vsp1_lut_config) 28 _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct vsp1_lut_config)
29 29
30struct vsp1_lut_config { 30struct vsp1_lut_config {
31 u32 lut[256]; 31 __u32 lut[256];
32}; 32};
33 33
34#endif /* __VSP1_USER_H__ */ 34#endif /* __VSP1_USER_H__ */
diff --git a/include/uapi/misc/cxl.h b/include/uapi/misc/cxl.h
index 99a8ca15fe64..1e889aa8a36e 100644
--- a/include/uapi/misc/cxl.h
+++ b/include/uapi/misc/cxl.h
@@ -29,8 +29,10 @@ struct cxl_ioctl_start_work {
29 29
30#define CXL_START_WORK_AMR 0x0000000000000001ULL 30#define CXL_START_WORK_AMR 0x0000000000000001ULL
31#define CXL_START_WORK_NUM_IRQS 0x0000000000000002ULL 31#define CXL_START_WORK_NUM_IRQS 0x0000000000000002ULL
32#define CXL_START_WORK_ERR_FF 0x0000000000000004ULL
32#define CXL_START_WORK_ALL (CXL_START_WORK_AMR |\ 33#define CXL_START_WORK_ALL (CXL_START_WORK_AMR |\
33 CXL_START_WORK_NUM_IRQS) 34 CXL_START_WORK_NUM_IRQS |\
35 CXL_START_WORK_ERR_FF)
34 36
35 37
36/* Possible modes that an afu can be in */ 38/* Possible modes that an afu can be in */
diff --git a/include/uapi/rdma/Kbuild b/include/uapi/rdma/Kbuild
index 687ae332200f..231901b08f6c 100644
--- a/include/uapi/rdma/Kbuild
+++ b/include/uapi/rdma/Kbuild
@@ -5,3 +5,4 @@ header-y += ib_user_sa.h
5header-y += ib_user_verbs.h 5header-y += ib_user_verbs.h
6header-y += rdma_netlink.h 6header-y += rdma_netlink.h
7header-y += rdma_user_cm.h 7header-y += rdma_user_cm.h
8header-y += hfi/
diff --git a/include/uapi/rdma/hfi/Kbuild b/include/uapi/rdma/hfi/Kbuild
new file mode 100644
index 000000000000..ef23c294fc71
--- /dev/null
+++ b/include/uapi/rdma/hfi/Kbuild
@@ -0,0 +1,2 @@
1# UAPI Header export list
2header-y += hfi1_user.h
diff --git a/include/uapi/rdma/hfi/hfi1_user.h b/include/uapi/rdma/hfi/hfi1_user.h
new file mode 100644
index 000000000000..78c442fbf263
--- /dev/null
+++ b/include/uapi/rdma/hfi/hfi1_user.h
@@ -0,0 +1,427 @@
1/*
2 *
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
5 *
6 * GPL LICENSE SUMMARY
7 *
8 * Copyright(c) 2015 Intel Corporation.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of version 2 of the GNU General Public License as
12 * published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * BSD LICENSE
20 *
21 * Copyright(c) 2015 Intel Corporation.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 *
27 * - Redistributions of source code must retain the above copyright
28 * notice, this list of conditions and the following disclaimer.
29 * - Redistributions in binary form must reproduce the above copyright
30 * notice, this list of conditions and the following disclaimer in
31 * the documentation and/or other materials provided with the
32 * distribution.
33 * - Neither the name of Intel Corporation nor the names of its
34 * contributors may be used to endorse or promote products derived
35 * from this software without specific prior written permission.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
40 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
41 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
45 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
46 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
47 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48 *
49 */
50
51/*
52 * This file contains defines, structures, etc. that are used
53 * to communicate between kernel and user code.
54 */
55
56#ifndef _LINUX__HFI1_USER_H
57#define _LINUX__HFI1_USER_H
58
59#include <linux/types.h>
60
61/*
62 * This version number is given to the driver by the user code during
63 * initialization in the spu_userversion field of hfi1_user_info, so
64 * the driver can check for compatibility with user code.
65 *
66 * The major version changes when data structures change in an incompatible
67 * way. The driver must be the same for initialization to succeed.
68 */
69#define HFI1_USER_SWMAJOR 4
70
71/*
72 * Minor version differences are always compatible
73 * a within a major version, however if user software is larger
74 * than driver software, some new features and/or structure fields
75 * may not be implemented; the user code must deal with this if it
76 * cares, or it must abort after initialization reports the difference.
77 */
78#define HFI1_USER_SWMINOR 0
79
80/*
81 * Set of HW and driver capability/feature bits.
82 * These bit values are used to configure enabled/disabled HW and
83 * driver features. The same set of bits are communicated to user
84 * space.
85 */
86#define HFI1_CAP_DMA_RTAIL (1UL << 0) /* Use DMA'ed RTail value */
87#define HFI1_CAP_SDMA (1UL << 1) /* Enable SDMA support */
88#define HFI1_CAP_SDMA_AHG (1UL << 2) /* Enable SDMA AHG support */
89#define HFI1_CAP_EXTENDED_PSN (1UL << 3) /* Enable Extended PSN support */
90#define HFI1_CAP_HDRSUPP (1UL << 4) /* Enable Header Suppression */
91/* 1UL << 5 reserved */
92#define HFI1_CAP_USE_SDMA_HEAD (1UL << 6) /* DMA Hdr Q tail vs. use CSR */
93#define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/
94#define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */
95#define HFI1_CAP_NODROP_EGR_FULL (1UL << 9) /* Don't drop on EGR buffs full */
96#define HFI1_CAP_TID_UNMAP (1UL << 10) /* Enable Expected TID caching */
97#define HFI1_CAP_PRINT_UNIMPL (1UL << 11) /* Show for unimplemented feats */
98#define HFI1_CAP_ALLOW_PERM_JKEY (1UL << 12) /* Allow use of permissive JKEY */
99#define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */
100#define HFI1_CAP_PKEY_CHECK (1UL << 14) /* Enable ctxt PKey checking */
101#define HFI1_CAP_STATIC_RATE_CTRL (1UL << 15) /* Allow PBC.StaticRateControl */
102#define HFI1_CAP_QSFP_ENABLED (1UL << 16) /* Enable QSFP check during LNI */
103#define HFI1_CAP_SDMA_HEAD_CHECK (1UL << 17) /* SDMA head checking */
104#define HFI1_CAP_EARLY_CREDIT_RETURN (1UL << 18) /* early credit return */
105
106#define HFI1_RCVHDR_ENTSIZE_2 (1UL << 0)
107#define HFI1_RCVHDR_ENTSIZE_16 (1UL << 1)
108#define HFI1_RCVDHR_ENTSIZE_32 (1UL << 2)
109
110/*
111 * If the unit is specified via open, HFI choice is fixed. If port is
112 * specified, it's also fixed. Otherwise we try to spread contexts
113 * across ports and HFIs, using different algorithms. WITHIN is
114 * the old default, prior to this mechanism.
115 */
116#define HFI1_ALG_ACROSS 0 /* round robin contexts across HFIs, then
117 * ports; this is the default */
118#define HFI1_ALG_WITHIN 1 /* use all contexts on an HFI (round robin
119 * active ports within), then next HFI */
120#define HFI1_ALG_COUNT 2 /* number of algorithm choices */
121
122
123/* User commands. */
124#define HFI1_CMD_ASSIGN_CTXT 1 /* allocate HFI and context */
125#define HFI1_CMD_CTXT_INFO 2 /* find out what resources we got */
126#define HFI1_CMD_USER_INFO 3 /* set up userspace */
127#define HFI1_CMD_TID_UPDATE 4 /* update expected TID entries */
128#define HFI1_CMD_TID_FREE 5 /* free expected TID entries */
129#define HFI1_CMD_CREDIT_UPD 6 /* force an update of PIO credit */
130#define HFI1_CMD_SDMA_STATUS_UPD 7 /* force update of SDMA status ring */
131
132#define HFI1_CMD_RECV_CTRL 8 /* control receipt of packets */
133#define HFI1_CMD_POLL_TYPE 9 /* set the kind of polling we want */
134#define HFI1_CMD_ACK_EVENT 10 /* ack & clear user status bits */
135#define HFI1_CMD_SET_PKEY 11 /* set context's pkey */
136#define HFI1_CMD_CTXT_RESET 12 /* reset context's HW send context */
137/* separate EPROM commands from normal PSM commands */
138#define HFI1_CMD_EP_INFO 64 /* read EPROM device ID */
139#define HFI1_CMD_EP_ERASE_CHIP 65 /* erase whole EPROM */
140#define HFI1_CMD_EP_ERASE_P0 66 /* erase EPROM partition 0 */
141#define HFI1_CMD_EP_ERASE_P1 67 /* erase EPROM partition 1 */
142#define HFI1_CMD_EP_READ_P0 68 /* read EPROM partition 0 */
143#define HFI1_CMD_EP_READ_P1 69 /* read EPROM partition 1 */
144#define HFI1_CMD_EP_WRITE_P0 70 /* write EPROM partition 0 */
145#define HFI1_CMD_EP_WRITE_P1 71 /* write EPROM partition 1 */
146
147#define _HFI1_EVENT_FROZEN_BIT 0
148#define _HFI1_EVENT_LINKDOWN_BIT 1
149#define _HFI1_EVENT_LID_CHANGE_BIT 2
150#define _HFI1_EVENT_LMC_CHANGE_BIT 3
151#define _HFI1_EVENT_SL2VL_CHANGE_BIT 4
152#define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_SL2VL_CHANGE_BIT
153
154#define HFI1_EVENT_FROZEN (1UL << _HFI1_EVENT_FROZEN_BIT)
155#define HFI1_EVENT_LINKDOWN_BIT (1UL << _HFI1_EVENT_LINKDOWN_BIT)
156#define HFI1_EVENT_LID_CHANGE_BIT (1UL << _HFI1_EVENT_LID_CHANGE_BIT)
157#define HFI1_EVENT_LMC_CHANGE_BIT (1UL << _HFI1_EVENT_LMC_CHANGE_BIT)
158#define HFI1_EVENT_SL2VL_CHANGE_BIT (1UL << _HFI1_EVENT_SL2VL_CHANGE_BIT)
159
160/*
161 * These are the status bits readable (in ASCII form, 64bit value)
162 * from the "status" sysfs file. For binary compatibility, values
163 * must remain as is; removed states can be reused for different
164 * purposes.
165 */
166#define HFI1_STATUS_INITTED 0x1 /* basic initialization done */
167/* Chip has been found and initialized */
168#define HFI1_STATUS_CHIP_PRESENT 0x20
169/* IB link is at ACTIVE, usable for data traffic */
170#define HFI1_STATUS_IB_READY 0x40
171/* link is configured, LID, MTU, etc. have been set */
172#define HFI1_STATUS_IB_CONF 0x80
173/* A Fatal hardware error has occurred. */
174#define HFI1_STATUS_HWERROR 0x200
175
176/*
177 * Number of supported shared contexts.
178 * This is the maximum number of software contexts that can share
179 * a hardware send/receive context.
180 */
181#define HFI1_MAX_SHARED_CTXTS 8
182
183/*
184 * Poll types
185 */
186#define HFI1_POLL_TYPE_ANYRCV 0x0
187#define HFI1_POLL_TYPE_URGENT 0x1
188
189/*
190 * This structure is passed to the driver to tell it where
191 * user code buffers are, sizes, etc. The offsets and sizes of the
192 * fields must remain unchanged, for binary compatibility. It can
193 * be extended, if userversion is changed so user code can tell, if needed
194 */
195struct hfi1_user_info {
196 /*
197 * version of user software, to detect compatibility issues.
198 * Should be set to HFI1_USER_SWVERSION.
199 */
200 __u32 userversion;
201 __u16 pad;
202 /* HFI selection algorithm, if unit has not selected */
203 __u16 hfi1_alg;
204 /*
205 * If two or more processes wish to share a context, each process
206 * must set the subcontext_cnt and subcontext_id to the same
207 * values. The only restriction on the subcontext_id is that
208 * it be unique for a given node.
209 */
210 __u16 subctxt_cnt;
211 __u16 subctxt_id;
212 /* 128bit UUID passed in by PSM. */
213 __u8 uuid[16];
214};
215
216struct hfi1_ctxt_info {
217 __u64 runtime_flags; /* chip/drv runtime flags (HFI1_CAP_*) */
218 __u32 rcvegr_size; /* size of each eager buffer */
219 __u16 num_active; /* number of active units */
220 __u16 unit; /* unit (chip) assigned to caller */
221 __u16 ctxt; /* ctxt on unit assigned to caller */
222 __u16 subctxt; /* subctxt on unit assigned to caller */
223 __u16 rcvtids; /* number of Rcv TIDs for this context */
224 __u16 credits; /* number of PIO credits for this context */
225 __u16 numa_node; /* NUMA node of the assigned device */
226 __u16 rec_cpu; /* cpu # for affinity (0xffff if none) */
227 __u16 send_ctxt; /* send context in use by this user context */
228 __u16 egrtids; /* number of RcvArray entries for Eager Rcvs */
229 __u16 rcvhdrq_cnt; /* number of RcvHdrQ entries */
230 __u16 rcvhdrq_entsize; /* size (in bytes) for each RcvHdrQ entry */
231 __u16 sdma_ring_size; /* number of entries in SDMA request ring */
232};
233
234struct hfi1_tid_info {
235 /* virtual address of first page in transfer */
236 __u64 vaddr;
237 /* pointer to tid array. this array is big enough */
238 __u64 tidlist;
239 /* number of tids programmed by this request */
240 __u32 tidcnt;
241 /* length of transfer buffer programmed by this request */
242 __u32 length;
243 /*
244 * pointer to bitmap of TIDs used for this call;
245 * checked for being large enough at open
246 */
247 __u64 tidmap;
248};
249
250struct hfi1_cmd {
251 __u32 type; /* command type */
252 __u32 len; /* length of struct pointed to by add */
253 __u64 addr; /* pointer to user structure */
254};
255
256enum hfi1_sdma_comp_state {
257 FREE = 0,
258 QUEUED,
259 COMPLETE,
260 ERROR
261};
262
263/*
264 * SDMA completion ring entry
265 */
266struct hfi1_sdma_comp_entry {
267 __u32 status;
268 __u32 errcode;
269};
270
271/*
272 * Device status and notifications from driver to user-space.
273 */
274struct hfi1_status {
275 __u64 dev; /* device/hw status bits */
276 __u64 port; /* port state and status bits */
277 char freezemsg[0];
278};
279
280/*
281 * This structure is returned by the driver immediately after
282 * open to get implementation-specific info, and info specific to this
283 * instance.
284 *
285 * This struct must have explicit pad fields where type sizes
286 * may result in different alignments between 32 and 64 bit
287 * programs, since the 64 bit * bit kernel requires the user code
288 * to have matching offsets
289 */
290struct hfi1_base_info {
291 /* version of hardware, for feature checking. */
292 __u32 hw_version;
293 /* version of software, for feature checking. */
294 __u32 sw_version;
295 /* Job key */
296 __u16 jkey;
297 __u16 padding1;
298 /*
299 * The special QP (queue pair) value that identifies PSM
300 * protocol packet from standard IB packets.
301 */
302 __u32 bthqp;
303 /* PIO credit return address, */
304 __u64 sc_credits_addr;
305 /*
306 * Base address of write-only pio buffers for this process.
307 * Each buffer has sendpio_credits*64 bytes.
308 */
309 __u64 pio_bufbase_sop;
310 /*
311 * Base address of write-only pio buffers for this process.
312 * Each buffer has sendpio_credits*64 bytes.
313 */
314 __u64 pio_bufbase;
315 /* address where receive buffer queue is mapped into */
316 __u64 rcvhdr_bufbase;
317 /* base address of Eager receive buffers. */
318 __u64 rcvegr_bufbase;
319 /* base address of SDMA completion ring */
320 __u64 sdma_comp_bufbase;
321 /*
322 * User register base for init code, not to be used directly by
323 * protocol or applications. Always maps real chip register space.
324 * the register addresses are:
325 * ur_rcvhdrhead, ur_rcvhdrtail, ur_rcvegrhead, ur_rcvegrtail,
326 * ur_rcvtidflow
327 */
328 __u64 user_regbase;
329 /* notification events */
330 __u64 events_bufbase;
331 /* status page */
332 __u64 status_bufbase;
333 /* rcvhdrtail update */
334 __u64 rcvhdrtail_base;
335 /*
336 * shared memory pages for subctxts if ctxt is shared; these cover
337 * all the processes in the group sharing a single context.
338 * all have enough space for the num_subcontexts value on this job.
339 */
340 __u64 subctxt_uregbase;
341 __u64 subctxt_rcvegrbuf;
342 __u64 subctxt_rcvhdrbuf;
343};
344
345enum sdma_req_opcode {
346 EXPECTED = 0,
347 EAGER
348};
349
350#define HFI1_SDMA_REQ_VERSION_MASK 0xF
351#define HFI1_SDMA_REQ_VERSION_SHIFT 0x0
352#define HFI1_SDMA_REQ_OPCODE_MASK 0xF
353#define HFI1_SDMA_REQ_OPCODE_SHIFT 0x4
354#define HFI1_SDMA_REQ_IOVCNT_MASK 0xFF
355#define HFI1_SDMA_REQ_IOVCNT_SHIFT 0x8
356
357struct sdma_req_info {
358 /*
359 * bits 0-3 - version (currently unused)
360 * bits 4-7 - opcode (enum sdma_req_opcode)
361 * bits 8-15 - io vector count
362 */
363 __u16 ctrl;
364 /*
365 * Number of fragments contained in this request.
366 * User-space has already computed how many
367 * fragment-sized packet the user buffer will be
368 * split into.
369 */
370 __u16 npkts;
371 /*
372 * Size of each fragment the user buffer will be
373 * split into.
374 */
375 __u16 fragsize;
376 /*
377 * Index of the slot in the SDMA completion ring
378 * this request should be using. User-space is
379 * in charge of managing its own ring.
380 */
381 __u16 comp_idx;
382} __packed;
383
384/*
385 * SW KDETH header.
386 * swdata is SW defined portion.
387 */
388struct hfi1_kdeth_header {
389 __le32 ver_tid_offset;
390 __le16 jkey;
391 __le16 hcrc;
392 __le32 swdata[7];
393} __packed;
394
395/*
396 * Structure describing the headers that User space uses. The
397 * structure above is a subset of this one.
398 */
399struct hfi1_pkt_header {
400 __le16 pbc[4];
401 __be16 lrh[4];
402 __be32 bth[3];
403 struct hfi1_kdeth_header kdeth;
404} __packed;
405
406
407/*
408 * The list of usermode accessible registers.
409 */
410enum hfi1_ureg {
411 /* (RO) DMA RcvHdr to be used next. */
412 ur_rcvhdrtail = 0,
413 /* (RW) RcvHdr entry to be processed next by host. */
414 ur_rcvhdrhead = 1,
415 /* (RO) Index of next Eager index to use. */
416 ur_rcvegrindextail = 2,
417 /* (RW) Eager TID to be processed next */
418 ur_rcvegrindexhead = 3,
419 /* (RO) Receive Eager Offset Tail */
420 ur_rcvegroffsettail = 4,
421 /* For internal use only; max register number. */
422 ur_maxreg,
423 /* (RW) Receive TID flow table */
424 ur_rcvtidflowtable = 256
425};
426
427#endif /* _LINIUX__HFI1_USER_H */
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index 6e4bb4270ca2..c19a5dc1531a 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -7,12 +7,14 @@ enum {
7 RDMA_NL_RDMA_CM = 1, 7 RDMA_NL_RDMA_CM = 1,
8 RDMA_NL_NES, 8 RDMA_NL_NES,
9 RDMA_NL_C4IW, 9 RDMA_NL_C4IW,
10 RDMA_NL_LS, /* RDMA Local Services */
10 RDMA_NL_NUM_CLIENTS 11 RDMA_NL_NUM_CLIENTS
11}; 12};
12 13
13enum { 14enum {
14 RDMA_NL_GROUP_CM = 1, 15 RDMA_NL_GROUP_CM = 1,
15 RDMA_NL_GROUP_IWPM, 16 RDMA_NL_GROUP_IWPM,
17 RDMA_NL_GROUP_LS,
16 RDMA_NL_NUM_GROUPS 18 RDMA_NL_NUM_GROUPS
17}; 19};
18 20
@@ -128,5 +130,85 @@ enum {
128 IWPM_NLA_ERR_MAX 130 IWPM_NLA_ERR_MAX
129}; 131};
130 132
133/*
134 * Local service operations:
135 * RESOLVE - The client requests the local service to resolve a path.
136 * SET_TIMEOUT - The local service requests the client to set the timeout.
137 */
138enum {
139 RDMA_NL_LS_OP_RESOLVE = 0,
140 RDMA_NL_LS_OP_SET_TIMEOUT,
141 RDMA_NL_LS_NUM_OPS
142};
143
144/* Local service netlink message flags */
145#define RDMA_NL_LS_F_ERR 0x0100 /* Failed response */
146
147/*
148 * Local service resolve operation family header.
149 * The layout for the resolve operation:
150 * nlmsg header
151 * family header
152 * attributes
153 */
154
155/*
156 * Local service path use:
157 * Specify how the path(s) will be used.
158 * ALL - For connected CM operation (6 pathrecords)
159 * UNIDIRECTIONAL - For unidirectional UD (1 pathrecord)
160 * GMP - For miscellaneous GMP like operation (at least 1 reversible
161 * pathrecord)
162 */
163enum {
164 LS_RESOLVE_PATH_USE_ALL = 0,
165 LS_RESOLVE_PATH_USE_UNIDIRECTIONAL,
166 LS_RESOLVE_PATH_USE_GMP,
167 LS_RESOLVE_PATH_USE_MAX
168};
169
170#define LS_DEVICE_NAME_MAX 64
171
172struct rdma_ls_resolve_header {
173 __u8 device_name[LS_DEVICE_NAME_MAX];
174 __u8 port_num;
175 __u8 path_use;
176};
177
178/* Local service attribute type */
179#define RDMA_NLA_F_MANDATORY (1 << 13)
180#define RDMA_NLA_TYPE_MASK (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | \
181 RDMA_NLA_F_MANDATORY))
182
183/*
184 * Local service attributes:
185 * Attr Name Size Byte order
186 * -----------------------------------------------------
187 * PATH_RECORD struct ib_path_rec_data
188 * TIMEOUT u32 cpu
189 * SERVICE_ID u64 cpu
190 * DGID u8[16] BE
191 * SGID u8[16] BE
192 * TCLASS u8
193 * PKEY u16 cpu
194 * QOS_CLASS u16 cpu
195 */
196enum {
197 LS_NLA_TYPE_UNSPEC = 0,
198 LS_NLA_TYPE_PATH_RECORD,
199 LS_NLA_TYPE_TIMEOUT,
200 LS_NLA_TYPE_SERVICE_ID,
201 LS_NLA_TYPE_DGID,
202 LS_NLA_TYPE_SGID,
203 LS_NLA_TYPE_TCLASS,
204 LS_NLA_TYPE_PKEY,
205 LS_NLA_TYPE_QOS_CLASS,
206 LS_NLA_TYPE_MAX
207};
208
209/* Local service DGID/SGID attribute: big endian */
210struct rdma_nla_ls_gid {
211 __u8 gid[16];
212};
131 213
132#endif /* _UAPI_RDMA_NETLINK_H */ 214#endif /* _UAPI_RDMA_NETLINK_H */
diff --git a/include/uapi/scsi/Kbuild b/include/uapi/scsi/Kbuild
index 75746d52f208..d791e0ad509d 100644
--- a/include/uapi/scsi/Kbuild
+++ b/include/uapi/scsi/Kbuild
@@ -3,3 +3,4 @@ header-y += fc/
3header-y += scsi_bsg_fc.h 3header-y += scsi_bsg_fc.h
4header-y += scsi_netlink.h 4header-y += scsi_netlink.h
5header-y += scsi_netlink_fc.h 5header-y += scsi_netlink_fc.h
6header-y += cxlflash_ioctl.h
diff --git a/include/uapi/scsi/cxlflash_ioctl.h b/include/uapi/scsi/cxlflash_ioctl.h
new file mode 100644
index 000000000000..831351b2e660
--- /dev/null
+++ b/include/uapi/scsi/cxlflash_ioctl.h
@@ -0,0 +1,174 @@
1/*
2 * CXL Flash Device Driver
3 *
4 * Written by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>, IBM Corporation
5 * Matthew R. Ochs <mrochs@linux.vnet.ibm.com>, IBM Corporation
6 *
7 * Copyright (C) 2015 IBM Corporation
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
13 */
14
15#ifndef _CXLFLASH_IOCTL_H
16#define _CXLFLASH_IOCTL_H
17
18#include <linux/types.h>
19
20/*
21 * Structure and flag definitions CXL Flash superpipe ioctls
22 */
23
24#define DK_CXLFLASH_VERSION_0 0
25
26struct dk_cxlflash_hdr {
27 __u16 version; /* Version data */
28 __u16 rsvd[3]; /* Reserved for future use */
29 __u64 flags; /* Input flags */
30 __u64 return_flags; /* Returned flags */
31};
32
33/*
34 * Notes:
35 * -----
36 * The 'context_id' field of all ioctl structures contains the context
37 * identifier for a context in the lower 32-bits (upper 32-bits are not
38 * to be used when identifying a context to the AFU). That said, the value
39 * in its entirety (all 64-bits) is to be treated as an opaque cookie and
40 * should be presented as such when issuing ioctls.
41 *
42 * For DK_CXLFLASH_ATTACH ioctl, user specifies read/write access
43 * permissions via the O_RDONLY, O_WRONLY, and O_RDWR flags defined in
44 * the fcntl.h header file.
45 */
46#define DK_CXLFLASH_ATTACH_REUSE_CONTEXT 0x8000000000000000ULL
47
48struct dk_cxlflash_attach {
49 struct dk_cxlflash_hdr hdr; /* Common fields */
50 __u64 num_interrupts; /* Requested number of interrupts */
51 __u64 context_id; /* Returned context */
52 __u64 mmio_size; /* Returned size of MMIO area */
53 __u64 block_size; /* Returned block size, in bytes */
54 __u64 adap_fd; /* Returned adapter file descriptor */
55 __u64 last_lba; /* Returned last LBA on the device */
56 __u64 max_xfer; /* Returned max transfer size, blocks */
57 __u64 reserved[8]; /* Reserved for future use */
58};
59
60struct dk_cxlflash_detach {
61 struct dk_cxlflash_hdr hdr; /* Common fields */
62 __u64 context_id; /* Context to detach */
63 __u64 reserved[8]; /* Reserved for future use */
64};
65
66struct dk_cxlflash_udirect {
67 struct dk_cxlflash_hdr hdr; /* Common fields */
68 __u64 context_id; /* Context to own physical resources */
69 __u64 rsrc_handle; /* Returned resource handle */
70 __u64 last_lba; /* Returned last LBA on the device */
71 __u64 reserved[8]; /* Reserved for future use */
72};
73
74#define DK_CXLFLASH_UVIRTUAL_NEED_WRITE_SAME 0x8000000000000000ULL
75
76struct dk_cxlflash_uvirtual {
77 struct dk_cxlflash_hdr hdr; /* Common fields */
78 __u64 context_id; /* Context to own virtual resources */
79 __u64 lun_size; /* Requested size, in 4K blocks */
80 __u64 rsrc_handle; /* Returned resource handle */
81 __u64 last_lba; /* Returned last LBA of LUN */
82 __u64 reserved[8]; /* Reserved for future use */
83};
84
85struct dk_cxlflash_release {
86 struct dk_cxlflash_hdr hdr; /* Common fields */
87 __u64 context_id; /* Context owning resources */
88 __u64 rsrc_handle; /* Resource handle to release */
89 __u64 reserved[8]; /* Reserved for future use */
90};
91
92struct dk_cxlflash_resize {
93 struct dk_cxlflash_hdr hdr; /* Common fields */
94 __u64 context_id; /* Context owning resources */
95 __u64 rsrc_handle; /* Resource handle of LUN to resize */
96 __u64 req_size; /* New requested size, in 4K blocks */
97 __u64 last_lba; /* Returned last LBA of LUN */
98 __u64 reserved[8]; /* Reserved for future use */
99};
100
101struct dk_cxlflash_clone {
102 struct dk_cxlflash_hdr hdr; /* Common fields */
103 __u64 context_id_src; /* Context to clone from */
104 __u64 context_id_dst; /* Context to clone to */
105 __u64 adap_fd_src; /* Source context adapter fd */
106 __u64 reserved[8]; /* Reserved for future use */
107};
108
109#define DK_CXLFLASH_VERIFY_SENSE_LEN 18
110#define DK_CXLFLASH_VERIFY_HINT_SENSE 0x8000000000000000ULL
111
112struct dk_cxlflash_verify {
113 struct dk_cxlflash_hdr hdr; /* Common fields */
114 __u64 context_id; /* Context owning resources to verify */
115 __u64 rsrc_handle; /* Resource handle of LUN */
116 __u64 hint; /* Reasons for verify */
117 __u64 last_lba; /* Returned last LBA of device */
118 __u8 sense_data[DK_CXLFLASH_VERIFY_SENSE_LEN]; /* SCSI sense data */
119 __u8 pad[6]; /* Pad to next 8-byte boundary */
120 __u64 reserved[8]; /* Reserved for future use */
121};
122
123#define DK_CXLFLASH_RECOVER_AFU_CONTEXT_RESET 0x8000000000000000ULL
124
125struct dk_cxlflash_recover_afu {
126 struct dk_cxlflash_hdr hdr; /* Common fields */
127 __u64 reason; /* Reason for recovery request */
128 __u64 context_id; /* Context to recover / updated ID */
129 __u64 mmio_size; /* Returned size of MMIO area */
130 __u64 adap_fd; /* Returned adapter file descriptor */
131 __u64 reserved[8]; /* Reserved for future use */
132};
133
134#define DK_CXLFLASH_MANAGE_LUN_WWID_LEN 16
135#define DK_CXLFLASH_MANAGE_LUN_ENABLE_SUPERPIPE 0x8000000000000000ULL
136#define DK_CXLFLASH_MANAGE_LUN_DISABLE_SUPERPIPE 0x4000000000000000ULL
137#define DK_CXLFLASH_MANAGE_LUN_ALL_PORTS_ACCESSIBLE 0x2000000000000000ULL
138
139struct dk_cxlflash_manage_lun {
140 struct dk_cxlflash_hdr hdr; /* Common fields */
141 __u8 wwid[DK_CXLFLASH_MANAGE_LUN_WWID_LEN]; /* Page83 WWID, NAA-6 */
142 __u64 reserved[8]; /* Rsvd, future use */
143};
144
145union cxlflash_ioctls {
146 struct dk_cxlflash_attach attach;
147 struct dk_cxlflash_detach detach;
148 struct dk_cxlflash_udirect udirect;
149 struct dk_cxlflash_uvirtual uvirtual;
150 struct dk_cxlflash_release release;
151 struct dk_cxlflash_resize resize;
152 struct dk_cxlflash_clone clone;
153 struct dk_cxlflash_verify verify;
154 struct dk_cxlflash_recover_afu recover_afu;
155 struct dk_cxlflash_manage_lun manage_lun;
156};
157
158#define MAX_CXLFLASH_IOCTL_SZ (sizeof(union cxlflash_ioctls))
159
160#define CXL_MAGIC 0xCA
161#define CXL_IOWR(_n, _s) _IOWR(CXL_MAGIC, _n, struct _s)
162
163#define DK_CXLFLASH_ATTACH CXL_IOWR(0x80, dk_cxlflash_attach)
164#define DK_CXLFLASH_USER_DIRECT CXL_IOWR(0x81, dk_cxlflash_udirect)
165#define DK_CXLFLASH_RELEASE CXL_IOWR(0x82, dk_cxlflash_release)
166#define DK_CXLFLASH_DETACH CXL_IOWR(0x83, dk_cxlflash_detach)
167#define DK_CXLFLASH_VERIFY CXL_IOWR(0x84, dk_cxlflash_verify)
168#define DK_CXLFLASH_RECOVER_AFU CXL_IOWR(0x85, dk_cxlflash_recover_afu)
169#define DK_CXLFLASH_MANAGE_LUN CXL_IOWR(0x86, dk_cxlflash_manage_lun)
170#define DK_CXLFLASH_USER_VIRTUAL CXL_IOWR(0x87, dk_cxlflash_uvirtual)
171#define DK_CXLFLASH_VLUN_RESIZE CXL_IOWR(0x88, dk_cxlflash_resize)
172#define DK_CXLFLASH_VLUN_CLONE CXL_IOWR(0x89, dk_cxlflash_clone)
173
174#endif /* ifndef _CXLFLASH_IOCTL_H */
diff --git a/include/uapi/xen/privcmd.h b/include/uapi/xen/privcmd.h
index a85316811d79..7ddeeda93809 100644
--- a/include/uapi/xen/privcmd.h
+++ b/include/uapi/xen/privcmd.h
@@ -44,6 +44,10 @@ struct privcmd_hypercall {
44 44
45struct privcmd_mmap_entry { 45struct privcmd_mmap_entry {
46 __u64 va; 46 __u64 va;
47 /*
48 * This should be a GFN. It's not possible to change the name because
49 * it's exposed to the user-space.
50 */
47 __u64 mfn; 51 __u64 mfn;
48 __u64 npages; 52 __u64 npages;
49}; 53};