@zigc/lib 0.16.0 → 0.17.0-dev.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/c/fcntl.zig +6 -1
  2. package/c/inttypes.zig +0 -10
  3. package/c/math.zig +46 -122
  4. package/c/pthread.zig +57 -0
  5. package/c/search.zig +1 -27
  6. package/c/stdlib/drand48.zig +0 -57
  7. package/c/stdlib.zig +0 -100
  8. package/c/string.zig +20 -7
  9. package/c/strings.zig +0 -38
  10. package/c/unistd.zig +27 -26
  11. package/c/wchar.zig +10 -0
  12. package/c.zig +2 -2
  13. package/compiler/aro/aro/CodeGen.zig +5 -6
  14. package/compiler/aro/aro/Compilation.zig +17 -14
  15. package/compiler/aro/aro/Driver.zig +14 -13
  16. package/compiler/aro/aro/Parser.zig +20 -15
  17. package/compiler/aro/aro/Pragma.zig +3 -2
  18. package/compiler/aro/aro/Preprocessor.zig +9 -6
  19. package/compiler/aro/aro/pragmas/message.zig +3 -2
  20. package/compiler/aro/aro/text_literal.zig +3 -2
  21. package/compiler/aro/assembly_backend/x86_64.zig +4 -4
  22. package/compiler/build_runner.zig +0 -2
  23. package/compiler/reduce/Walk.zig +7 -7
  24. package/compiler/test_runner.zig +2 -2
  25. package/compiler/translate-c/Translator.zig +6 -2
  26. package/compiler/translate-c/main.zig +1 -1
  27. package/compiler_rt/cos.zig +0 -2
  28. package/compiler_rt/divmodei4.zig +40 -17
  29. package/compiler_rt/exp.zig +1 -6
  30. package/compiler_rt/exp2.zig +1 -6
  31. package/compiler_rt/exp_f128.zig +377 -0
  32. package/compiler_rt/fabs.zig +0 -2
  33. package/compiler_rt/fma.zig +0 -2
  34. package/compiler_rt/fmax.zig +0 -2
  35. package/compiler_rt/fmin.zig +0 -2
  36. package/compiler_rt/fmod.zig +0 -2
  37. package/compiler_rt/limb64.zig +876 -15
  38. package/compiler_rt/log.zig +0 -2
  39. package/compiler_rt/log10.zig +0 -2
  40. package/compiler_rt/log2.zig +0 -2
  41. package/compiler_rt/mulXi3.zig +1 -1
  42. package/compiler_rt/round.zig +0 -2
  43. package/compiler_rt/sin.zig +0 -2
  44. package/compiler_rt/sincos.zig +0 -2
  45. package/compiler_rt/sqrt.zig +0 -2
  46. package/compiler_rt/ssp.zig +1 -1
  47. package/compiler_rt/tan.zig +0 -2
  48. package/compiler_rt/trunc.zig +0 -2
  49. package/compiler_rt/udivmodei4.zig +28 -0
  50. package/fuzzer.zig +2 -0
  51. package/libc/include/aarch64-linux-any/asm/hwcap.h +1 -0
  52. package/libc/include/aarch64-linux-any/asm/unistd_64.h +1 -0
  53. package/libc/include/any-linux-any/asm-generic/errno.h +2 -0
  54. package/libc/include/any-linux-any/asm-generic/unistd.h +4 -1
  55. package/libc/include/any-linux-any/drm/amdgpu_drm.h +20 -6
  56. package/libc/include/any-linux-any/drm/amdxdna_accel.h +8 -0
  57. package/libc/include/any-linux-any/drm/drm_fourcc.h +6 -6
  58. package/libc/include/any-linux-any/drm/panfrost_drm.h +75 -1
  59. package/libc/include/any-linux-any/drm/panthor_drm.h +154 -3
  60. package/libc/include/any-linux-any/drm/rocket_accel.h +74 -24
  61. package/libc/include/any-linux-any/drm/xe_drm.h +89 -6
  62. package/libc/include/any-linux-any/linux/android/binder.h +1 -1
  63. package/libc/include/any-linux-any/linux/bpf.h +28 -0
  64. package/libc/include/any-linux-any/linux/btrfs.h +1 -0
  65. package/libc/include/any-linux-any/linux/btrfs_tree.h +32 -2
  66. package/libc/include/any-linux-any/linux/dma-buf.h +1 -0
  67. package/libc/include/any-linux-any/linux/dpll.h +1 -0
  68. package/libc/include/any-linux-any/linux/elf.h +2 -0
  69. package/libc/include/any-linux-any/linux/ethtool.h +21 -5
  70. package/libc/include/any-linux-any/linux/fs.h +1 -0
  71. package/libc/include/any-linux-any/linux/hyperv.h +1 -1
  72. package/libc/include/any-linux-any/linux/idxd.h +134 -134
  73. package/libc/include/any-linux-any/linux/if_alg.h +1 -1
  74. package/libc/include/any-linux-any/linux/if_link.h +1 -0
  75. package/libc/include/any-linux-any/linux/input-event-codes.h +4 -0
  76. package/libc/include/any-linux-any/linux/io_uring/bpf_filter.h +68 -0
  77. package/libc/include/any-linux-any/linux/io_uring/query.h +5 -1
  78. package/libc/include/any-linux-any/linux/io_uring.h +33 -2
  79. package/libc/include/any-linux-any/linux/iommufd.h +39 -0
  80. package/libc/include/any-linux-any/linux/kfd_ioctl.h +13 -3
  81. package/libc/include/any-linux-any/linux/kfd_sysfs.h +2 -1
  82. package/libc/include/any-linux-any/linux/kvm.h +30 -6
  83. package/libc/include/any-linux-any/linux/landlock.h +22 -8
  84. package/libc/include/any-linux-any/linux/magic.h +1 -0
  85. package/libc/include/any-linux-any/linux/mempolicy.h +3 -0
  86. package/libc/include/any-linux-any/linux/mount.h +11 -2
  87. package/libc/include/any-linux-any/linux/mptcp_pm.h +1 -1
  88. package/libc/include/any-linux-any/linux/mshv.h +2 -0
  89. package/libc/include/any-linux-any/linux/netfilter_bridge.h +5 -4
  90. package/libc/include/any-linux-any/linux/netfilter_ipv4.h +4 -5
  91. package/libc/include/any-linux-any/linux/netfilter_ipv6.h +3 -4
  92. package/libc/include/any-linux-any/linux/nfs.h +1 -1
  93. package/libc/include/any-linux-any/linux/nfsd_netlink.h +1 -0
  94. package/libc/include/any-linux-any/linux/nilfs2_api.h +2 -2
  95. package/libc/include/any-linux-any/linux/nilfs2_ondisk.h +97 -66
  96. package/libc/include/any-linux-any/linux/nl80211.h +104 -3
  97. package/libc/include/any-linux-any/linux/pci.h +7 -0
  98. package/libc/include/any-linux-any/linux/pci_regs.h +65 -6
  99. package/libc/include/any-linux-any/linux/pcitest.h +1 -0
  100. package/libc/include/any-linux-any/linux/perf_event.h +24 -3
  101. package/libc/include/any-linux-any/linux/pkt_sched.h +1 -0
  102. package/libc/include/any-linux-any/linux/prctl.h +30 -0
  103. package/libc/include/any-linux-any/linux/rseq.h +62 -5
  104. package/libc/include/any-linux-any/linux/shm.h +0 -1
  105. package/libc/include/any-linux-any/linux/stddef.h +4 -0
  106. package/libc/include/any-linux-any/linux/sysctl.h +1 -2
  107. package/libc/include/any-linux-any/linux/taskstats.h +12 -1
  108. package/libc/include/any-linux-any/linux/tcp.h +23 -3
  109. package/libc/include/any-linux-any/linux/typelimits.h +8 -0
  110. package/libc/include/any-linux-any/linux/ublk_cmd.h +120 -1
  111. package/libc/include/any-linux-any/linux/v4l2-controls.h +63 -0
  112. package/libc/include/any-linux-any/linux/vbox_vmmdev_types.h +2 -2
  113. package/libc/include/any-linux-any/linux/vduse.h +80 -5
  114. package/libc/include/any-linux-any/linux/version.h +3 -3
  115. package/libc/include/any-linux-any/linux/vfio.h +4 -0
  116. package/libc/include/any-linux-any/linux/videodev2.h +3 -0
  117. package/libc/include/any-linux-any/linux/virtio_ring.h +1 -2
  118. package/libc/include/any-linux-any/linux/vmclock-abi.h +20 -0
  119. package/libc/include/any-linux-any/rdma/bnxt_re-abi.h +16 -0
  120. package/libc/include/any-linux-any/rdma/ib_user_ioctl_cmds.h +16 -0
  121. package/libc/include/any-linux-any/rdma/mana-abi.h +3 -0
  122. package/libc/include/any-linux-any/scsi/scsi_bsg_ufs.h +8 -9
  123. package/libc/include/any-linux-any/sound/sof/tokens.h +6 -0
  124. package/libc/include/arc-linux-any/asm/swab.h +0 -63
  125. package/libc/include/arc-linux-any/asm/unistd_32.h +1 -0
  126. package/libc/include/arm-linux-any/asm/ptrace.h +0 -9
  127. package/libc/include/arm-linux-any/asm/unistd-eabi.h +1 -0
  128. package/libc/include/arm-linux-any/asm/unistd-oabi.h +1 -0
  129. package/libc/include/csky-linux-any/asm/unistd_32.h +1 -0
  130. package/libc/include/hexagon-linux-any/asm/unistd_32.h +1 -0
  131. package/libc/include/loongarch-linux-any/asm/hwcap.h +1 -0
  132. package/libc/include/loongarch-linux-any/asm/kvm.h +1 -0
  133. package/libc/include/loongarch-linux-any/asm/kvm_para.h +1 -0
  134. package/libc/include/loongarch-linux-any/asm/unistd_32.h +2 -0
  135. package/libc/include/loongarch-linux-any/asm/unistd_64.h +2 -0
  136. package/libc/include/m68k-linux-any/asm/unistd_32.h +1 -0
  137. package/libc/include/mips-linux-any/asm/errno.h +2 -0
  138. package/libc/include/mips-linux-any/asm/unistd_n32.h +1 -0
  139. package/libc/include/mips-linux-any/asm/unistd_n64.h +1 -0
  140. package/libc/include/mips-linux-any/asm/unistd_o32.h +1 -0
  141. package/libc/include/powerpc-linux-any/asm/unistd_32.h +1 -0
  142. package/libc/include/powerpc-linux-any/asm/unistd_64.h +1 -0
  143. package/libc/include/riscv-linux-any/asm/hwprobe.h +4 -0
  144. package/libc/include/riscv-linux-any/asm/kvm.h +3 -0
  145. package/libc/include/riscv-linux-any/asm/ptrace.h +37 -0
  146. package/libc/include/riscv-linux-any/asm/sigcontext.h +1 -0
  147. package/libc/include/riscv-linux-any/asm/unistd_32.h +1 -0
  148. package/libc/include/riscv-linux-any/asm/unistd_64.h +1 -0
  149. package/libc/include/s390x-linux-any/asm/unistd_64.h +1 -0
  150. package/libc/include/sparc-linux-any/asm/errno.h +2 -0
  151. package/libc/include/sparc-linux-any/asm/ioctls.h +4 -4
  152. package/libc/include/sparc-linux-any/asm/unistd_32.h +2 -0
  153. package/libc/include/sparc-linux-any/asm/unistd_64.h +2 -0
  154. package/libc/include/x86-linux-any/asm/auxvec.h +0 -4
  155. package/libc/include/x86-linux-any/asm/kvm.h +13 -8
  156. package/libc/include/x86-linux-any/asm/svm.h +16 -16
  157. package/libc/include/x86-linux-any/asm/unistd_32.h +1 -0
  158. package/libc/include/x86-linux-any/asm/unistd_64.h +1 -0
  159. package/libc/include/x86-linux-any/asm/unistd_x32.h +1 -0
  160. package/libc/include/xtensa-linux-any/asm/unistd_32.h +1 -0
  161. package/libc/musl/arch/mipsn32/syscall_arch.h +35 -32
  162. package/package.json +1 -1
  163. package/std/Build/Cache.zig +6 -6
  164. package/std/Build/Step/Compile.zig +0 -1
  165. package/std/Build/Step/Run.zig +2 -2
  166. package/std/Build/Step.zig +2 -4
  167. package/std/Build/WebServer.zig +2 -2
  168. package/std/Build.zig +0 -3
  169. package/std/Io/Dir.zig +7 -2
  170. package/std/Io/Dispatch.zig +3 -13
  171. package/std/Io/File/Writer.zig +8 -6
  172. package/std/Io/Reader.zig +8 -9
  173. package/std/Io/Semaphore.zig +112 -17
  174. package/std/Io/Terminal.zig +1 -1
  175. package/std/Io/Threaded.zig +171 -37
  176. package/std/Io/Uring.zig +13 -15
  177. package/std/Io/Writer.zig +46 -42
  178. package/std/Io/net.zig +11 -11
  179. package/std/Io.zig +90 -26
  180. package/std/SemanticVersion.zig +1 -1
  181. package/std/Target/Query.zig +2 -2
  182. package/std/Target.zig +50 -5
  183. package/std/array_hash_map.zig +9 -18
  184. package/std/builtin.zig +4 -0
  185. package/std/c/haiku.zig +3 -0
  186. package/std/c/serenity.zig +1 -6
  187. package/std/c.zig +89 -7
  188. package/std/compress/flate/Decompress.zig +2 -3
  189. package/std/compress/zstd/Decompress.zig +2 -4
  190. package/std/crypto/Certificate.zig +13 -1
  191. package/std/crypto/ascon.zig +75 -33
  192. package/std/crypto/codecs/asn1/Oid.zig +12 -1
  193. package/std/crypto/codecs/base64_hex_ct.zig +2 -4
  194. package/std/crypto/ml_kem.zig +2 -9
  195. package/std/crypto/tls/Client.zig +79 -4
  196. package/std/crypto/tls.zig +1 -1
  197. package/std/crypto.zig +1 -0
  198. package/std/debug/Pdb.zig +1 -1
  199. package/std/debug.zig +4 -3
  200. package/std/fmt.zig +8 -3
  201. package/std/fs/path.zig +6 -4
  202. package/std/heap/BufferFirstAllocator.zig +165 -0
  203. package/std/heap.zig +2 -126
  204. package/std/http/Client.zig +21 -24
  205. package/std/http.zig +3 -4
  206. package/std/json/Scanner.zig +2 -2
  207. package/std/os/emscripten.zig +1 -1
  208. package/std/os/linux/IoUring.zig +2 -0
  209. package/std/os/linux/aarch64.zig +41 -12
  210. package/std/os/linux/arc.zig +173 -0
  211. package/std/os/linux/arm.zig +41 -12
  212. package/std/os/linux/hexagon.zig +33 -11
  213. package/std/os/linux/loongarch32.zig +41 -13
  214. package/std/os/linux/loongarch64.zig +41 -12
  215. package/std/os/linux/m68k.zig +41 -13
  216. package/std/os/linux/mips.zig +67 -36
  217. package/std/os/linux/mips64.zig +60 -29
  218. package/std/os/linux/mipsn32.zig +60 -29
  219. package/std/os/linux/or1k.zig +41 -12
  220. package/std/os/linux/powerpc.zig +41 -12
  221. package/std/os/linux/powerpc64.zig +41 -12
  222. package/std/os/linux/riscv32.zig +41 -12
  223. package/std/os/linux/riscv64.zig +41 -12
  224. package/std/os/linux/s390x.zig +44 -7
  225. package/std/os/linux/sparc64.zig +83 -52
  226. package/std/os/linux/syscalls.zig +26 -1
  227. package/std/os/linux/thumb.zig +52 -36
  228. package/std/os/linux/x32.zig +41 -12
  229. package/std/os/linux/x86.zig +42 -13
  230. package/std/os/linux/x86_64.zig +41 -12
  231. package/std/os/linux.zig +412 -436
  232. package/std/os/uefi/tables/boot_services.zig +9 -8
  233. package/std/os.zig +41 -0
  234. package/std/process.zig +1 -1
  235. package/std/sort.zig +3 -3
  236. package/std/zig/Ast/Render.zig +3 -3
  237. package/std/zig/AstGen.zig +44 -98
  238. package/std/zig/AstRlAnnotate.zig +0 -11
  239. package/std/zig/BuiltinFn.zig +0 -32
  240. package/std/zig/LibCInstallation.zig +4 -3
  241. package/std/zig/Parse.zig +7 -7
  242. package/std/zig/WindowsSdk.zig +13 -13
  243. package/std/zig/Zir.zig +50 -63
  244. package/std/zig/ZonGen.zig +6 -5
  245. package/std/zig/llvm/Builder.zig +12 -12
  246. package/std/zig.zig +1 -10
  247. package/std/zip.zig +5 -5
  248. package/zig.h +340 -1
  249. package/libc/include/hexagon-linux-any/asm/signal.h +0 -29
  250. package/libc/include/s390x-linux-any/asm/tape390.h +0 -103
  251. package/libc/mingw/math/fdiml.c +0 -24
  252. package/libc/mingw/winpthreads/spinlock.c +0 -82
  253. package/libc/musl/src/linux/tee.c +0 -8
  254. package/libc/musl/src/math/fdimf.c +0 -10
  255. package/libc/musl/src/math/fdiml.c +0 -18
  256. package/libc/musl/src/string/strdup.c +0 -10
  257. package/libc/musl/src/string/strndup.c +0 -12
  258. package/libc/musl/src/string/wcsdup.c +0 -10
  259. package/libc/musl/src/thread/pthread_spin_destroy.c +0 -6
  260. package/libc/musl/src/thread/pthread_spin_init.c +0 -6
  261. package/libc/musl/src/thread/pthread_spin_lock.c +0 -8
  262. package/libc/musl/src/thread/pthread_spin_trylock.c +0 -7
  263. package/libc/musl/src/thread/pthread_spin_unlock.c +0 -7
  264. package/libc/musl/src/unistd/dup2.c +0 -20
  265. package/libc/musl/src/unistd/dup3.c +0 -26
  266. package/libc/wasi/thread-stub/pthread_spin_lock.c +0 -8
  267. package/libc/wasi/thread-stub/pthread_spin_trylock.c +0 -8
  268. package/libc/wasi/thread-stub/pthread_spin_unlock.c +0 -7
