History

Merge branch 'for-6.1/logitech' into for-linus

- Add hanlding of all Bluetooth HID++ devices and fixes in hid++ (Bastien Nocera)

Benjamin Tissoires committed 4 years ago

Commit edd15332 parents 7d8fe4c 98d67f25520 files · +370805 −85069Browse files

Showing the changes to include/uapi/linux (21 of 5520 files). Show all

Unified · Split

21 files
  1. include/uapi/linux/atm_zatm.h +47 −0
  2. include/uapi/linux/elf.h +1 −0
  3. include/uapi/linux/f2fs.h +1 −1
  4. include/uapi/linux/genetlink.h +3 −2
  5. include/uapi/linux/idxd.h +3 −3
  6. include/uapi/linux/io_uring.h +8 −0
  7. include/uapi/linux/netfilter_ipv6/ip6t_LOG.h +1 −1
  8. include/uapi/linux/pci_regs.h +28 −1
  9. include/uapi/linux/serial.h +18 −2
  10. include/uapi/linux/serial_core.h +0 −4
  11. include/uapi/linux/serial_reg.h +2 −2
  12. include/uapi/linux/swab.h +3 −3
  13. include/uapi/linux/ublk_cmd.h +73 −7
  14. include/uapi/linux/vduse.h +47 −0
  15. include/uapi/linux/vhost.h +9 −0
  16. include/uapi/linux/vhost_types.h +2 −0
  17. include/uapi/linux/virtio_config.h +6 −1
  18. include/uapi/linux/virtio_net.h +33 −1
  19. include/uapi/linux/virtio_pci.h +2 −0
  20. include/uapi/linux/virtio_ring.h +11 −5
  21. include/uapi/linux/xfrm.h +1 −1
