aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-08-18 01:17:32 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-18 01:17:32 -0400
commit60747ef4d173c2747bf7f0377fb22846cb422195 (patch)
treeea0faf33b952495c47909be1400c475a3f3821b0 /include/uapi/linux
parent484334198f8ce9552e20930fff9408ebf6bcf94d (diff)
parent184ca823481c99dadd7d946e5afd4bb921eab30d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor overlapping changes for both merge conflicts. Resolution work done by Stephen Rothwell was used as a reference. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/bpf.h4
-rw-r--r--include/uapi/linux/btrfs.h2
-rw-r--r--include/uapi/linux/elf.h14
-rw-r--r--include/uapi/linux/kvm.h5
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h2
-rw-r--r--include/uapi/linux/vhost.h33
-rw-r--r--include/uapi/linux/virtio_config.h10
-rw-r--r--include/uapi/linux/virtio_ids.h1
-rw-r--r--include/uapi/linux/virtio_vsock.h94
10 files changed, 160 insertions, 6 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index c44747c0796a..185f8ea2702f 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -454,6 +454,7 @@ header-y += virtio_ring.h
454header-y += virtio_rng.h 454header-y += virtio_rng.h
455header-y += virtio_scsi.h 455header-y += virtio_scsi.h
456header-y += virtio_types.h 456header-y += virtio_types.h
457header-y += virtio_vsock.h
457header-y += vm_sockets.h 458header-y += vm_sockets.h
458header-y += vt.h 459header-y += vt.h
459header-y += vtpm_proxy.h 460header-y += vtpm_proxy.h
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index bea0c4e2830a..866d53c33298 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -339,7 +339,7 @@ enum bpf_func_id {
339 BPF_FUNC_skb_change_type, 339 BPF_FUNC_skb_change_type,
340 340
341 /** 341 /**
342 * bpf_skb_in_cgroup(skb, map, index) - Check cgroup2 membership of skb 342 * bpf_skb_under_cgroup(skb, map, index) - Check cgroup2 membership of skb
343 * @skb: pointer to skb 343 * @skb: pointer to skb
344 * @map: pointer to bpf_map in BPF_MAP_TYPE_CGROUP_ARRAY type 344 * @map: pointer to bpf_map in BPF_MAP_TYPE_CGROUP_ARRAY type
345 * @index: index of the cgroup in the bpf_map 345 * @index: index of the cgroup in the bpf_map
@@ -348,7 +348,7 @@ enum bpf_func_id {
348 * == 1 skb succeeded the cgroup2 descendant test 348 * == 1 skb succeeded the cgroup2 descendant test
349 * < 0 error 349 * < 0 error
350 */ 350 */
351 BPF_FUNC_skb_in_cgroup, 351 BPF_FUNC_skb_under_cgroup,
352 352
353 /** 353 /**
354 * bpf_get_hash_recalc(skb) 354 * bpf_get_hash_recalc(skb)
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index 2bdd1e3e7007..ac5eacd3055b 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -798,7 +798,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code)
798#define BTRFS_IOC_INO_PATHS _IOWR(BTRFS_IOCTL_MAGIC, 35, \ 798#define BTRFS_IOC_INO_PATHS _IOWR(BTRFS_IOCTL_MAGIC, 35, \
799 struct btrfs_ioctl_ino_path_args) 799 struct btrfs_ioctl_ino_path_args)
800#define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \ 800#define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \
801 struct btrfs_ioctl_ino_path_args) 801 struct btrfs_ioctl_logical_ino_args)
802#define BTRFS_IOC_SET_RECEIVED_SUBVOL _IOWR(BTRFS_IOCTL_MAGIC, 37, \ 802#define BTRFS_IOC_SET_RECEIVED_SUBVOL _IOWR(BTRFS_IOCTL_MAGIC, 37, \
803 struct btrfs_ioctl_received_subvol_args) 803 struct btrfs_ioctl_received_subvol_args)
804#define BTRFS_IOC_SEND _IOW(BTRFS_IOCTL_MAGIC, 38, struct btrfs_ioctl_send_args) 804#define BTRFS_IOC_SEND _IOW(BTRFS_IOCTL_MAGIC, 38, struct btrfs_ioctl_send_args)
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
index cb4a72f888d5..b59ee077a596 100644
--- a/include/uapi/linux/elf.h
+++ b/include/uapi/linux/elf.h
@@ -286,6 +286,7 @@ typedef struct elf64_phdr {
286#define SHF_ALLOC 0x2 286#define SHF_ALLOC 0x2
287#define SHF_EXECINSTR 0x4 287#define SHF_EXECINSTR 0x4
288#define SHF_RELA_LIVEPATCH 0x00100000 288#define SHF_RELA_LIVEPATCH 0x00100000
289#define SHF_RO_AFTER_INIT 0x00200000
289#define SHF_MASKPROC 0xf0000000 290#define SHF_MASKPROC 0xf0000000
290 291
291/* special section indexes */ 292/* special section indexes */
@@ -381,6 +382,19 @@ typedef struct elf64_shdr {
381#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ 382#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */
382#define NT_PPC_SPE 0x101 /* PowerPC SPE/EVR registers */ 383#define NT_PPC_SPE 0x101 /* PowerPC SPE/EVR registers */
383#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ 384#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */
385#define NT_PPC_TAR 0x103 /* Target Address Register */
386#define NT_PPC_PPR 0x104 /* Program Priority Register */
387#define NT_PPC_DSCR 0x105 /* Data Stream Control Register */
388#define NT_PPC_EBB 0x106 /* Event Based Branch Registers */
389#define NT_PPC_PMU 0x107 /* Performance Monitor Registers */
390#define NT_PPC_TM_CGPR 0x108 /* TM checkpointed GPR Registers */
391#define NT_PPC_TM_CFPR 0x109 /* TM checkpointed FPR Registers */
392#define NT_PPC_TM_CVMX 0x10a /* TM checkpointed VMX Registers */
393#define NT_PPC_TM_CVSX 0x10b /* TM checkpointed VSX Registers */
394#define NT_PPC_TM_SPR 0x10c /* TM Special Purpose Registers */
395#define NT_PPC_TM_CTAR 0x10d /* TM checkpointed Target Address Register */
396#define NT_PPC_TM_CPPR 0x10e /* TM checkpointed Program Priority Register */
397#define NT_PPC_TM_CDSCR 0x10f /* TM checkpointed Data Stream Control Register */
384#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ 398#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */
385#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ 399#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
386#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */ 400#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index e98bb4cce639..300ef255d1e0 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -882,7 +882,10 @@ struct kvm_irq_routing_msi {
882 __u32 address_lo; 882 __u32 address_lo;
883 __u32 address_hi; 883 __u32 address_hi;
884 __u32 data; 884 __u32 data;
885 __u32 pad; 885 union {
886 __u32 pad;
887 __u32 devid;
888 };
886}; 889};
887 890
888struct kvm_irq_routing_s390_adapter { 891struct kvm_irq_routing_s390_adapter {
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index 01751faccaf8..c674ba2563b7 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -24,7 +24,7 @@ enum nft_registers {
24 __NFT_REG_MAX, 24 __NFT_REG_MAX,
25 25
26 NFT_REG32_00 = 8, 26 NFT_REG32_00 = 8,
27 MFT_REG32_01, 27 NFT_REG32_01,
28 NFT_REG32_02, 28 NFT_REG32_02,
29 NFT_REG32_03, 29 NFT_REG32_03,
30 NFT_REG32_04, 30 NFT_REG32_04,
diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h
index 61a8777178c6..56b7ab584cc0 100644
--- a/include/uapi/linux/vhost.h
+++ b/include/uapi/linux/vhost.h
@@ -47,6 +47,32 @@ struct vhost_vring_addr {
47 __u64 log_guest_addr; 47 __u64 log_guest_addr;
48}; 48};
49 49
50/* no alignment requirement */
51struct vhost_iotlb_msg {
52 __u64 iova;
53 __u64 size;
54 __u64 uaddr;
55#define VHOST_ACCESS_RO 0x1
56#define VHOST_ACCESS_WO 0x2
57#define VHOST_ACCESS_RW 0x3
58 __u8 perm;
59#define VHOST_IOTLB_MISS 1
60#define VHOST_IOTLB_UPDATE 2
61#define VHOST_IOTLB_INVALIDATE 3
62#define VHOST_IOTLB_ACCESS_FAIL 4
63 __u8 type;
64};
65
66#define VHOST_IOTLB_MSG 0x1
67
68struct vhost_msg {
69 int type;
70 union {
71 struct vhost_iotlb_msg iotlb;
72 __u8 padding[64];
73 };
74};
75
50struct vhost_memory_region { 76struct vhost_memory_region {
51 __u64 guest_phys_addr; 77 __u64 guest_phys_addr;
52 __u64 memory_size; /* bytes */ 78 __u64 memory_size; /* bytes */
@@ -146,6 +172,8 @@ struct vhost_memory {
146#define VHOST_F_LOG_ALL 26 172#define VHOST_F_LOG_ALL 26
147/* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */ 173/* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */
148#define VHOST_NET_F_VIRTIO_NET_HDR 27 174#define VHOST_NET_F_VIRTIO_NET_HDR 27
175/* Vhost have device IOTLB */
176#define VHOST_F_DEVICE_IOTLB 63
149 177
150/* VHOST_SCSI specific definitions */ 178/* VHOST_SCSI specific definitions */
151 179
@@ -175,4 +203,9 @@ struct vhost_scsi_target {
175#define VHOST_SCSI_SET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x43, __u32) 203#define VHOST_SCSI_SET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x43, __u32)
176#define VHOST_SCSI_GET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x44, __u32) 204#define VHOST_SCSI_GET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x44, __u32)
177 205
206/* VHOST_VSOCK specific defines */
207
208#define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64)
209#define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int)
210
178#endif 211#endif
diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
index 4cb65bbfa654..308e2096291f 100644
--- a/include/uapi/linux/virtio_config.h
+++ b/include/uapi/linux/virtio_config.h
@@ -49,7 +49,7 @@
49 * transport being used (eg. virtio_ring), the rest are per-device feature 49 * transport being used (eg. virtio_ring), the rest are per-device feature
50 * bits. */ 50 * bits. */
51#define VIRTIO_TRANSPORT_F_START 28 51#define VIRTIO_TRANSPORT_F_START 28
52#define VIRTIO_TRANSPORT_F_END 33 52#define VIRTIO_TRANSPORT_F_END 34
53 53
54#ifndef VIRTIO_CONFIG_NO_LEGACY 54#ifndef VIRTIO_CONFIG_NO_LEGACY
55/* Do we get callbacks when the ring is completely used, even if we've 55/* Do we get callbacks when the ring is completely used, even if we've
@@ -63,4 +63,12 @@
63/* v1.0 compliant. */ 63/* v1.0 compliant. */
64#define VIRTIO_F_VERSION_1 32 64#define VIRTIO_F_VERSION_1 32
65 65
66/*
67 * If clear - device has the IOMMU bypass quirk feature.
68 * If set - use platform tools to detect the IOMMU.
69 *
70 * Note the reverse polarity (compared to most other features),
71 * this is for compatibility with legacy systems.
72 */
73#define VIRTIO_F_IOMMU_PLATFORM 33
66#endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */ 74#endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */
diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h
index 77925f587b15..3228d582234a 100644
--- a/include/uapi/linux/virtio_ids.h
+++ b/include/uapi/linux/virtio_ids.h
@@ -41,5 +41,6 @@
41#define VIRTIO_ID_CAIF 12 /* Virtio caif */ 41#define VIRTIO_ID_CAIF 12 /* Virtio caif */
42#define VIRTIO_ID_GPU 16 /* virtio GPU */ 42#define VIRTIO_ID_GPU 16 /* virtio GPU */
43#define VIRTIO_ID_INPUT 18 /* virtio input */ 43#define VIRTIO_ID_INPUT 18 /* virtio input */
44#define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */
44 45
45#endif /* _LINUX_VIRTIO_IDS_H */ 46#endif /* _LINUX_VIRTIO_IDS_H */
diff --git a/include/uapi/linux/virtio_vsock.h b/include/uapi/linux/virtio_vsock.h
new file mode 100644
index 000000000000..1d57ed3d84d2
--- /dev/null
+++ b/include/uapi/linux/virtio_vsock.h
@@ -0,0 +1,94 @@
1/*
2 * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
3 * anyone can use the definitions to implement compatible drivers/servers:
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of IBM nor the names of its contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL IBM OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * Copyright (C) Red Hat, Inc., 2013-2015
30 * Copyright (C) Asias He <asias@redhat.com>, 2013
31 * Copyright (C) Stefan Hajnoczi <stefanha@redhat.com>, 2015
32 */
33
34#ifndef _UAPI_LINUX_VIRTIO_VSOCK_H
35#define _UAPI_LINUX_VIRTIO_VSOCK_H
36
37#include <linux/types.h>
38#include <linux/virtio_ids.h>
39#include <linux/virtio_config.h>
40
41struct virtio_vsock_config {
42 __le64 guest_cid;
43} __attribute__((packed));
44
45enum virtio_vsock_event_id {
46 VIRTIO_VSOCK_EVENT_TRANSPORT_RESET = 0,
47};
48
49struct virtio_vsock_event {
50 __le32 id;
51} __attribute__((packed));
52
53struct virtio_vsock_hdr {
54 __le64 src_cid;
55 __le64 dst_cid;
56 __le32 src_port;
57 __le32 dst_port;
58 __le32 len;
59 __le16 type; /* enum virtio_vsock_type */
60 __le16 op; /* enum virtio_vsock_op */
61 __le32 flags;
62 __le32 buf_alloc;
63 __le32 fwd_cnt;
64} __attribute__((packed));
65
66enum virtio_vsock_type {
67 VIRTIO_VSOCK_TYPE_STREAM = 1,
68};
69
70enum virtio_vsock_op {
71 VIRTIO_VSOCK_OP_INVALID = 0,
72
73 /* Connect operations */
74 VIRTIO_VSOCK_OP_REQUEST = 1,
75 VIRTIO_VSOCK_OP_RESPONSE = 2,
76 VIRTIO_VSOCK_OP_RST = 3,
77 VIRTIO_VSOCK_OP_SHUTDOWN = 4,
78
79 /* To send payload */
80 VIRTIO_VSOCK_OP_RW = 5,
81
82 /* Tell the peer our credit info */
83 VIRTIO_VSOCK_OP_CREDIT_UPDATE = 6,
84 /* Request the peer to send the credit info to us */
85 VIRTIO_VSOCK_OP_CREDIT_REQUEST = 7,
86};
87
88/* VIRTIO_VSOCK_OP_SHUTDOWN flags values */
89enum virtio_vsock_shutdown {
90 VIRTIO_VSOCK_SHUTDOWN_RCV = 1,
91 VIRTIO_VSOCK_SHUTDOWN_SEND = 2,
92};
93
94#endif /* _UAPI_LINUX_VIRTIO_VSOCK_H */