@@ -226,6 +226,24 @@ enum tcp_ca_state {
226
226
  #define TCPF_CA_Loss (1<<TCP_CA_Loss)
227
227
  };
228
228
 
229
+ /* Values for tcpi_ecn_mode after negotiation */
230
+ #define TCPI_ECN_MODE_DISABLED 0x0
231
+ #define TCPI_ECN_MODE_RFC3168 0x1
232
+ #define TCPI_ECN_MODE_ACCECN 0x2
233
+ #define TCPI_ECN_MODE_PENDING 0x3
234
+
235
+ /* Values for accecn_opt_seen */
236
+ #define TCP_ACCECN_OPT_NOT_SEEN 0x0
237
+ #define TCP_ACCECN_OPT_EMPTY_SEEN 0x1
238
+ #define TCP_ACCECN_OPT_COUNTER_SEEN 0x2
239
+ #define TCP_ACCECN_OPT_FAIL_SEEN 0x3
240
+
241
+ /* Values for accecn_fail_mode */
242
+ #define TCP_ACCECN_ACE_FAIL_SEND BIT(0)
243
+ #define TCP_ACCECN_ACE_FAIL_RECV BIT(1)
244
+ #define TCP_ACCECN_OPT_FAIL_SEND BIT(2)
245
+ #define TCP_ACCECN_OPT_FAIL_RECV BIT(3)
246
+
229
247
  struct tcp_info {
230
248
  __u8 tcpi_state;
231
249
  __u8 tcpi_ca_state;
@@ -316,15 +334,17 @@ struct tcp_info {
316
334
  * in milliseconds, including any
317
335
  * unfinished recovery.
318
336
  */
319
- __u32 tcpi_received_ce; /* # of CE marks received */
337
+ __u32 tcpi_received_ce; /* # of CE marked segments received */
320
338
  __u32 tcpi_delivered_e1_bytes; /* Accurate ECN byte counters */
321
339
  __u32 tcpi_delivered_e0_bytes;
322
340
  __u32 tcpi_delivered_ce_bytes;
323
341
  __u32 tcpi_received_e1_bytes;
324
342
  __u32 tcpi_received_e0_bytes;
325
343
  __u32 tcpi_received_ce_bytes;
326
- __u16 tcpi_accecn_fail_mode;
327
- __u16 tcpi_accecn_opt_seen;
344
+ __u32 tcpi_ecn_mode:2,
345
+ tcpi_accecn_opt_seen:2,
346
+ tcpi_accecn_fail_mode:4,
347
+ tcpi_options2:24;
328
348
  };
329
349
 
330
350
  /* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
@@ -0,0 +1,8 @@
1
+ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2
+ #ifndef _LINUX_TYPELIMITS_H
3
+ #define _LINUX_TYPELIMITS_H
4
+
5
+ #define __KERNEL_INT_MAX ((int)(~0U >> 1))
6
+ #define __KERNEL_INT_MIN (-__KERNEL_INT_MAX - 1)
7
+
8
+ #endif /* _LINUX_TYPELIMITS_H */
@@ -55,7 +55,8 @@
55
55
  _IOWR('u', 0x15, struct ublksrv_ctrl_cmd)
56
56
  #define UBLK_U_CMD_QUIESCE_DEV \
57
57
  _IOWR('u', 0x16, struct ublksrv_ctrl_cmd)
58
-
58
+ #define UBLK_U_CMD_TRY_STOP_DEV \
59
+ _IOWR('u', 0x17, struct ublksrv_ctrl_cmd)
59
60
  /*
60
61
  * 64bits are enough now, and it should be easy to extend in case of
61
62
  * running out of feature flags
@@ -103,6 +104,30 @@
103
104
  #define UBLK_U_IO_UNREGISTER_IO_BUF \
104
105
  _IOWR('u', 0x24, struct ublksrv_io_cmd)
105
106
 
107
+ /*
108
+ * return 0 if the command is run successfully, otherwise failure code
109
+ * is returned
110
+ */
111
+ #define UBLK_U_IO_PREP_IO_CMDS \
112
+ _IOWR('u', 0x25, struct ublk_batch_io)
113
+ /*
114
+ * If failure code is returned, nothing in the command buffer is handled.
115
+ * Otherwise, the returned value means how many bytes in command buffer
116
+ * are handled actually, then number of handled IOs can be calculated with
117
+ * `elem_bytes` for each IO. IOs in the remained bytes are not committed,
118
+ * userspace has to check return value for dealing with partial committing
119
+ * correctly.
120
+ */
121
+ #define UBLK_U_IO_COMMIT_IO_CMDS \
122
+ _IOWR('u', 0x26, struct ublk_batch_io)
123
+
124
+ /*
125
+ * Fetch io commands to provided buffer in multishot style,
126
+ * `IORING_URING_CMD_MULTISHOT` is required for this command.
127
+ */
128
+ #define UBLK_U_IO_FETCH_IO_CMDS \
129
+ _IOWR('u', 0x27, struct ublk_batch_io)
130
+
106
131
  /* only ABORT means that no re-fetch */
107
132
  #define UBLK_IO_RES_OK 0
108
133
  #define UBLK_IO_RES_NEED_GET_DATA 1
@@ -134,6 +159,10 @@
134
159
  #define UBLKSRV_IO_BUF_TOTAL_BITS (UBLK_QID_OFF + UBLK_QID_BITS)
135
160
  #define UBLKSRV_IO_BUF_TOTAL_SIZE (1ULL << UBLKSRV_IO_BUF_TOTAL_BITS)
136
161
 
162
+ /* Copy to/from request integrity buffer instead of data buffer */
163
+ #define UBLK_INTEGRITY_FLAG_OFF 62
164
+ #define UBLKSRV_IO_INTEGRITY_FLAG (1ULL << UBLK_INTEGRITY_FLAG_OFF)
165
+
137
166
  /*
138
167
  * ublk server can register data buffers for incoming I/O requests with a sparse
139
168
  * io_uring buffer table. The request buffer can then be used as the data buffer
@@ -311,6 +340,36 @@
311
340
  */
312
341
  #define UBLK_F_BUF_REG_OFF_DAEMON (1ULL << 14)
313
342
 
343
+ /*
344
+ * Support the following commands for delivering & committing io command
345
+ * in batch.
346
+ *
347
+ * - UBLK_U_IO_PREP_IO_CMDS
348
+ * - UBLK_U_IO_COMMIT_IO_CMDS
349
+ * - UBLK_U_IO_FETCH_IO_CMDS
350
+ * - UBLK_U_IO_REGISTER_IO_BUF
351
+ * - UBLK_U_IO_UNREGISTER_IO_BUF
352
+ *
353
+ * The existing UBLK_U_IO_FETCH_REQ, UBLK_U_IO_COMMIT_AND_FETCH_REQ and
354
+ * UBLK_U_IO_NEED_GET_DATA uring_cmd are not supported for this feature.
355
+ */
356
+ #define UBLK_F_BATCH_IO (1ULL << 15)
357
+
358
+ /*
359
+ * ublk device supports requests with integrity/metadata buffer.
360
+ * Requires UBLK_F_USER_COPY.
361
+ */
362
+ #define UBLK_F_INTEGRITY (1ULL << 16)
363
+
364
+ /*
365
+ * The device supports the UBLK_CMD_TRY_STOP_DEV command, which
366
+ * allows stopping the device only if there are no openers.
367
+ */
368
+ #define UBLK_F_SAFE_STOP_DEV (1ULL << 17)
369
+
370
+ /* Disable automatic partition scanning when device is started */
371
+ #define UBLK_F_NO_AUTO_PART_SCAN (1ULL << 18)
372
+
314
373
  /* device state */
315
374
  #define UBLK_S_DEV_DEAD 0
316
375
  #define UBLK_S_DEV_LIVE 1
@@ -408,6 +467,8 @@ struct ublksrv_ctrl_dev_info {
408
467
  * passed in.
409
468
  */
410
469
  #define UBLK_IO_F_NEED_REG_BUF (1U << 17)
470
+ /* Request has an integrity data buffer */
471
+ #define UBLK_IO_F_INTEGRITY (1UL << 18)
411
472
 
412
473
  /*
413
474
  * io cmd is described by this structure, and stored in share memory, indexed
@@ -525,6 +586,51 @@ struct ublksrv_io_cmd {
525
586
  };
526
587
  };
527
588
 
589
+ struct ublk_elem_header {
590
+ __u16 tag; /* IO tag */
591
+
592
+ /*
593
+ * Buffer index for incoming io command, only valid iff
594
+ * UBLK_F_AUTO_BUF_REG is set
595
+ */
596
+ __u16 buf_index;
597
+ __s32 result; /* I/O completion result (commit only) */
598
+ };
599
+
600
+ /*
601
+ * uring_cmd buffer structure for batch commands
602
+ *
603
+ * buffer includes multiple elements, which number is specified by
604
+ * `nr_elem`. Each element buffer is organized in the following order:
605
+ *
606
+ * struct ublk_elem_buffer {
607
+ * // Mandatory fields (8 bytes)
608
+ * struct ublk_elem_header header;
609
+ *
610
+ * // Optional fields (8 bytes each, included based on flags)
611
+ *
612
+ * // Buffer address (if UBLK_BATCH_F_HAS_BUF_ADDR) for copying data
613
+ * // between ublk request and ublk server buffer
614
+ * __u64 buf_addr;
615
+ *
616
+ * // returned Zone append LBA (if UBLK_BATCH_F_HAS_ZONE_LBA)
617
+ * __u64 zone_lba;
618
+ * }
619
+ *
620
+ * Used for `UBLK_U_IO_PREP_IO_CMDS` and `UBLK_U_IO_COMMIT_IO_CMDS`
621
+ */
622
+ struct ublk_batch_io {
623
+ __u16 q_id;
624
+ #define UBLK_BATCH_F_HAS_ZONE_LBA (1 << 0)
625
+ #define UBLK_BATCH_F_HAS_BUF_ADDR (1 << 1)
626
+ #define UBLK_BATCH_F_AUTO_BUF_REG_FALLBACK (1 << 2)
627
+ __u16 flags;
628
+ __u16 nr_elem;
629
+ __u8 elem_bytes;
630
+ __u8 reserved;
631
+ __u64 reserved2;
632
+ };
633
+
528
634
  struct ublk_param_basic {
529
635
  #define UBLK_ATTR_READ_ONLY (1 << 0)
530
636
  #define UBLK_ATTR_ROTATIONAL (1 << 1)
@@ -600,6 +706,17 @@ struct ublk_param_segment {
600
706
  __u8 pad[2];
601
707
  };
602
708
 
709
+ struct ublk_param_integrity {
710
+ __u32 flags; /* LBMD_PI_CAP_* from linux/fs.h */
711
+ __u16 max_integrity_segments; /* 0 means no limit */
712
+ __u8 interval_exp;
713
+ __u8 metadata_size; /* UBLK_PARAM_TYPE_INTEGRITY requires nonzero */
714
+ __u8 pi_offset;
715
+ __u8 csum_type; /* LBMD_PI_CSUM_* from linux/fs.h */
716
+ __u8 tag_size;
717
+ __u8 pad[5];
718
+ };
719
+
603
720
  struct ublk_params {
604
721
  /*
605
722
  * Total length of parameters, userspace has to set 'len' for both
@@ -614,6 +731,7 @@ struct ublk_params {
614
731
  #define UBLK_PARAM_TYPE_ZONED (1 << 3)
615
732
  #define UBLK_PARAM_TYPE_DMA_ALIGN (1 << 4)
616
733
  #define UBLK_PARAM_TYPE_SEGMENT (1 << 5)
734
+ #define UBLK_PARAM_TYPE_INTEGRITY (1 << 6) /* requires UBLK_F_INTEGRITY */
617
735
  __u32 types; /* types of parameter included */
618
736
 
619
737
  struct ublk_param_basic basic;
@@ -622,6 +740,7 @@ struct ublk_params {
622
740
  struct ublk_param_zoned zoned;
623
741
  struct ublk_param_dma_align dma;
624
742
  struct ublk_param_segment seg;
743
+ struct ublk_param_integrity integrity;
625
744
  };
626
745
 
627
746
  #endif
@@ -1188,6 +1188,8 @@ enum v4l2_flash_strobe_source {
1188
1188
 
1189
1189
  #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
1190
1190
  #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
1191
+ #define V4L2_CID_FLASH_DURATION (V4L2_CID_FLASH_CLASS_BASE + 13)
1192
+ #define V4L2_CID_FLASH_STROBE_OE (V4L2_CID_FLASH_CLASS_BASE + 14)
1191
1193
 
1192
1194
 
1193
1195
  /* JPEG-class control IDs */
@@ -2095,6 +2097,8 @@ struct v4l2_ctrl_mpeg2_quantisation {
2095
2097
  #define V4L2_CID_STATELESS_HEVC_DECODE_MODE (V4L2_CID_CODEC_STATELESS_BASE + 405)
2096
2098
  #define V4L2_CID_STATELESS_HEVC_START_CODE (V4L2_CID_CODEC_STATELESS_BASE + 406)
2097
2099
  #define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407)
2100
+ #define V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS (V4L2_CID_CODEC_STATELESS_BASE + 408)
2101
+ #define V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS (V4L2_CID_CODEC_STATELESS_BASE + 409)
2098
2102
 
2099
2103
  enum v4l2_stateless_hevc_decode_mode {
2100
2104
  V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED,
@@ -2550,6 +2554,65 @@ struct v4l2_ctrl_hevc_scaling_matrix {
2550
2554
  __u8 scaling_list_dc_coef_32x32[2];
2551
2555
  };
2552
2556
 
2557
+ #define V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED 0x1
2558
+
2559
+ /*
2560
+ * struct v4l2_ctrl_hevc_ext_sps_st_rps - HEVC short term RPS parameters
2561
+ *
2562
+ * Dynamic size 1-dimension array for short term RPS. The number of elements
2563
+ * is v4l2_ctrl_hevc_sps::num_short_term_ref_pic_sets. It can contain up to 65 elements.
2564
+ *
2565
+ * @delta_idx_minus1: Specifies the delta compare to the index. See details in section 7.4.8
2566
+ * "Short-term reference picture set semantics" of the specification.
2567
+ * @delta_rps_sign: Sign of the delta as specified in section 7.4.8 "Short-term reference picture
2568
+ * set semantics" of the specification.
2569
+ * @abs_delta_rps_minus1: Absolute delta RPS as specified in section 7.4.8 "Short-term reference
2570
+ * picture set semantics" of the specification.
2571
+ * @num_negative_pics: Number of short-term RPS entries that have picture order count values less
2572
+ * than the picture order count value of the current picture.
2573
+ * @num_positive_pics: Number of short-term RPS entries that have picture order count values
2574
+ * greater than the picture order count value of the current picture.
2575
+ * @used_by_curr_pic: Bit j specifies if short-term RPS j is used by the current picture.
2576
+ * @use_delta_flag: Bit j equals to 1 specifies that the j-th entry in the source candidate
2577
+ * short-term RPS is included in this candidate short-term RPS.
2578
+ * @delta_poc_s0_minus1: Specifies the negative picture order count delta for the i-th entry in
2579
+ * the short-term RPS. See details in section 7.4.8 "Short-term reference
2580
+ * picture set semantics" of the specification.
2581
+ * @delta_poc_s1_minus1: Specifies the positive picture order count delta for the i-th entry in
2582
+ * the short-term RPS. See details in section 7.4.8 "Short-term reference
2583
+ * picture set semantics" of the specification.
2584
+ * @flags: See V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_{}
2585
+ */
2586
+ struct v4l2_ctrl_hevc_ext_sps_st_rps {
2587
+ __u8 delta_idx_minus1;
2588
+ __u8 delta_rps_sign;
2589
+ __u8 num_negative_pics;
2590
+ __u8 num_positive_pics;
2591
+ __u32 used_by_curr_pic;
2592
+ __u32 use_delta_flag;
2593
+ __u16 abs_delta_rps_minus1;
2594
+ __u16 delta_poc_s0_minus1[16];
2595
+ __u16 delta_poc_s1_minus1[16];
2596
+ __u16 flags;
2597
+ };
2598
+
2599
+ #define V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT 0x1
2600
+
2601
+ /*
2602
+ * struct v4l2_ctrl_hevc_ext_sps_lt_rps - HEVC long term RPS parameters
2603
+ *
2604
+ * Dynamic size 1-dimension array for long term RPS. The number of elements
2605
+ * is v4l2_ctrl_hevc_sps::num_long_term_ref_pics_sps. It can contain up to 65 elements.
2606
+ *
2607
+ * @lt_ref_pic_poc_lsb_sps: picture order count modulo MaxPicOrderCntLsb of the i-th candidate
2608
+ * long-term reference picture.
2609
+ * @flags: See V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_{}
2610
+ */
2611
+ struct v4l2_ctrl_hevc_ext_sps_lt_rps {
2612
+ __u16 lt_ref_pic_poc_lsb_sps;
2613
+ __u16 flags;
2614
+ };
2615
+
2553
2616
  /* Stateless VP9 controls */
2554
2617
 
2555
2618
  #define V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED 0x1
@@ -236,7 +236,7 @@ struct vmmdev_hgcm_function_parameter32 {
236
236
  /** Relative to the request header. */
237
237
  __u32 offset;
238
238
  } page_list;
239
- } u;
239
+ } __attribute__((packed)) u;
240
240
  } __attribute__((packed));
241
241
  VMMDEV_ASSERT_SIZE(vmmdev_hgcm_function_parameter32, 4 + 8);
242
242
 
@@ -251,7 +251,7 @@ struct vmmdev_hgcm_function_parameter64 {
251
251
  union {
252
252
  __u64 phys_addr;
253
253
  __u64 linear_addr;
254
- } u;
254
+ } __attribute__((packed)) u;
255
255
  } __attribute__((packed)) pointer;
256
256
  struct {
257
257
  /** Size of the buffer described by the page list. */
@@ -10,6 +10,10 @@
10
10
 
11
11
  #define VDUSE_API_VERSION 0
12
12
 
13
+ /* VQ groups and ASID support */
14
+
15
+ #define VDUSE_API_VERSION_1 1
16
+
13
17
  /*
14
18
  * Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION).
15
19
  * This is used for future extension.
@@ -27,6 +31,8 @@
27
31
  * @features: virtio features
28
32
  * @vq_num: the number of virtqueues
29
33
  * @vq_align: the allocation alignment of virtqueue's metadata
34
+ * @ngroups: number of vq groups that VDUSE device declares
35
+ * @nas: number of address spaces that VDUSE device declares
30
36
  * @reserved: for future use, needs to be initialized to zero
31
37
  * @config_size: the size of the configuration space
32
38
  * @config: the buffer of the configuration space
@@ -41,7 +47,9 @@ struct vduse_dev_config {
41
47
  __u64 features;
42
48
  __u32 vq_num;
43
49
  __u32 vq_align;
44
- __u32 reserved[13];
50
+ __u32 ngroups; /* if VDUSE_API_VERSION >= 1 */
51
+ __u32 nas; /* if VDUSE_API_VERSION >= 1 */
52
+ __u32 reserved[11];
45
53
  __u32 config_size;
46
54
  __u8 config[];
47
55
  };
@@ -118,14 +126,18 @@ struct vduse_config_data {
118
126
  * struct vduse_vq_config - basic configuration of a virtqueue
119
127
  * @index: virtqueue index
120
128
  * @max_size: the max size of virtqueue
121
- * @reserved: for future use, needs to be initialized to zero
129
+ * @reserved1: for future use, needs to be initialized to zero
130
+ * @group: virtqueue group
131
+ * @reserved2: for future use, needs to be initialized to zero
122
132
  *
123
133
  * Structure used by VDUSE_VQ_SETUP ioctl to setup a virtqueue.
124
134
  */
125
135
  struct vduse_vq_config {
126
136
  __u32 index;
127
137
  __u16 max_size;
128
- __u16 reserved[13];
138
+ __u16 reserved1;
139
+ __u32 group;
140
+ __u16 reserved2[10];
129
141
  };
130
142
 
131
143
  /*
@@ -156,6 +168,16 @@ struct vduse_vq_state_packed {
156
168
  __u16 last_used_idx;
157
169
  };
158
170
 
171
+ /**
172
+ * struct vduse_vq_group_asid - virtqueue group ASID
173
+ * @group: Index of the virtqueue group
174
+ * @asid: Address space ID of the group
175
+ */
176
+ struct vduse_vq_group_asid {
177
+ __u32 group;
178
+ __u32 asid;
179
+ };
180
+
159
181
  /**
160
182
  * struct vduse_vq_info - information of a virtqueue
161
183
  * @index: virtqueue index
@@ -215,6 +237,7 @@ struct vduse_vq_eventfd {
215
237
  * @uaddr: start address of userspace memory, it must be aligned to page size
216
238
  * @iova: start of the IOVA region
217
239
  * @size: size of the IOVA region
240
+ * @asid: Address space ID of the IOVA region
218
241
  * @reserved: for future use, needs to be initialized to zero
219
242
  *
220
243
  * Structure used by VDUSE_IOTLB_REG_UMEM and VDUSE_IOTLB_DEREG_UMEM
@@ -224,7 +247,8 @@ struct vduse_iova_umem {
224
247
  __u64 uaddr;
225
248
  __u64 iova;
226
249
  __u64 size;
227
- __u64 reserved[3];
250
+ __u32 asid;
251
+ __u32 reserved[5];
228
252
  };
229
253
 
230
254
  /* Register userspace memory for IOVA regions */
@@ -238,6 +262,7 @@ struct vduse_iova_umem {
238
262
  * @start: start of the IOVA region
239
263
  * @last: last of the IOVA region
240
264
  * @capability: capability of the IOVA region
265
+ * @asid: Address space ID of the IOVA region, only if device API version >= 1
241
266
  * @reserved: for future use, needs to be initialized to zero
242
267
  *
243
268
  * Structure used by VDUSE_IOTLB_GET_INFO ioctl to get information of
@@ -248,7 +273,8 @@ struct vduse_iova_info {
248
273
  __u64 last;
249
274
  #define VDUSE_IOVA_CAP_UMEM (1 << 0)
250
275
  __u64 capability;
251
- __u64 reserved[3];
276
+ __u32 asid; /* Only if device API version >= 1 */
277
+ __u32 reserved[5];
252
278
  };
253
279
 
254
280
  /*
@@ -257,6 +283,32 @@ struct vduse_iova_info {
257
283
  */
258
284
  #define VDUSE_IOTLB_GET_INFO _IOWR(VDUSE_BASE, 0x1a, struct vduse_iova_info)
259
285
 
286
+ /**
287
+ * struct vduse_iotlb_entry_v2 - entry of IOTLB to describe one IOVA region
288
+ *
289
+ * @v1: the original vduse_iotlb_entry
290
+ * @asid: address space ID of the IOVA region
291
+ * @reserved: for future use, needs to be initialized to zero
292
+ *
293
+ * Structure used by VDUSE_IOTLB_GET_FD2 ioctl to find an overlapped IOVA region.
294
+ */
295
+ struct vduse_iotlb_entry_v2 {
296
+ __u64 offset;
297
+ __u64 start;
298
+ __u64 last;
299
+ __u8 perm;
300
+ __u8 padding[7];
301
+ __u32 asid;
302
+ __u32 reserved[11];
303
+ };
304
+
305
+ /*
306
+ * Same as VDUSE_IOTLB_GET_FD but with vduse_iotlb_entry_v2 argument that
307
+ * support extra fields.
308
+ */
309
+ #define VDUSE_IOTLB_GET_FD2 _IOWR(VDUSE_BASE, 0x1b, struct vduse_iotlb_entry_v2)
310
+
311
+
260
312
  /* The control messages definition for read(2)/write(2) on /dev/vduse/$NAME */
261
313
 
262
314
  /**
@@ -265,11 +317,14 @@ struct vduse_iova_info {
265
317
  * @VDUSE_SET_STATUS: set the device status
266
318
  * @VDUSE_UPDATE_IOTLB: Notify userspace to update the memory mapping for
267
319
  * specified IOVA range via VDUSE_IOTLB_GET_FD ioctl
320
+ * @VDUSE_SET_VQ_GROUP_ASID: Notify userspace to update the address space of a
321
+ * virtqueue group.
268
322
  */
269
323
  enum vduse_req_type {
270
324
  VDUSE_GET_VQ_STATE,
271
325
  VDUSE_SET_STATUS,
272
326
  VDUSE_UPDATE_IOTLB,
327
+ VDUSE_SET_VQ_GROUP_ASID,
273
328
  };
274
329
 
275
330
  /**
@@ -304,6 +359,19 @@ struct vduse_iova_range {
304
359
  __u64 last;
305
360
  };
306
361
 
362
+ /**
363
+ * struct vduse_iova_range_v2 - IOVA range [start, last] if API_VERSION >= 1
364
+ * @start: start of the IOVA range
365
+ * @last: last of the IOVA range
366
+ * @asid: address space ID of the IOVA range
367
+ */
368
+ struct vduse_iova_range_v2 {
369
+ __u64 start;
370
+ __u64 last;
371
+ __u32 asid;
372
+ __u32 padding;
373
+ };
374
+
307
375
  /**
308
376
  * struct vduse_dev_request - control request
309
377
  * @type: request type
@@ -312,6 +380,8 @@ struct vduse_iova_range {
312
380
  * @vq_state: virtqueue state, only index field is available
313
381
  * @s: device status
314
382
  * @iova: IOVA range for updating
383
+ * @iova_v2: IOVA range for updating if API_VERSION >= 1
384
+ * @vq_group_asid: ASID of a virtqueue group
315
385
  * @padding: padding
316
386
  *
317
387
  * Structure used by read(2) on /dev/vduse/$NAME.
@@ -324,6 +394,11 @@ struct vduse_dev_request {
324
394
  struct vduse_vq_state vq_state;
325
395
  struct vduse_dev_status s;
326
396
  struct vduse_iova_range iova;
397
+ /* Following members but padding exist only if vduse api
398
+ * version >= 1
399
+ */
400
+ struct vduse_iova_range_v2 iova_v2;
401
+ struct vduse_vq_group_asid vq_group_asid;
327
402
  __u32 padding[32];
328
403
  };
329
404
  };
@@ -1,5 +1,5 @@
1
- #define LINUX_VERSION_CODE 398080
1
+ #define LINUX_VERSION_CODE 458752
2
2
  #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
3
- #define LINUX_VERSION_MAJOR 6
4
- #define LINUX_VERSION_PATCHLEVEL 19
3
+ #define LINUX_VERSION_MAJOR 7
4
+ #define LINUX_VERSION_PATCHLEVEL 0
5
5
  #define LINUX_VERSION_SUBLEVEL 0
@@ -964,6 +964,10 @@ struct vfio_device_bind_iommufd {
964
964
  * hwpt corresponding to the given pt_id.
965
965
  *
966
966
  * Return: 0 on success, -errno on failure.
967
+ *
968
+ * When a device is resetting, -EBUSY will be returned to reject any concurrent
969
+ * attachment to the resetting device itself or any sibling device in the IOMMU
970
+ * group having the resetting device.
967
971
  */
968
972
  struct vfio_device_attach_iommufd_pt {
969
973
  __u32 argsz;
@@ -748,6 +748,7 @@ struct v4l2_pix_format {
748
748
  #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */
749
749
  #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */
750
750
  #define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */
751
+ #define V4L2_PIX_FMT_AV1 v4l2_fourcc('A', 'V', '0', '1') /* AV1 */
751
752
  #define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */
752
753
  #define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */
753
754
  #define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 */
@@ -1916,6 +1917,8 @@ enum v4l2_ctrl_type {
1916
1917
  V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS = 0x0272,
1917
1918
  V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX = 0x0273,
1918
1919
  V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS = 0x0274,
1920
+ V4L2_CTRL_TYPE_HEVC_EXT_SPS_ST_RPS = 0x0275,
1921
+ V4L2_CTRL_TYPE_HEVC_EXT_SPS_LT_RPS = 0x0276,
1919
1922
 
1920
1923
  V4L2_CTRL_TYPE_AV1_SEQUENCE = 0x280,
1921
1924
  V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY = 0x281,
@@ -31,7 +31,6 @@
31
31
  * SUCH DAMAGE.
32
32
  *
33
33
  * Copyright Rusty Russell IBM Corporation 2007. */
34
- #include <stdint.h>
35
34
  #include <linux/types.h>
36
35
  #include <linux/virtio_types.h>
37
36
 
@@ -200,7 +199,7 @@ static __inline__ void vring_init(struct vring *vr, unsigned int num, void *p,
200
199
  vr->num = num;
201
200
  vr->desc = p;
202
201
  vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct vring_desc));
203
- vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16)
202
+ vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(__virtio16)
204
203
  + align-1) & ~(align - 1));
205
204
  }
206
205
 
@@ -115,6 +115,17 @@ struct vmclock_abi {
115
115
  * bit again after the update, using the about-to-be-valid fields.
116
116
  */
117
117
  #define VMCLOCK_FLAG_TIME_MONOTONIC (1 << 7)
118
+ /*
119
+ * If the VM_GEN_COUNTER_PRESENT flag is set, the hypervisor will
120
+ * bump the vm_generation_counter field every time the guest is
121
+ * loaded from some save state (restored from a snapshot).
122
+ */
123
+ #define VMCLOCK_FLAG_VM_GEN_COUNTER_PRESENT (1 << 8)
124
+ /*
125
+ * If the NOTIFICATION_PRESENT flag is set, the hypervisor will send
126
+ * a notification every time it updates seq_count to a new even number.
127
+ */
128
+ #define VMCLOCK_FLAG_NOTIFICATION_PRESENT (1 << 9)
118
129
 
119
130
  __u8 pad[2];
120
131
  __u8 clock_status;
@@ -177,6 +188,15 @@ struct vmclock_abi {
177
188
  __le64 time_frac_sec; /* Units of 1/2^64 of a second */
178
189
  __le64 time_esterror_nanosec;
179
190
  __le64 time_maxerror_nanosec;
191
+
192
+ /*
193
+ * This field changes to another non-repeating value when the guest
194
+ * has been loaded from a snapshot. In addition to handling a
195
+ * disruption in time (which will also be signalled through the
196
+ * disruption_marker field), a guest may wish to discard UUIDs,
197
+ * reset network connections, reseed entropy, etc.
198
+ */
199
+ __le64 vm_generation_counter;
180
200
  };
181
201
 
182
202
  #endif /* __VMCLOCK_ABI_H__ */
@@ -56,6 +56,7 @@ enum {
56
56
  BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL,
57
57
  BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL,
58
58
  BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40,
59
+ BNXT_RE_UCNTX_CMASK_QP_RATE_LIMIT_ENABLED = 0x80ULL,
59
60
  };
60
61
 
61
62
  enum bnxt_re_wqe_mode {
@@ -215,4 +216,19 @@ enum bnxt_re_toggle_mem_methods {
215
216
  BNXT_RE_METHOD_GET_TOGGLE_MEM = (1U << UVERBS_ID_NS_SHIFT),
216
217
  BNXT_RE_METHOD_RELEASE_TOGGLE_MEM,
217
218
  };
219
+
220
+ struct bnxt_re_packet_pacing_caps {
221
+ __u32 qp_rate_limit_min;
222
+ __u32 qp_rate_limit_max; /* In kbps */
223
+ /* Corresponding bit will be set if qp type from
224
+ * 'enum ib_qp_type' is supported, e.g.
225
+ * supported_qpts |= 1 << IB_QPT_RC
226
+ */
227
+ __u32 supported_qpts;
228
+ __u32 reserved;
229
+ };
230
+
231
+ struct bnxt_re_query_device_ex_resp {
232
+ struct bnxt_re_packet_pacing_caps packet_pacing_caps;
233
+ };
218
234
  #endif /* __BNXT_RE_UVERBS_ABI_H__*/
@@ -56,6 +56,7 @@ enum uverbs_default_objects {
56
56
  UVERBS_OBJECT_COUNTERS,
57
57
  UVERBS_OBJECT_ASYNC_EVENT,
58
58
  UVERBS_OBJECT_DMAH,
59
+ UVERBS_OBJECT_DMABUF,
59
60
  };
60
61
 
61
62
  enum {
@@ -73,6 +74,7 @@ enum uverbs_methods_device {
73
74
  UVERBS_METHOD_QUERY_CONTEXT,
74
75
  UVERBS_METHOD_QUERY_GID_TABLE,
75
76
  UVERBS_METHOD_QUERY_GID_ENTRY,
77
+ UVERBS_METHOD_QUERY_PORT_SPEED,
76
78
  };
77
79
 
78
80
  enum uverbs_attrs_invoke_write_cmd_attr_ids {
@@ -86,6 +88,11 @@ enum uverbs_attrs_query_port_cmd_attr_ids {
86
88
  UVERBS_ATTR_QUERY_PORT_RESP,
87
89
  };
88
90
 
91
+ enum uverbs_attrs_query_port_speed_cmd_attr_ids {
92
+ UVERBS_ATTR_QUERY_PORT_SPEED_PORT_NUM,
93
+ UVERBS_ATTR_QUERY_PORT_SPEED_RESP,
94
+ };
95
+
89
96
  enum uverbs_attrs_get_context_attr_ids {
90
97
  UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS,
91
98
  UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT,
@@ -257,6 +264,15 @@ enum uverbs_methods_dmah {
257
264
  UVERBS_METHOD_DMAH_FREE,
258
265
  };
259
266
 
267
+ enum uverbs_attrs_alloc_dmabuf_cmd_attr_ids {
268
+ UVERBS_ATTR_ALLOC_DMABUF_HANDLE,
269
+ UVERBS_ATTR_ALLOC_DMABUF_PGOFF,
270
+ };
271
+
272
+ enum uverbs_methods_dmabuf {
273
+ UVERBS_METHOD_DMABUF_ALLOC,
274
+ };
275
+
260
276
  enum uverbs_attrs_reg_dm_mr_cmd_attr_ids {
261
277
  UVERBS_ATTR_REG_DM_MR_HANDLE,
262
278
  UVERBS_ATTR_REG_DM_MR_OFFSET,