include/uapi/linux/atm_zatm.h+47−0
@@ -0,0 +1,47 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/* atm_zatm.h - Driver-specific declarations of the ZATM driver (for use by
3 driver-specific utilities) */
4
5/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
6
7
8#ifndef LINUX_ATM_ZATM_H
9#define LINUX_ATM_ZATM_H
10
11/*
12 * Note: non-kernel programs including this file must also include
13 * sys/types.h for struct timeval
14 */
15
16#include <linux/atmapi.h>
17#include <linux/atmioc.h>
18
19#define ZATM_GETPOOL _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
20 /* get pool statistics */
21#define ZATM_GETPOOLZ _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
22 /* get statistics and zero */
23#define ZATM_SETPOOL _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc)
24 /* set pool parameters */
25
26struct zatm_pool_info {
27 int ref_count; /* free buffer pool usage counters */
28 int low_water,high_water; /* refill parameters */
29 int rqa_count,rqu_count; /* queue condition counters */
30 int offset,next_off; /* alignment optimizations: offset */
31 int next_cnt,next_thres; /* repetition counter and threshold */
32};
33
34struct zatm_pool_req {
35 int pool_num; /* pool number */
36 struct zatm_pool_info info; /* actual information */
37};
38
39#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */
40#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */
41#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */
42#define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */
43
44#define ZATM_TIMER_HISTORY_SIZE 16 /* number of timer adjustments to
45 record; must be 2^n */
46
47#endif
include/uapi/linux/elf.h+1−0
@@ -420,6 +420,7 @@ typedef struct elf64_shdr { · 419 unmodified lines
420#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers */420#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers */
421#define NT_S390_GS_BC 0x30c /* s390 guarded storage broadcast control block */421#define NT_S390_GS_BC 0x30c /* s390 guarded storage broadcast control block */
422#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation */422#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation */
423#define NT_S390_PV_CPU_DATA 0x30e /* s390 protvirt cpu dump data */
423#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */424#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */
424#define NT_ARM_TLS 0x401 /* ARM TLS register */425#define NT_ARM_TLS 0x401 /* ARM TLS register */
425#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */426#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */
include/uapi/linux/f2fs.h+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
13#define F2FS_IOC_COMMIT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 2)13#define F2FS_IOC_COMMIT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 2)
14#define F2FS_IOC_START_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 3)14#define F2FS_IOC_START_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 3)
15#define F2FS_IOC_RELEASE_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 4)15#define F2FS_IOC_RELEASE_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 4)
16#define F2FS_IOC_ABORT_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 5)16#define F2FS_IOC_ABORT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 5)
17#define F2FS_IOC_GARBAGE_COLLECT _IOW(F2FS_IOCTL_MAGIC, 6, __u32)17#define F2FS_IOC_GARBAGE_COLLECT _IOW(F2FS_IOCTL_MAGIC, 6, __u32)
18#define F2FS_IOC_WRITE_CHECKPOINT _IO(F2FS_IOCTL_MAGIC, 7)18#define F2FS_IOC_WRITE_CHECKPOINT _IO(F2FS_IOCTL_MAGIC, 7)
19#define F2FS_IOC_DEFRAGMENT _IOWR(F2FS_IOCTL_MAGIC, 8, \19#define F2FS_IOC_DEFRAGMENT _IOWR(F2FS_IOCTL_MAGIC, 8, \
include/uapi/linux/genetlink.h+3−2
@@ -87,6 +87,8 @@ enum { · 86 unmodified lines
87 __CTRL_ATTR_MCAST_GRP_MAX,87 __CTRL_ATTR_MCAST_GRP_MAX,
88};88};
89 89
90#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
91
90enum {92enum {
91 CTRL_ATTR_POLICY_UNSPEC,93 CTRL_ATTR_POLICY_UNSPEC,
92 CTRL_ATTR_POLICY_DO,94 CTRL_ATTR_POLICY_DO,
@@ -96,7 +98,6 @@ enum { · 3 unmodified lines
96 CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 198 CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1
97};99};
98 100
99#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)101#define CTRL_ATTR_POLICY_MAX (__CTRL_ATTR_POLICY_DUMP_MAX - 1)
100
101 102
102#endif /* _UAPI__LINUX_GENERIC_NETLINK_H */103#endif /* _UAPI__LINUX_GENERIC_NETLINK_H */
include/uapi/linux/idxd.h+3−3
@@ -89,14 +89,14 @@ enum iax_opcode { · 88 unmodified lines
89 IAX_OPCODE_CRC64,89 IAX_OPCODE_CRC64,
90 IAX_OPCODE_ZERO_DECOMP_32 = 0x48,90 IAX_OPCODE_ZERO_DECOMP_32 = 0x48,
91 IAX_OPCODE_ZERO_DECOMP_16,91 IAX_OPCODE_ZERO_DECOMP_16,
92 IAX_OPCODE_DECOMP_32 = 0x4c,92 IAX_OPCODE_ZERO_COMP_32 = 0x4c,
93 IAX_OPCODE_DECOMP_16,93 IAX_OPCODE_ZERO_COMP_16,
94 IAX_OPCODE_SCAN = 0x50,94 IAX_OPCODE_SCAN = 0x50,
95 IAX_OPCODE_SET_MEMBER,95 IAX_OPCODE_SET_MEMBER,
96 IAX_OPCODE_EXTRACT,96 IAX_OPCODE_EXTRACT,
97 IAX_OPCODE_SELECT,97 IAX_OPCODE_SELECT,
98 IAX_OPCODE_RLE_BURST,98 IAX_OPCODE_RLE_BURST,
99 IAX_OPCDE_FIND_UNIQUE,99 IAX_OPCODE_FIND_UNIQUE,
100 IAX_OPCODE_EXPAND,100 IAX_OPCODE_EXPAND,
101};101};
102 102
include/uapi/linux/io_uring.h+8−0
@@ -12,6 +12,10 @@ · 11 unmodified lines
12#include <linux/types.h>12#include <linux/types.h>
13#include <linux/time_types.h>13#include <linux/time_types.h>
14 14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
15/*19/*
16 * IO submission data structure (Submission Queue Entry)20 * IO submission data structure (Submission Queue Entry)
17 */21 */
@@ -661,4 +665,8 @@ struct io_uring_recvmsg_out { · 643 unmodified lines
661 __u32 flags;665 __u32 flags;
662};666};
663 667
668#ifdef __cplusplus
669}
670#endif
671
664#endif672#endif
include/uapi/linux/netfilter_ipv6/ip6t_LOG.h+1−1
@@ -17,4 +17,4 @@ struct ip6t_log_info { · 16 unmodified lines
17 char prefix[30];17 char prefix[30];
18};18};
19 19
20#endif /*_IPT_LOG_H*/20#endif /* _IP6T_LOG_H */
include/uapi/linux/pci_regs.h+28−1
@@ -737,7 +737,8 @@ · 736 unmodified lines
737#define PCI_EXT_CAP_ID_DVSEC 0x23 /* Designated Vendor-Specific */737#define PCI_EXT_CAP_ID_DVSEC 0x23 /* Designated Vendor-Specific */
738#define PCI_EXT_CAP_ID_DLF 0x25 /* Data Link Feature */738#define PCI_EXT_CAP_ID_DLF 0x25 /* Data Link Feature */
739#define PCI_EXT_CAP_ID_PL_16GT 0x26 /* Physical Layer 16.0 GT/s */739#define PCI_EXT_CAP_ID_PL_16GT 0x26 /* Physical Layer 16.0 GT/s */
740#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PL_16GT740#define PCI_EXT_CAP_ID_DOE 0x2E /* Data Object Exchange */
741#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOE
741 742
742#define PCI_EXT_CAP_DSN_SIZEOF 12743#define PCI_EXT_CAP_DSN_SIZEOF 12
743#define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40744#define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40
@@ -1103,4 +1104,30 @@ · 359 unmodified lines
1103#define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK 0x000000F01104#define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK 0x000000F0
1104#define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT 41105#define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT 4
1105 1106
1107/* Data Object Exchange */
1108#define PCI_DOE_CAP 0x04 /* DOE Capabilities Register */
1109#define PCI_DOE_CAP_INT_SUP 0x00000001 /* Interrupt Support */
1110#define PCI_DOE_CAP_INT_MSG_NUM 0x00000ffe /* Interrupt Message Number */
1111#define PCI_DOE_CTRL 0x08 /* DOE Control Register */
1112#define PCI_DOE_CTRL_ABORT 0x00000001 /* DOE Abort */
1113#define PCI_DOE_CTRL_INT_EN 0x00000002 /* DOE Interrupt Enable */
1114#define PCI_DOE_CTRL_GO 0x80000000 /* DOE Go */
1115#define PCI_DOE_STATUS 0x0c /* DOE Status Register */
1116#define PCI_DOE_STATUS_BUSY 0x00000001 /* DOE Busy */
1117#define PCI_DOE_STATUS_INT_STATUS 0x00000002 /* DOE Interrupt Status */
1118#define PCI_DOE_STATUS_ERROR 0x00000004 /* DOE Error */
1119#define PCI_DOE_STATUS_DATA_OBJECT_READY 0x80000000 /* Data Object Ready */
1120#define PCI_DOE_WRITE 0x10 /* DOE Write Data Mailbox Register */
1121#define PCI_DOE_READ 0x14 /* DOE Read Data Mailbox Register */
1122
1123/* DOE Data Object - note not actually registers */
1124#define PCI_DOE_DATA_OBJECT_HEADER_1_VID 0x0000ffff
1125#define PCI_DOE_DATA_OBJECT_HEADER_1_TYPE 0x00ff0000
1126#define PCI_DOE_DATA_OBJECT_HEADER_2_LENGTH 0x0003ffff
1127
1128#define PCI_DOE_DATA_OBJECT_DISC_REQ_3_INDEX 0x000000ff
1129#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_VID 0x0000ffff
1130#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL 0x00ff0000
1131#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX 0xff000000
1132
1106#endif /* LINUX_PCI_REGS_H */1133#endif /* LINUX_PCI_REGS_H */
include/uapi/linux/serial.h+18−2
@@ -126,10 +126,26 @@ struct serial_rs485 { · 125 unmodified lines
126#define SER_RS485_TERMINATE_BUS (1 << 5) /* Enable bus126#define SER_RS485_TERMINATE_BUS (1 << 5) /* Enable bus
127 termination127 termination
128 (if supported) */128 (if supported) */
129
130/* RS-485 addressing mode */
131#define SER_RS485_ADDRB (1 << 6) /* Enable addressing mode */
132#define SER_RS485_ADDR_RECV (1 << 7) /* Receive address filter */
133#define SER_RS485_ADDR_DEST (1 << 8) /* Destination address */
134
129 __u32 delay_rts_before_send; /* Delay before send (milliseconds) */135 __u32 delay_rts_before_send; /* Delay before send (milliseconds) */
130 __u32 delay_rts_after_send; /* Delay after send (milliseconds) */136 __u32 delay_rts_after_send; /* Delay after send (milliseconds) */
131 __u32 padding[5]; /* Memory is cheap, new structs137
132 are a royal PITA .. */138 /* The fields below are defined by flags */
139 union {
140 __u32 padding[5]; /* Memory is cheap, new structs are a pain */
141
142 struct {
143 __u8 addr_recv;
144 __u8 addr_dest;
145 __u8 padding0[2];
146 __u32 padding1[4];
147 };
148 };
133};149};
134 150
135/*151/*
include/uapi/linux/serial_core.h+0−4
@@ -124,10 +124,6 @@ · 123 unmodified lines
124/* TXX9 type number */124/* TXX9 type number */
125#define PORT_TXX9 64125#define PORT_TXX9 64
126 126
127/* NEC VR4100 series SIU/DSIU */
128#define PORT_VR41XX_SIU 65
129#define PORT_VR41XX_DSIU 66
130
131/* Samsung S3C2400 SoC */127/* Samsung S3C2400 SoC */
132#define PORT_S3C2400 67128#define PORT_S3C2400 67
133 129
include/uapi/linux/serial_reg.h+2−2
@@ -139,7 +139,7 @@ · 138 unmodified lines
139#define UART_LSR_PE 0x04 /* Parity error indicator */139#define UART_LSR_PE 0x04 /* Parity error indicator */
140#define UART_LSR_OE 0x02 /* Overrun error indicator */140#define UART_LSR_OE 0x02 /* Overrun error indicator */
141#define UART_LSR_DR 0x01 /* Receiver data ready */141#define UART_LSR_DR 0x01 /* Receiver data ready */
142#define UART_LSR_BRK_ERROR_BITS 0x1E /* BI, FE, PE, OE bits */142#define UART_LSR_BRK_ERROR_BITS (UART_LSR_BI|UART_LSR_FE|UART_LSR_PE|UART_LSR_OE)
143 143
144#define UART_MSR 6 /* In: Modem Status Register */144#define UART_MSR 6 /* In: Modem Status Register */
145#define UART_MSR_DCD 0x80 /* Data Carrier Detect */145#define UART_MSR_DCD 0x80 /* Data Carrier Detect */
@@ -150,7 +150,7 @@ · 4 unmodified lines
150#define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */150#define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */
151#define UART_MSR_DDSR 0x02 /* Delta DSR */151#define UART_MSR_DDSR 0x02 /* Delta DSR */
152#define UART_MSR_DCTS 0x01 /* Delta CTS */152#define UART_MSR_DCTS 0x01 /* Delta CTS */
153#define UART_MSR_ANY_DELTA 0x0F /* Any of the delta bits! */153#define UART_MSR_ANY_DELTA (UART_MSR_DDCD|UART_MSR_TERI|UART_MSR_DDSR|UART_MSR_DCTS)
154 154
155#define UART_SCR 7 /* I/O: Scratch Register */155#define UART_SCR 7 /* I/O: Scratch Register */
156 156
include/uapi/linux/swab.h+3−3
@@ -102,7 +102,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) · 101 unmodified lines
102#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))102#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
103#else103#else
104#define __swab16(x) \104#define __swab16(x) \
105 (__builtin_constant_p((__u16)(x)) ? \105 (__u16)(__builtin_constant_p(x) ? \
106 ___constant_swab16(x) : \106 ___constant_swab16(x) : \
107 __fswab16(x))107 __fswab16(x))
108#endif108#endif
@@ -115,7 +115,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) · 6 unmodified lines
115#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))115#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
116#else116#else
117#define __swab32(x) \117#define __swab32(x) \
118 (__builtin_constant_p((__u32)(x)) ? \118 (__u32)(__builtin_constant_p(x) ? \
119 ___constant_swab32(x) : \119 ___constant_swab32(x) : \
120 __fswab32(x))120 __fswab32(x))
121#endif121#endif
@@ -128,7 +128,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) · 6 unmodified lines
128#define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))128#define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
129#else129#else
130#define __swab64(x) \130#define __swab64(x) \
131 (__builtin_constant_p((__u64)(x)) ? \131 (__u64)(__builtin_constant_p(x) ? \
132 ___constant_swab64(x) : \132 ___constant_swab64(x) : \
133 __fswab64(x))133 __fswab64(x))
134#endif134#endif
include/uapi/linux/ublk_cmd.h+73−7
@@ -15,6 +15,8 @@ · 14 unmodified lines
15#define UBLK_CMD_DEL_DEV 0x0515#define UBLK_CMD_DEL_DEV 0x05
16#define UBLK_CMD_START_DEV 0x0616#define UBLK_CMD_START_DEV 0x06
17#define UBLK_CMD_STOP_DEV 0x0717#define UBLK_CMD_STOP_DEV 0x07
18#define UBLK_CMD_SET_PARAMS 0x08
19#define UBLK_CMD_GET_PARAMS 0x09
18 20
19/*21/*
20 * IO commands, issued by ublk server, and handled by ublk driver.22 * IO commands, issued by ublk server, and handled by ublk driver.
@@ -28,12 +30,21 @@ · 7 unmodified lines
28 * this IO request, request's handling result is committed to ublk30 * this IO request, request's handling result is committed to ublk
29 * driver, meantime FETCH_REQ is piggyback, and FETCH_REQ has to be31 * driver, meantime FETCH_REQ is piggyback, and FETCH_REQ has to be
30 * handled before completing io request.32 * handled before completing io request.
33 *
34 * NEED_GET_DATA: only used for write requests to set io addr and copy data
35 * When NEED_GET_DATA is set, ublksrv has to issue UBLK_IO_NEED_GET_DATA
36 * command after ublk driver returns UBLK_IO_RES_NEED_GET_DATA.
37 *
38 * It is only used if ublksrv set UBLK_F_NEED_GET_DATA flag
39 * while starting a ublk device.
31 */40 */
32#define UBLK_IO_FETCH_REQ 0x2041#define UBLK_IO_FETCH_REQ 0x20
33#define UBLK_IO_COMMIT_AND_FETCH_REQ 0x2142#define UBLK_IO_COMMIT_AND_FETCH_REQ 0x21
43#define UBLK_IO_NEED_GET_DATA 0x22
34 44
35/* only ABORT means that no re-fetch */45/* only ABORT means that no re-fetch */
36#define UBLK_IO_RES_OK 046#define UBLK_IO_RES_OK 0
47#define UBLK_IO_RES_NEED_GET_DATA 1
37#define UBLK_IO_RES_ABORT (-ENODEV)48#define UBLK_IO_RES_ABORT (-ENODEV)
38 49
39#define UBLKSRV_CMD_BUF_OFFSET 050#define UBLKSRV_CMD_BUF_OFFSET 0
@@ -54,6 +65,15 @@ · 14 unmodified lines
54 */65 */
55#define UBLK_F_URING_CMD_COMP_IN_TASK (1ULL << 1)66#define UBLK_F_URING_CMD_COMP_IN_TASK (1ULL << 1)
56 67
68/*
69 * User should issue io cmd again for write requests to
70 * set io buffer address and copy data from bio vectors
71 * to the userspace io buffer.
72 *
73 * In this mode, task_work is not used.
74 */
75#define UBLK_F_NEED_GET_DATA (1UL << 2)
76
57/* device state */77/* device state */
58#define UBLK_S_DEV_DEAD 078#define UBLK_S_DEV_DEAD 0
59#define UBLK_S_DEV_LIVE 179#define UBLK_S_DEV_LIVE 1
@@ -78,22 +98,23 @@ struct ublksrv_ctrl_cmd { · 18 unmodified lines
78struct ublksrv_ctrl_dev_info {98struct ublksrv_ctrl_dev_info {
79 __u16 nr_hw_queues;99 __u16 nr_hw_queues;
80 __u16 queue_depth;100 __u16 queue_depth;
81 __u16 block_size;
82 __u16 state;101 __u16 state;
102 __u16 pad0;
83 103
84 __u32 rq_max_blocks;104 __u32 max_io_buf_bytes;
85 __u32 dev_id;105 __u32 dev_id;
86 106
87 __u64 dev_blocks;
88
89 __s32 ublksrv_pid;107 __s32 ublksrv_pid;
90 __s32 reserved0;108 __u32 pad1;
109
91 __u64 flags;110 __u64 flags;
92 __u64 flags_reserved;
93 111
94 /* For ublksrv internal use, invisible to ublk driver */112 /* For ublksrv internal use, invisible to ublk driver */
95 __u64 ublksrv_flags;113 __u64 ublksrv_flags;
96 __u64 reserved1[9];114
115 __u64 reserved0;
116 __u64 reserved1;
117 __u64 reserved2;
97};118};
98 119
99#define UBLK_IO_OP_READ 0120#define UBLK_IO_OP_READ 0
@@ -158,4 +179,49 @@ struct ublksrv_io_cmd { · 58 unmodified lines
158 __u64 addr;179 __u64 addr;
159};180};
160 181
182struct ublk_param_basic {
183#define UBLK_ATTR_READ_ONLY (1 << 0)
184#define UBLK_ATTR_ROTATIONAL (1 << 1)
185#define UBLK_ATTR_VOLATILE_CACHE (1 << 2)
186#define UBLK_ATTR_FUA (1 << 3)
187 __u32 attrs;
188 __u8 logical_bs_shift;
189 __u8 physical_bs_shift;
190 __u8 io_opt_shift;
191 __u8 io_min_shift;
192
193 __u32 max_sectors;
194 __u32 chunk_sectors;
195
196 __u64 dev_sectors;
197 __u64 virt_boundary_mask;
198};
199
200struct ublk_param_discard {
201 __u32 discard_alignment;
202
203 __u32 discard_granularity;
204 __u32 max_discard_sectors;
205
206 __u32 max_write_zeroes_sectors;
207 __u16 max_discard_segments;
208 __u16 reserved0;
209};
210
211struct ublk_params {
212 /*
213 * Total length of parameters, userspace has to set 'len' for both
214 * SET_PARAMS and GET_PARAMS command, and driver may update len
215 * if two sides use different version of 'ublk_params', same with
216 * 'types' fields.
217 */
218 __u32 len;
219#define UBLK_PARAM_TYPE_BASIC (1 << 0)
220#define UBLK_PARAM_TYPE_DISCARD (1 << 1)
221 __u32 types; /* types of parameter included */
222
223 struct ublk_param_basic basic;
224 struct ublk_param_discard discard;
225};
226
161#endif227#endif
include/uapi/linux/vduse.h+47−0
@@ -210,6 +210,53 @@ struct vduse_vq_eventfd { · 209 unmodified lines
210 */210 */
211#define VDUSE_VQ_INJECT_IRQ _IOW(VDUSE_BASE, 0x17, __u32)211#define VDUSE_VQ_INJECT_IRQ _IOW(VDUSE_BASE, 0x17, __u32)
212 212
213/**
214 * struct vduse_iova_umem - userspace memory configuration for one IOVA region
215 * @uaddr: start address of userspace memory, it must be aligned to page size
216 * @iova: start of the IOVA region
217 * @size: size of the IOVA region
218 * @reserved: for future use, needs to be initialized to zero
219 *
220 * Structure used by VDUSE_IOTLB_REG_UMEM and VDUSE_IOTLB_DEREG_UMEM
221 * ioctls to register/de-register userspace memory for IOVA regions
222 */
223struct vduse_iova_umem {
224 __u64 uaddr;
225 __u64 iova;
226 __u64 size;
227 __u64 reserved[3];
228};
229
230/* Register userspace memory for IOVA regions */
231#define VDUSE_IOTLB_REG_UMEM _IOW(VDUSE_BASE, 0x18, struct vduse_iova_umem)
232
233/* De-register the userspace memory. Caller should set iova and size field. */
234#define VDUSE_IOTLB_DEREG_UMEM _IOW(VDUSE_BASE, 0x19, struct vduse_iova_umem)
235
236/**
237 * struct vduse_iova_info - information of one IOVA region
238 * @start: start of the IOVA region
239 * @last: last of the IOVA region
240 * @capability: capability of the IOVA regsion
241 * @reserved: for future use, needs to be initialized to zero
242 *
243 * Structure used by VDUSE_IOTLB_GET_INFO ioctl to get information of
244 * one IOVA region.
245 */
246struct vduse_iova_info {
247 __u64 start;
248 __u64 last;
249#define VDUSE_IOVA_CAP_UMEM (1 << 0)
250 __u64 capability;
251 __u64 reserved[3];
252};
253
254/*
255 * Find the first IOVA region that overlaps with the range [start, last]
256 * and return some information on it. Caller should set start and last fields.
257 */
258#define VDUSE_IOTLB_GET_INFO _IOWR(VDUSE_BASE, 0x1a, struct vduse_iova_info)
259
213/* The control messages definition for read(2)/write(2) on /dev/vduse/$NAME */260/* The control messages definition for read(2)/write(2) on /dev/vduse/$NAME */
214 261
215/**262/**
include/uapi/linux/vhost.h+9−0
@@ -171,4 +171,13 @@ · 170 unmodified lines
171#define VHOST_VDPA_SET_GROUP_ASID _IOW(VHOST_VIRTIO, 0x7C, \171#define VHOST_VDPA_SET_GROUP_ASID _IOW(VHOST_VIRTIO, 0x7C, \
172 struct vhost_vring_state)172 struct vhost_vring_state)
173 173
174/* Suspend a device so it does not process virtqueue requests anymore
175 *
176 * After the return of ioctl the device must preserve all the necessary state
177 * (the virtqueue vring base plus the possible device specific states) that is
178 * required for restoring in the future. The device must not change its
179 * configuration after that point.
180 */
181#define VHOST_VDPA_SUSPEND _IO(VHOST_VIRTIO, 0x7D)
182
174#endif183#endif
include/uapi/linux/vhost_types.h+2−0
@@ -161,5 +161,7 @@ struct vhost_vdpa_iova_range { · 160 unmodified lines
161 * message161 * message
162 */162 */
163#define VHOST_BACKEND_F_IOTLB_ASID 0x3163#define VHOST_BACKEND_F_IOTLB_ASID 0x3
164/* Device can be suspended */
165#define VHOST_BACKEND_F_SUSPEND 0x4
164 166
165#endif167#endif
include/uapi/linux/virtio_config.h+6−1
@@ -52,7 +52,7 @@ · 51 unmodified lines
52 * rest are per-device feature bits.52 * rest are per-device feature bits.
53 */53 */
54#define VIRTIO_TRANSPORT_F_START 2854#define VIRTIO_TRANSPORT_F_START 28
55#define VIRTIO_TRANSPORT_F_END 3855#define VIRTIO_TRANSPORT_F_END 41
56 56
57#ifndef VIRTIO_CONFIG_NO_LEGACY57#ifndef VIRTIO_CONFIG_NO_LEGACY
58/* Do we get callbacks when the ring is completely used, even if we've58/* Do we get callbacks when the ring is completely used, even if we've
@@ -98,4 +98,9 @@ · 39 unmodified lines
98 * Does the device support Single Root I/O Virtualization?98 * Does the device support Single Root I/O Virtualization?
99 */99 */
100#define VIRTIO_F_SR_IOV 37100#define VIRTIO_F_SR_IOV 37
101
102/*
103 * This feature indicates that the driver can reset a queue individually.
104 */
105#define VIRTIO_F_RING_RESET 40
101#endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */106#endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */
include/uapi/linux/virtio_net.h+33−1
@@ -56,7 +56,7 @@ · 55 unmodified lines
56#define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow56#define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow
57 * Steering */57 * Steering */
58#define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */58#define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */
59 59#define VIRTIO_NET_F_NOTF_COAL 53 /* Guest can handle notifications coalescing */
60#define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */60#define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */
61#define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */61#define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */
62#define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */62#define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */
@@ -355,4 +355,36 @@ struct virtio_net_hash_config { · 292 unmodified lines
355#define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5355#define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5
356#define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0356#define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
357 357
358/*
359 * Control notifications coalescing.
360 *
361 * Request the device to change the notifications coalescing parameters.
362 *
363 * Available with the VIRTIO_NET_F_NOTF_COAL feature bit.
364 */
365#define VIRTIO_NET_CTRL_NOTF_COAL 6
366/*
367 * Set the tx-usecs/tx-max-packets patameters.
368 * tx-usecs - Maximum number of usecs to delay a TX notification.
369 * tx-max-packets - Maximum number of packets to send before a TX notification.
370 */
371struct virtio_net_ctrl_coal_tx {
372 __le32 tx_max_packets;
373 __le32 tx_usecs;
374};
375
376#define VIRTIO_NET_CTRL_NOTF_COAL_TX_SET 0
377
378/*
379 * Set the rx-usecs/rx-max-packets patameters.
380 * rx-usecs - Maximum number of usecs to delay a RX notification.
381 * rx-max-frames - Maximum number of packets to receive before a RX notification.
382 */
383struct virtio_net_ctrl_coal_rx {
384 __le32 rx_max_packets;
385 __le32 rx_usecs;
386};
387
388#define VIRTIO_NET_CTRL_NOTF_COAL_RX_SET 1
389
358#endif /* _UAPI_LINUX_VIRTIO_NET_H */390#endif /* _UAPI_LINUX_VIRTIO_NET_H */
include/uapi/linux/virtio_pci.h+2−0
@@ -202,6 +202,8 @@ struct virtio_pci_cfg_cap { · 201 unmodified lines
202#define VIRTIO_PCI_COMMON_Q_AVAILHI 44202#define VIRTIO_PCI_COMMON_Q_AVAILHI 44
203#define VIRTIO_PCI_COMMON_Q_USEDLO 48203#define VIRTIO_PCI_COMMON_Q_USEDLO 48
204#define VIRTIO_PCI_COMMON_Q_USEDHI 52204#define VIRTIO_PCI_COMMON_Q_USEDHI 52
205#define VIRTIO_PCI_COMMON_Q_NDATA 56
206#define VIRTIO_PCI_COMMON_Q_RESET 58
205 207
206#endif /* VIRTIO_PCI_NO_MODERN */208#endif /* VIRTIO_PCI_NO_MODERN */
207 209
include/uapi/linux/virtio_ring.h+11−5
@@ -93,15 +93,21 @@ · 92 unmodified lines
93#define VRING_USED_ALIGN_SIZE 493#define VRING_USED_ALIGN_SIZE 4
94#define VRING_DESC_ALIGN_SIZE 1694#define VRING_DESC_ALIGN_SIZE 16
95 95
96/* Virtio ring descriptors: 16 bytes. These can chain together via "next". */96/**
97 * struct vring_desc - Virtio ring descriptors,
98 * 16 bytes long. These can chain together via @next.
99 *
100 * @addr: buffer address (guest-physical)
101 * @len: buffer length
102 * @flags: descriptor flags
103 * @next: index of the next descriptor in the chain,
104 * if the VRING_DESC_F_NEXT flag is set. We chain unused
105 * descriptors via this, too.
106 */
97struct vring_desc {107struct vring_desc {
98 /* Address (guest-physical). */
99 __virtio64 addr;108 __virtio64 addr;
100 /* Length. */
101 __virtio32 len;109 __virtio32 len;
102 /* The flags as indicated above. */
103 __virtio16 flags;110 __virtio16 flags;
104 /* We chain unused descriptors via this, too */
105 __virtio16 next;111 __virtio16 next;
106};112};
107 113
include/uapi/linux/xfrm.h+1−1
@@ -296,7 +296,7 @@ enum xfrm_attr_type_t { · 295 unmodified lines
296 XFRMA_ETIMER_THRESH,296 XFRMA_ETIMER_THRESH,
297 XFRMA_SRCADDR, /* xfrm_address_t */297 XFRMA_SRCADDR, /* xfrm_address_t */
298 XFRMA_COADDR, /* xfrm_address_t */298 XFRMA_COADDR, /* xfrm_address_t */
299 XFRMA_LASTUSED, /* unsigned long */299 XFRMA_LASTUSED, /* __u64 */
300 XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */300 XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */
301 XFRMA_MIGRATE,301 XFRMA_MIGRATE,
302 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */302 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */