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+
26+struct 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+
34+struct 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
420420 #define NT_S390_GS_CB 0x30b /* s390 guarded storage registers */
421421 #define NT_S390_GS_BC 0x30c /* s390 guarded storage broadcast control block */
422422 #define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation */
423+#define NT_S390_PV_CPU_DATA 0x30e /* s390 protvirt cpu dump data */
423424 #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */
424425 #define NT_ARM_TLS 0x401 /* ARM TLS register */
425426 #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */
include/uapi/linux/f2fs.h+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313 #define F2FS_IOC_COMMIT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 2)
1414 #define F2FS_IOC_START_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 3)
1515 #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)
1717 #define F2FS_IOC_GARBAGE_COLLECT _IOW(F2FS_IOCTL_MAGIC, 6, __u32)
1818 #define F2FS_IOC_WRITE_CHECKPOINT _IO(F2FS_IOCTL_MAGIC, 7)
1919 #define F2FS_IOC_DEFRAGMENT _IOWR(F2FS_IOCTL_MAGIC, 8, \
include/uapi/linux/genetlink.h+3−2
@@ -87,6 +87,8 @@ enum { · 86 unmodified lines
8787 __CTRL_ATTR_MCAST_GRP_MAX,
8888 };
8989
90+#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
91+
9092 enum {
9193 CTRL_ATTR_POLICY_UNSPEC,
9294 CTRL_ATTR_POLICY_DO,
@@ -96,7 +98,6 @@ enum { · 3 unmodified lines
9698 CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1
9799 };
98100
99−#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
100−
101+#define CTRL_ATTR_POLICY_MAX (__CTRL_ATTR_POLICY_DUMP_MAX - 1)
101102
102103 #endif /* _UAPI__LINUX_GENERIC_NETLINK_H */
include/uapi/linux/idxd.h+3−3
@@ -89,14 +89,14 @@ enum iax_opcode { · 88 unmodified lines
8989 IAX_OPCODE_CRC64,
9090 IAX_OPCODE_ZERO_DECOMP_32 = 0x48,
9191 IAX_OPCODE_ZERO_DECOMP_16,
92− IAX_OPCODE_DECOMP_32 = 0x4c,
93− IAX_OPCODE_DECOMP_16,
92+ IAX_OPCODE_ZERO_COMP_32 = 0x4c,
93+ IAX_OPCODE_ZERO_COMP_16,
9494 IAX_OPCODE_SCAN = 0x50,
9595 IAX_OPCODE_SET_MEMBER,
9696 IAX_OPCODE_EXTRACT,
9797 IAX_OPCODE_SELECT,
9898 IAX_OPCODE_RLE_BURST,
99− IAX_OPCDE_FIND_UNIQUE,
99+ IAX_OPCODE_FIND_UNIQUE,
100100 IAX_OPCODE_EXPAND,
101101 };
102102
include/uapi/linux/io_uring.h+8−0
@@ -12,6 +12,10 @@ · 11 unmodified lines
1212 #include <linux/types.h>
1313 #include <linux/time_types.h>
1414
15+#ifdef __cplusplus
16+extern "C" {
17+#endif
18+
1519 /*
1620 * IO submission data structure (Submission Queue Entry)
1721 */
@@ -661,4 +665,8 @@ struct io_uring_recvmsg_out { · 643 unmodified lines
661665 __u32 flags;
662666 };
663667
668+#ifdef __cplusplus
669+}
670+#endif
671+
664672 #endif
include/uapi/linux/netfilter_ipv6/ip6t_LOG.h+1−1
@@ -17,4 +17,4 @@ struct ip6t_log_info { · 16 unmodified lines
1717 char prefix[30];
1818 };
1919
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
737737 #define PCI_EXT_CAP_ID_DVSEC 0x23 /* Designated Vendor-Specific */
738738 #define PCI_EXT_CAP_ID_DLF 0x25 /* Data Link Feature */
739739 #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_16GT
740+#define PCI_EXT_CAP_ID_DOE 0x2E /* Data Object Exchange */
741+#define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_DOE
741742
742743 #define PCI_EXT_CAP_DSN_SIZEOF 12
743744 #define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40
@@ -1103,4 +1104,30 @@ · 359 unmodified lines
11031104 #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_MASK 0x000000F0
11041105 #define PCI_PL_16GT_LE_CTRL_USP_TX_PRESET_SHIFT 4
11051106
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+
11061133 #endif /* LINUX_PCI_REGS_H */
include/uapi/linux/serial.h+18−2
@@ -126,10 +126,26 @@ struct serial_rs485 { · 125 unmodified lines
126126 #define SER_RS485_TERMINATE_BUS (1 << 5) /* Enable bus
127127 termination
128128 (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+
129135 __u32 delay_rts_before_send; /* Delay before send (milliseconds) */
130136 __u32 delay_rts_after_send; /* Delay after send (milliseconds) */
131− __u32 padding[5]; /* Memory is cheap, new structs
132− are a royal PITA .. */
137+
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+ };
133149 };
134150
135151 /*
include/uapi/linux/serial_core.h+0−4
@@ -124,10 +124,6 @@ · 123 unmodified lines
124124 /* TXX9 type number */
125125 #define PORT_TXX9 64
126126
127−/* NEC VR4100 series SIU/DSIU */
128−#define PORT_VR41XX_SIU 65
129−#define PORT_VR41XX_DSIU 66
130−
131127 /* Samsung S3C2400 SoC */
132128 #define PORT_S3C2400 67
133129
include/uapi/linux/serial_reg.h+2−2
@@ -139,7 +139,7 @@ · 138 unmodified lines
139139 #define UART_LSR_PE 0x04 /* Parity error indicator */
140140 #define UART_LSR_OE 0x02 /* Overrun error indicator */
141141 #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)
143143
144144 #define UART_MSR 6 /* In: Modem Status Register */
145145 #define UART_MSR_DCD 0x80 /* Data Carrier Detect */
@@ -150,7 +150,7 @@ · 4 unmodified lines
150150 #define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */
151151 #define UART_MSR_DDSR 0x02 /* Delta DSR */
152152 #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)
154154
155155 #define UART_SCR 7 /* I/O: Scratch Register */
156156
include/uapi/linux/swab.h+3−3
@@ -102,7 +102,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) · 101 unmodified lines
102102 #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
103103 #else
104104 #define __swab16(x) \
105− (__builtin_constant_p((__u16)(x)) ? \
105+ (__u16)(__builtin_constant_p(x) ? \
106106 ___constant_swab16(x) : \
107107 __fswab16(x))
108108 #endif
@@ -115,7 +115,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) · 6 unmodified lines
115115 #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
116116 #else
117117 #define __swab32(x) \
118− (__builtin_constant_p((__u32)(x)) ? \
118+ (__u32)(__builtin_constant_p(x) ? \
119119 ___constant_swab32(x) : \
120120 __fswab32(x))
121121 #endif
@@ -128,7 +128,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) · 6 unmodified lines
128128 #define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
129129 #else
130130 #define __swab64(x) \
131− (__builtin_constant_p((__u64)(x)) ? \
131+ (__u64)(__builtin_constant_p(x) ? \
132132 ___constant_swab64(x) : \
133133 __fswab64(x))
134134 #endif
include/uapi/linux/ublk_cmd.h+73−7
@@ -15,6 +15,8 @@ · 14 unmodified lines
1515 #define UBLK_CMD_DEL_DEV 0x05
1616 #define UBLK_CMD_START_DEV 0x06
1717 #define UBLK_CMD_STOP_DEV 0x07
18+#define UBLK_CMD_SET_PARAMS 0x08
19+#define UBLK_CMD_GET_PARAMS 0x09
1820
1921 /*
2022 * IO commands, issued by ublk server, and handled by ublk driver.
@@ -28,12 +30,21 @@ · 7 unmodified lines
2830 * this IO request, request's handling result is committed to ublk
2931 * driver, meantime FETCH_REQ is piggyback, and FETCH_REQ has to be
3032 * 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.
3140 */
3241 #define UBLK_IO_FETCH_REQ 0x20
3342 #define UBLK_IO_COMMIT_AND_FETCH_REQ 0x21
43+#define UBLK_IO_NEED_GET_DATA 0x22
3444
3545 /* only ABORT means that no re-fetch */
3646 #define UBLK_IO_RES_OK 0
47+#define UBLK_IO_RES_NEED_GET_DATA 1
3748 #define UBLK_IO_RES_ABORT (-ENODEV)
3849
3950 #define UBLKSRV_CMD_BUF_OFFSET 0
@@ -54,6 +65,15 @@ · 14 unmodified lines
5465 */
5566 #define UBLK_F_URING_CMD_COMP_IN_TASK (1ULL << 1)
5667
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+
5777 /* device state */
5878 #define UBLK_S_DEV_DEAD 0
5979 #define UBLK_S_DEV_LIVE 1
@@ -78,22 +98,23 @@ struct ublksrv_ctrl_cmd { · 18 unmodified lines
7898 struct ublksrv_ctrl_dev_info {
7999 __u16 nr_hw_queues;
80100 __u16 queue_depth;
81− __u16 block_size;
82101 __u16 state;
102+ __u16 pad0;
83103
84− __u32 rq_max_blocks;
104+ __u32 max_io_buf_bytes;
85105 __u32 dev_id;
86106
87− __u64 dev_blocks;
88−
89107 __s32 ublksrv_pid;
90− __s32 reserved0;
108+ __u32 pad1;
109+
91110 __u64 flags;
92− __u64 flags_reserved;
93111
94112 /* For ublksrv internal use, invisible to ublk driver */
95113 __u64 ublksrv_flags;
96− __u64 reserved1[9];
114+
115+ __u64 reserved0;
116+ __u64 reserved1;
117+ __u64 reserved2;
97118 };
98119
99120 #define UBLK_IO_OP_READ 0
@@ -158,4 +179,49 @@ struct ublksrv_io_cmd { · 58 unmodified lines
158179 __u64 addr;
159180 };
160181
182+struct 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+
200+struct 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+
211+struct 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+
161227 #endif
include/uapi/linux/vduse.h+47−0
@@ -210,6 +210,53 @@ struct vduse_vq_eventfd { · 209 unmodified lines
210210 */
211211 #define VDUSE_VQ_INJECT_IRQ _IOW(VDUSE_BASE, 0x17, __u32)
212212
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+ */
223+struct 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+ */
246+struct 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+
213260 /* The control messages definition for read(2)/write(2) on /dev/vduse/$NAME */
214261
215262 /**
include/uapi/linux/vhost.h+9−0
@@ -171,4 +171,13 @@ · 170 unmodified lines
171171 #define VHOST_VDPA_SET_GROUP_ASID _IOW(VHOST_VIRTIO, 0x7C, \
172172 struct vhost_vring_state)
173173
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+
174183 #endif
include/uapi/linux/vhost_types.h+2−0
@@ -161,5 +161,7 @@ struct vhost_vdpa_iova_range { · 160 unmodified lines
161161 * message
162162 */
163163 #define VHOST_BACKEND_F_IOTLB_ASID 0x3
164+/* Device can be suspended */
165+#define VHOST_BACKEND_F_SUSPEND 0x4
164166
165167 #endif
include/uapi/linux/virtio_config.h+6−1
@@ -52,7 +52,7 @@ · 51 unmodified lines
5252 * rest are per-device feature bits.
5353 */
5454 #define VIRTIO_TRANSPORT_F_START 28
55−#define VIRTIO_TRANSPORT_F_END 38
55+#define VIRTIO_TRANSPORT_F_END 41
5656
5757 #ifndef VIRTIO_CONFIG_NO_LEGACY
5858 /* Do we get callbacks when the ring is completely used, even if we've
@@ -98,4 +98,9 @@ · 39 unmodified lines
9898 * Does the device support Single Root I/O Virtualization?
9999 */
100100 #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
101106 #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */
include/uapi/linux/virtio_net.h+33−1
@@ -56,7 +56,7 @@ · 55 unmodified lines
5656 #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow
5757 * Steering */
5858 #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 */
6060 #define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */
6161 #define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */
6262 #define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */
@@ -355,4 +355,36 @@ struct virtio_net_hash_config { · 292 unmodified lines
355355 #define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5
356356 #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
357357
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+ */
371+struct 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+ */
383+struct 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+
358390 #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
202202 #define VIRTIO_PCI_COMMON_Q_AVAILHI 44
203203 #define VIRTIO_PCI_COMMON_Q_USEDLO 48
204204 #define VIRTIO_PCI_COMMON_Q_USEDHI 52
205+#define VIRTIO_PCI_COMMON_Q_NDATA 56
206+#define VIRTIO_PCI_COMMON_Q_RESET 58
205207
206208 #endif /* VIRTIO_PCI_NO_MODERN */
207209
include/uapi/linux/virtio_ring.h+11−5
@@ -93,15 +93,21 @@ · 92 unmodified lines
9393 #define VRING_USED_ALIGN_SIZE 4
9494 #define VRING_DESC_ALIGN_SIZE 16
9595
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+ */
97107 struct vring_desc {
98− /* Address (guest-physical). */
99108 __virtio64 addr;
100− /* Length. */
101109 __virtio32 len;
102− /* The flags as indicated above. */
103110 __virtio16 flags;
104− /* We chain unused descriptors via this, too */
105111 __virtio16 next;
106112 };
107113
include/uapi/linux/xfrm.h+1−1
@@ -296,7 +296,7 @@ enum xfrm_attr_type_t { · 295 unmodified lines
296296 XFRMA_ETIMER_THRESH,
297297 XFRMA_SRCADDR, /* xfrm_address_t */
298298 XFRMA_COADDR, /* xfrm_address_t */
299− XFRMA_LASTUSED, /* unsigned long */
299+ XFRMA_LASTUSED, /* __u64 */
300300 XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */
301301 XFRMA_MIGRATE,
302302 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */