Merge branch 'next' into for-linus
Prepare input updates for 5.20 (or 6.0) merge window.
This commit is contained in:
@@ -116,13 +116,13 @@
|
||||
#define F_GETSIG 11 /* for sockets. */
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
#if __BITS_PER_LONG == 32 || defined(__KERNEL__)
|
||||
#ifndef F_GETLK64
|
||||
#define F_GETLK64 12 /* using 'struct flock64' */
|
||||
#define F_SETLK64 13
|
||||
#define F_SETLKW64 14
|
||||
#endif
|
||||
#endif
|
||||
#endif /* __BITS_PER_LONG == 32 || defined(__KERNEL__) */
|
||||
|
||||
#ifndef F_SETOWN_EX
|
||||
#define F_SETOWN_EX 15
|
||||
@@ -192,25 +192,19 @@ struct f_owner_ex {
|
||||
|
||||
#define F_LINUX_SPECIFIC_BASE 1024
|
||||
|
||||
#ifndef HAVE_ARCH_STRUCT_FLOCK
|
||||
#ifndef __ARCH_FLOCK_PAD
|
||||
#define __ARCH_FLOCK_PAD
|
||||
#endif
|
||||
|
||||
struct flock {
|
||||
short l_type;
|
||||
short l_whence;
|
||||
__kernel_off_t l_start;
|
||||
__kernel_off_t l_len;
|
||||
__kernel_pid_t l_pid;
|
||||
#ifdef __ARCH_FLOCK_EXTRA_SYSID
|
||||
__ARCH_FLOCK_EXTRA_SYSID
|
||||
#endif
|
||||
#ifdef __ARCH_FLOCK_PAD
|
||||
__ARCH_FLOCK_PAD
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ARCH_STRUCT_FLOCK64
|
||||
#ifndef __ARCH_FLOCK64_PAD
|
||||
#define __ARCH_FLOCK64_PAD
|
||||
#endif
|
||||
|
||||
struct flock64 {
|
||||
short l_type;
|
||||
@@ -218,8 +212,9 @@ struct flock64 {
|
||||
__kernel_loff_t l_start;
|
||||
__kernel_loff_t l_len;
|
||||
__kernel_pid_t l_pid;
|
||||
#ifdef __ARCH_FLOCK64_PAD
|
||||
__ARCH_FLOCK64_PAD
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* _ASM_GENERIC_FCNTL_H */
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
#define MADV_POPULATE_READ 22 /* populate (prefault) page tables readable */
|
||||
#define MADV_POPULATE_WRITE 23 /* populate (prefault) page tables writable */
|
||||
|
||||
#define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */
|
||||
|
||||
/* compatibility flags */
|
||||
#define MAP_FILE 0
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#define __ASM_GENERIC_SHMBUF_H
|
||||
|
||||
#include <asm/bitsperlong.h>
|
||||
#include <asm/ipcbuf.h>
|
||||
#include <asm/posix_types.h>
|
||||
|
||||
/*
|
||||
* The shmid64_ds structure for x86 architecture.
|
||||
@@ -24,7 +26,7 @@
|
||||
|
||||
struct shmid64_ds {
|
||||
struct ipc64_perm shm_perm; /* operation perms */
|
||||
size_t shm_segsz; /* size of segment (bytes) */
|
||||
__kernel_size_t shm_segsz; /* size of segment (bytes) */
|
||||
#if __BITS_PER_LONG == 64
|
||||
long shm_atime; /* last attach time */
|
||||
long shm_dtime; /* last detach time */
|
||||
|
||||
@@ -99,6 +99,7 @@ union __sifields {
|
||||
struct {
|
||||
unsigned long _data;
|
||||
__u32 _type;
|
||||
__u32 _flags;
|
||||
} _perf;
|
||||
};
|
||||
} _sigfault;
|
||||
@@ -164,6 +165,7 @@ typedef struct siginfo {
|
||||
#define si_pkey _sifields._sigfault._addr_pkey._pkey
|
||||
#define si_perf_data _sifields._sigfault._perf._data
|
||||
#define si_perf_type _sifields._sigfault._perf._type
|
||||
#define si_perf_flags _sifields._sigfault._perf._flags
|
||||
#define si_band _sifields._sigpoll._band
|
||||
#define si_fd _sifields._sigpoll._fd
|
||||
#define si_call_addr _sifields._sigsys._call_addr
|
||||
@@ -270,6 +272,11 @@ typedef struct siginfo {
|
||||
* that are of the form: ((PTRACE_EVENT_XXX << 8) | SIGTRAP)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Flags for si_perf_flags if SIGTRAP si_code is TRAP_PERF.
|
||||
*/
|
||||
#define TRAP_PERF_FLAG_ASYNC (1u << 0)
|
||||
|
||||
/*
|
||||
* SIGCHLD si_codes
|
||||
*/
|
||||
|
||||
@@ -85,7 +85,7 @@ struct sigaction {
|
||||
typedef struct sigaltstack {
|
||||
void __user *ss_sp;
|
||||
int ss_flags;
|
||||
size_t ss_size;
|
||||
__kernel_size_t ss_size;
|
||||
} stack_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
@@ -128,6 +128,10 @@
|
||||
|
||||
#define SO_RESERVE_MEM 73
|
||||
|
||||
#define SO_TXREHASH 74
|
||||
|
||||
#define SO_RCVMARK 75
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
|
||||
#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
|
||||
|
||||
65
include/uapi/asm-generic/termbits-common.h
Normal file
65
include/uapi/asm-generic/termbits-common.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef __ASM_GENERIC_TERMBITS_COMMON_H
|
||||
#define __ASM_GENERIC_TERMBITS_COMMON_H
|
||||
|
||||
typedef unsigned char cc_t;
|
||||
typedef unsigned int speed_t;
|
||||
|
||||
/* c_iflag bits */
|
||||
#define IGNBRK 0x001 /* Ignore break condition */
|
||||
#define BRKINT 0x002 /* Signal interrupt on break */
|
||||
#define IGNPAR 0x004 /* Ignore characters with parity errors */
|
||||
#define PARMRK 0x008 /* Mark parity and framing errors */
|
||||
#define INPCK 0x010 /* Enable input parity check */
|
||||
#define ISTRIP 0x020 /* Strip 8th bit off characters */
|
||||
#define INLCR 0x040 /* Map NL to CR on input */
|
||||
#define IGNCR 0x080 /* Ignore CR */
|
||||
#define ICRNL 0x100 /* Map CR to NL on input */
|
||||
#define IXANY 0x800 /* Any character will restart after stop */
|
||||
|
||||
/* c_oflag bits */
|
||||
#define OPOST 0x01 /* Perform output processing */
|
||||
#define OCRNL 0x08
|
||||
#define ONOCR 0x10
|
||||
#define ONLRET 0x20
|
||||
#define OFILL 0x40
|
||||
#define OFDEL 0x80
|
||||
|
||||
/* c_cflag bit meaning */
|
||||
/* Common CBAUD rates */
|
||||
#define B0 0x00000000 /* hang up */
|
||||
#define B50 0x00000001
|
||||
#define B75 0x00000002
|
||||
#define B110 0x00000003
|
||||
#define B134 0x00000004
|
||||
#define B150 0x00000005
|
||||
#define B200 0x00000006
|
||||
#define B300 0x00000007
|
||||
#define B600 0x00000008
|
||||
#define B1200 0x00000009
|
||||
#define B1800 0x0000000a
|
||||
#define B2400 0x0000000b
|
||||
#define B4800 0x0000000c
|
||||
#define B9600 0x0000000d
|
||||
#define B19200 0x0000000e
|
||||
#define B38400 0x0000000f
|
||||
#define EXTA B19200
|
||||
#define EXTB B38400
|
||||
|
||||
#define CMSPAR 0x40000000 /* mark or space (stick) parity */
|
||||
#define CRTSCTS 0x80000000 /* flow control */
|
||||
|
||||
#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
|
||||
|
||||
/* tcflow() ACTION argument and TCXONC use these */
|
||||
#define TCOOFF 0 /* Suspend output */
|
||||
#define TCOON 1 /* Restart suspended output */
|
||||
#define TCIOFF 2 /* Send a STOP character */
|
||||
#define TCION 3 /* Send a START character */
|
||||
|
||||
/* tcflush() QUEUE_SELECTOR argument and TCFLSH use these */
|
||||
#define TCIFLUSH 0 /* Discard data received but not yet read */
|
||||
#define TCOFLUSH 1 /* Discard data written but not yet sent */
|
||||
#define TCIOFLUSH 2 /* Discard all pending data */
|
||||
|
||||
#endif /* __ASM_GENERIC_TERMBITS_COMMON_H */
|
||||
@@ -2,10 +2,8 @@
|
||||
#ifndef __ASM_GENERIC_TERMBITS_H
|
||||
#define __ASM_GENERIC_TERMBITS_H
|
||||
|
||||
#include <linux/posix_types.h>
|
||||
#include <asm-generic/termbits-common.h>
|
||||
|
||||
typedef unsigned char cc_t;
|
||||
typedef unsigned int speed_t;
|
||||
typedef unsigned int tcflag_t;
|
||||
|
||||
#define NCCS 19
|
||||
@@ -41,156 +39,107 @@ struct ktermios {
|
||||
};
|
||||
|
||||
/* c_cc characters */
|
||||
#define VINTR 0
|
||||
#define VQUIT 1
|
||||
#define VERASE 2
|
||||
#define VKILL 3
|
||||
#define VEOF 4
|
||||
#define VTIME 5
|
||||
#define VMIN 6
|
||||
#define VSWTC 7
|
||||
#define VSTART 8
|
||||
#define VSTOP 9
|
||||
#define VSUSP 10
|
||||
#define VEOL 11
|
||||
#define VREPRINT 12
|
||||
#define VDISCARD 13
|
||||
#define VWERASE 14
|
||||
#define VLNEXT 15
|
||||
#define VEOL2 16
|
||||
#define VINTR 0
|
||||
#define VQUIT 1
|
||||
#define VERASE 2
|
||||
#define VKILL 3
|
||||
#define VEOF 4
|
||||
#define VTIME 5
|
||||
#define VMIN 6
|
||||
#define VSWTC 7
|
||||
#define VSTART 8
|
||||
#define VSTOP 9
|
||||
#define VSUSP 10
|
||||
#define VEOL 11
|
||||
#define VREPRINT 12
|
||||
#define VDISCARD 13
|
||||
#define VWERASE 14
|
||||
#define VLNEXT 15
|
||||
#define VEOL2 16
|
||||
|
||||
/* c_iflag bits */
|
||||
#define IGNBRK 0000001
|
||||
#define BRKINT 0000002
|
||||
#define IGNPAR 0000004
|
||||
#define PARMRK 0000010
|
||||
#define INPCK 0000020
|
||||
#define ISTRIP 0000040
|
||||
#define INLCR 0000100
|
||||
#define IGNCR 0000200
|
||||
#define ICRNL 0000400
|
||||
#define IUCLC 0001000
|
||||
#define IXON 0002000
|
||||
#define IXANY 0004000
|
||||
#define IXOFF 0010000
|
||||
#define IMAXBEL 0020000
|
||||
#define IUTF8 0040000
|
||||
#define IUCLC 0x0200
|
||||
#define IXON 0x0400
|
||||
#define IXOFF 0x1000
|
||||
#define IMAXBEL 0x2000
|
||||
#define IUTF8 0x4000
|
||||
|
||||
/* c_oflag bits */
|
||||
#define OPOST 0000001
|
||||
#define OLCUC 0000002
|
||||
#define ONLCR 0000004
|
||||
#define OCRNL 0000010
|
||||
#define ONOCR 0000020
|
||||
#define ONLRET 0000040
|
||||
#define OFILL 0000100
|
||||
#define OFDEL 0000200
|
||||
#define NLDLY 0000400
|
||||
#define NL0 0000000
|
||||
#define NL1 0000400
|
||||
#define CRDLY 0003000
|
||||
#define CR0 0000000
|
||||
#define CR1 0001000
|
||||
#define CR2 0002000
|
||||
#define CR3 0003000
|
||||
#define TABDLY 0014000
|
||||
#define TAB0 0000000
|
||||
#define TAB1 0004000
|
||||
#define TAB2 0010000
|
||||
#define TAB3 0014000
|
||||
#define XTABS 0014000
|
||||
#define BSDLY 0020000
|
||||
#define BS0 0000000
|
||||
#define BS1 0020000
|
||||
#define VTDLY 0040000
|
||||
#define VT0 0000000
|
||||
#define VT1 0040000
|
||||
#define FFDLY 0100000
|
||||
#define FF0 0000000
|
||||
#define FF1 0100000
|
||||
#define OLCUC 0x00002
|
||||
#define ONLCR 0x00004
|
||||
#define NLDLY 0x00100
|
||||
#define NL0 0x00000
|
||||
#define NL1 0x00100
|
||||
#define CRDLY 0x00600
|
||||
#define CR0 0x00000
|
||||
#define CR1 0x00200
|
||||
#define CR2 0x00400
|
||||
#define CR3 0x00600
|
||||
#define TABDLY 0x01800
|
||||
#define TAB0 0x00000
|
||||
#define TAB1 0x00800
|
||||
#define TAB2 0x01000
|
||||
#define TAB3 0x01800
|
||||
#define XTABS 0x01800
|
||||
#define BSDLY 0x02000
|
||||
#define BS0 0x00000
|
||||
#define BS1 0x02000
|
||||
#define VTDLY 0x04000
|
||||
#define VT0 0x00000
|
||||
#define VT1 0x04000
|
||||
#define FFDLY 0x08000
|
||||
#define FF0 0x00000
|
||||
#define FF1 0x08000
|
||||
|
||||
/* c_cflag bit meaning */
|
||||
#define CBAUD 0010017
|
||||
#define B0 0000000 /* hang up */
|
||||
#define B50 0000001
|
||||
#define B75 0000002
|
||||
#define B110 0000003
|
||||
#define B134 0000004
|
||||
#define B150 0000005
|
||||
#define B200 0000006
|
||||
#define B300 0000007
|
||||
#define B600 0000010
|
||||
#define B1200 0000011
|
||||
#define B1800 0000012
|
||||
#define B2400 0000013
|
||||
#define B4800 0000014
|
||||
#define B9600 0000015
|
||||
#define B19200 0000016
|
||||
#define B38400 0000017
|
||||
#define EXTA B19200
|
||||
#define EXTB B38400
|
||||
#define CSIZE 0000060
|
||||
#define CS5 0000000
|
||||
#define CS6 0000020
|
||||
#define CS7 0000040
|
||||
#define CS8 0000060
|
||||
#define CSTOPB 0000100
|
||||
#define CREAD 0000200
|
||||
#define PARENB 0000400
|
||||
#define PARODD 0001000
|
||||
#define HUPCL 0002000
|
||||
#define CLOCAL 0004000
|
||||
#define CBAUDEX 0010000
|
||||
#define BOTHER 0010000
|
||||
#define B57600 0010001
|
||||
#define B115200 0010002
|
||||
#define B230400 0010003
|
||||
#define B460800 0010004
|
||||
#define B500000 0010005
|
||||
#define B576000 0010006
|
||||
#define B921600 0010007
|
||||
#define B1000000 0010010
|
||||
#define B1152000 0010011
|
||||
#define B1500000 0010012
|
||||
#define B2000000 0010013
|
||||
#define B2500000 0010014
|
||||
#define B3000000 0010015
|
||||
#define B3500000 0010016
|
||||
#define B4000000 0010017
|
||||
#define CIBAUD 002003600000 /* input baud rate */
|
||||
#define CMSPAR 010000000000 /* mark or space (stick) parity */
|
||||
#define CRTSCTS 020000000000 /* flow control */
|
||||
|
||||
#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
|
||||
#define CBAUD 0x0000100f
|
||||
#define CSIZE 0x00000030
|
||||
#define CS5 0x00000000
|
||||
#define CS6 0x00000010
|
||||
#define CS7 0x00000020
|
||||
#define CS8 0x00000030
|
||||
#define CSTOPB 0x00000040
|
||||
#define CREAD 0x00000080
|
||||
#define PARENB 0x00000100
|
||||
#define PARODD 0x00000200
|
||||
#define HUPCL 0x00000400
|
||||
#define CLOCAL 0x00000800
|
||||
#define CBAUDEX 0x00001000
|
||||
#define BOTHER 0x00001000
|
||||
#define B57600 0x00001001
|
||||
#define B115200 0x00001002
|
||||
#define B230400 0x00001003
|
||||
#define B460800 0x00001004
|
||||
#define B500000 0x00001005
|
||||
#define B576000 0x00001006
|
||||
#define B921600 0x00001007
|
||||
#define B1000000 0x00001008
|
||||
#define B1152000 0x00001009
|
||||
#define B1500000 0x0000100a
|
||||
#define B2000000 0x0000100b
|
||||
#define B2500000 0x0000100c
|
||||
#define B3000000 0x0000100d
|
||||
#define B3500000 0x0000100e
|
||||
#define B4000000 0x0000100f
|
||||
#define CIBAUD 0x100f0000 /* input baud rate */
|
||||
|
||||
/* c_lflag bits */
|
||||
#define ISIG 0000001
|
||||
#define ICANON 0000002
|
||||
#define XCASE 0000004
|
||||
#define ECHO 0000010
|
||||
#define ECHOE 0000020
|
||||
#define ECHOK 0000040
|
||||
#define ECHONL 0000100
|
||||
#define NOFLSH 0000200
|
||||
#define TOSTOP 0000400
|
||||
#define ECHOCTL 0001000
|
||||
#define ECHOPRT 0002000
|
||||
#define ECHOKE 0004000
|
||||
#define FLUSHO 0010000
|
||||
#define PENDIN 0040000
|
||||
#define IEXTEN 0100000
|
||||
#define EXTPROC 0200000
|
||||
|
||||
/* tcflow() and TCXONC use these */
|
||||
#define TCOOFF 0
|
||||
#define TCOON 1
|
||||
#define TCIOFF 2
|
||||
#define TCION 3
|
||||
|
||||
/* tcflush() and TCFLSH use these */
|
||||
#define TCIFLUSH 0
|
||||
#define TCOFLUSH 1
|
||||
#define TCIOFLUSH 2
|
||||
#define ISIG 0x00001
|
||||
#define ICANON 0x00002
|
||||
#define XCASE 0x00004
|
||||
#define ECHO 0x00008
|
||||
#define ECHOE 0x00010
|
||||
#define ECHOK 0x00020
|
||||
#define ECHONL 0x00040
|
||||
#define NOFLSH 0x00080
|
||||
#define TOSTOP 0x00100
|
||||
#define ECHOCTL 0x00200
|
||||
#define ECHOPRT 0x00400
|
||||
#define ECHOKE 0x00800
|
||||
#define FLUSHO 0x01000
|
||||
#define PENDIN 0x04000
|
||||
#define IEXTEN 0x08000
|
||||
#define EXTPROC 0x10000
|
||||
|
||||
/* tcsetattr uses these */
|
||||
#define TCSANOW 0
|
||||
|
||||
@@ -383,7 +383,7 @@ __SYSCALL(__NR_syslog, sys_syslog)
|
||||
|
||||
/* kernel/ptrace.c */
|
||||
#define __NR_ptrace 117
|
||||
__SYSCALL(__NR_ptrace, sys_ptrace)
|
||||
__SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace)
|
||||
|
||||
/* kernel/sched/core.c */
|
||||
#define __NR_sched_setparam 118
|
||||
@@ -779,7 +779,7 @@ __SYSCALL(__NR_rseq, sys_rseq)
|
||||
#define __NR_kexec_file_load 294
|
||||
__SYSCALL(__NR_kexec_file_load, sys_kexec_file_load)
|
||||
/* 295 through 402 are unassigned to sync up with generic numbers, don't use */
|
||||
#if __BITS_PER_LONG == 32
|
||||
#if defined(__SYSCALL_COMPAT) || __BITS_PER_LONG == 32
|
||||
#define __NR_clock_gettime64 403
|
||||
__SYSCALL(__NR_clock_gettime64, sys_clock_gettime)
|
||||
#define __NR_clock_settime64 404
|
||||
|
||||
@@ -140,6 +140,10 @@ extern "C" {
|
||||
* not require GTT memory accounting
|
||||
*/
|
||||
#define AMDGPU_GEM_CREATE_PREEMPTIBLE (1 << 11)
|
||||
/* Flag that BO can be discarded under memory pressure without keeping the
|
||||
* content.
|
||||
*/
|
||||
#define AMDGPU_GEM_CREATE_DISCARDABLE (1 << 12)
|
||||
|
||||
struct drm_amdgpu_gem_create_in {
|
||||
/** the requested memory size */
|
||||
@@ -206,6 +210,8 @@ union drm_amdgpu_bo_list {
|
||||
#define AMDGPU_CTX_OP_FREE_CTX 2
|
||||
#define AMDGPU_CTX_OP_QUERY_STATE 3
|
||||
#define AMDGPU_CTX_OP_QUERY_STATE2 4
|
||||
#define AMDGPU_CTX_OP_GET_STABLE_PSTATE 5
|
||||
#define AMDGPU_CTX_OP_SET_STABLE_PSTATE 6
|
||||
|
||||
/* GPU reset status */
|
||||
#define AMDGPU_CTX_NO_RESET 0
|
||||
@@ -238,10 +244,18 @@ union drm_amdgpu_bo_list {
|
||||
#define AMDGPU_CTX_PRIORITY_HIGH 512
|
||||
#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023
|
||||
|
||||
/* select a stable profiling pstate for perfmon tools */
|
||||
#define AMDGPU_CTX_STABLE_PSTATE_FLAGS_MASK 0xf
|
||||
#define AMDGPU_CTX_STABLE_PSTATE_NONE 0
|
||||
#define AMDGPU_CTX_STABLE_PSTATE_STANDARD 1
|
||||
#define AMDGPU_CTX_STABLE_PSTATE_MIN_SCLK 2
|
||||
#define AMDGPU_CTX_STABLE_PSTATE_MIN_MCLK 3
|
||||
#define AMDGPU_CTX_STABLE_PSTATE_PEAK 4
|
||||
|
||||
struct drm_amdgpu_ctx_in {
|
||||
/** AMDGPU_CTX_OP_* */
|
||||
__u32 op;
|
||||
/** For future use, no flags defined so far */
|
||||
/** Flags */
|
||||
__u32 flags;
|
||||
__u32 ctx_id;
|
||||
/** AMDGPU_CTX_PRIORITY_* */
|
||||
@@ -262,6 +276,11 @@ union drm_amdgpu_ctx_out {
|
||||
/** Reset status since the last call of the ioctl. */
|
||||
__u32 reset_status;
|
||||
} state;
|
||||
|
||||
struct {
|
||||
__u32 flags;
|
||||
__u32 _pad;
|
||||
} pstate;
|
||||
};
|
||||
|
||||
union drm_amdgpu_ctx {
|
||||
@@ -514,6 +533,8 @@ struct drm_amdgpu_gem_op {
|
||||
#define AMDGPU_VM_MTYPE_UC (4 << 5)
|
||||
/* Use Read Write MTYPE instead of default MTYPE */
|
||||
#define AMDGPU_VM_MTYPE_RW (5 << 5)
|
||||
/* don't allocate MALL */
|
||||
#define AMDGPU_VM_PAGE_NOALLOC (1 << 9)
|
||||
|
||||
struct drm_amdgpu_gem_va {
|
||||
/** GEM object handle */
|
||||
@@ -728,6 +749,8 @@ struct drm_amdgpu_cs_chunk_data {
|
||||
#define AMDGPU_INFO_FW_DMCUB 0x14
|
||||
/* Subquery id: Query TOC firmware version */
|
||||
#define AMDGPU_INFO_FW_TOC 0x15
|
||||
/* Subquery id: Query CAP firmware version */
|
||||
#define AMDGPU_INFO_FW_CAP 0x16
|
||||
|
||||
/* number of bytes moved for TTM migration */
|
||||
#define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f
|
||||
@@ -971,6 +994,8 @@ struct drm_amdgpu_info_vbios {
|
||||
#define AMDGPU_VRAM_TYPE_DDR4 8
|
||||
#define AMDGPU_VRAM_TYPE_GDDR6 9
|
||||
#define AMDGPU_VRAM_TYPE_DDR5 10
|
||||
#define AMDGPU_VRAM_TYPE_LPDDR4 11
|
||||
#define AMDGPU_VRAM_TYPE_LPDDR5 12
|
||||
|
||||
struct drm_amdgpu_info_device {
|
||||
/** PCI Device ID */
|
||||
@@ -1133,7 +1158,11 @@ struct drm_amdgpu_info_video_caps {
|
||||
#define AMDGPU_FAMILY_RV 142 /* Raven */
|
||||
#define AMDGPU_FAMILY_NV 143 /* Navi10 */
|
||||
#define AMDGPU_FAMILY_VGH 144 /* Van Gogh */
|
||||
#define AMDGPU_FAMILY_GC_11_0_0 145 /* GC 11.0.0 */
|
||||
#define AMDGPU_FAMILY_YC 146 /* Yellow Carp */
|
||||
#define AMDGPU_FAMILY_GC_11_0_1 148 /* GC 11.0.1 */
|
||||
#define AMDGPU_FAMILY_GC_10_3_6 149 /* GC 10.3.6 */
|
||||
#define AMDGPU_FAMILY_GC_10_3_7 151 /* GC 10.3.7 */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@@ -572,6 +572,53 @@ extern "C" {
|
||||
*/
|
||||
#define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC fourcc_mod_code(INTEL, 8)
|
||||
|
||||
/*
|
||||
* Intel Tile 4 layout
|
||||
*
|
||||
* This is a tiled layout using 4KB tiles in a row-major layout. It has the same
|
||||
* shape as Tile Y at two granularities: 4KB (128B x 32) and 64B (16B x 4). It
|
||||
* only differs from Tile Y at the 256B granularity in between. At this
|
||||
* granularity, Tile Y has a shape of 16B x 32 rows, but this tiling has a shape
|
||||
* of 64B x 8 rows.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_4_TILED fourcc_mod_code(INTEL, 9)
|
||||
|
||||
/*
|
||||
* Intel color control surfaces (CCS) for DG2 render compression.
|
||||
*
|
||||
* The main surface is Tile 4 and at plane index 0. The CCS data is stored
|
||||
* outside of the GEM object in a reserved memory area dedicated for the
|
||||
* storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The
|
||||
* main surface pitch is required to be a multiple of four Tile 4 widths.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS fourcc_mod_code(INTEL, 10)
|
||||
|
||||
/*
|
||||
* Intel color control surfaces (CCS) for DG2 media compression.
|
||||
*
|
||||
* The main surface is Tile 4 and at plane index 0. For semi-planar formats
|
||||
* like NV12, the Y and UV planes are Tile 4 and are located at plane indices
|
||||
* 0 and 1, respectively. The CCS for all planes are stored outside of the
|
||||
* GEM object in a reserved memory area dedicated for the storage of the
|
||||
* CCS data for all RC/RC_CC/MC compressible GEM objects. The main surface
|
||||
* pitch is required to be a multiple of four Tile 4 widths.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_4_TILED_DG2_MC_CCS fourcc_mod_code(INTEL, 11)
|
||||
|
||||
/*
|
||||
* Intel Color Control Surface with Clear Color (CCS) for DG2 render compression.
|
||||
*
|
||||
* The main surface is Tile 4 and at plane index 0. The CCS data is stored
|
||||
* outside of the GEM object in a reserved memory area dedicated for the
|
||||
* storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. The
|
||||
* main surface pitch is required to be a multiple of four Tile 4 widths. The
|
||||
* clear color is stored at plane index 1 and the pitch should be ignored. The
|
||||
* format of the 256 bits of clear color data matches the one used for the
|
||||
* I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier, see its description
|
||||
* for details.
|
||||
*/
|
||||
#define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12)
|
||||
|
||||
/*
|
||||
* Tiled, NV12MT, grouped in 64 (pixels) x 32 (lines) -sized macroblocks
|
||||
*
|
||||
@@ -609,6 +656,28 @@ extern "C" {
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1)
|
||||
|
||||
/*
|
||||
* Qualcomm Tiled Format
|
||||
*
|
||||
* Similar to DRM_FORMAT_MOD_QCOM_COMPRESSED but not compressed.
|
||||
* Implementation may be platform and base-format specific.
|
||||
*
|
||||
* Each macrotile consists of m x n (mostly 4 x 4) tiles.
|
||||
* Pixel data pitch/stride is aligned with macrotile width.
|
||||
* Pixel data height is aligned with macrotile height.
|
||||
* Entire pixel data buffer is aligned with 4k(bytes).
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_QCOM_TILED3 fourcc_mod_code(QCOM, 3)
|
||||
|
||||
/*
|
||||
* Qualcomm Alternate Tiled Format
|
||||
*
|
||||
* Alternate tiled format typically only used within GMEM.
|
||||
* Implementation may be platform and base-format specific.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_QCOM_TILED2 fourcc_mod_code(QCOM, 2)
|
||||
|
||||
|
||||
/* Vivante framebuffer modifiers */
|
||||
|
||||
/*
|
||||
@@ -1375,11 +1444,11 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
|
||||
#define AMD_FMT_MOD_PIPE_MASK 0x7
|
||||
|
||||
#define AMD_FMT_MOD_SET(field, value) \
|
||||
((uint64_t)(value) << AMD_FMT_MOD_##field##_SHIFT)
|
||||
((__u64)(value) << AMD_FMT_MOD_##field##_SHIFT)
|
||||
#define AMD_FMT_MOD_GET(field, value) \
|
||||
(((value) >> AMD_FMT_MOD_##field##_SHIFT) & AMD_FMT_MOD_##field##_MASK)
|
||||
#define AMD_FMT_MOD_CLEAR(field) \
|
||||
(~((uint64_t)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))
|
||||
(~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT))
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
||||
@@ -663,41 +663,73 @@ struct drm_mode_fb_cmd {
|
||||
#define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */
|
||||
#define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */
|
||||
|
||||
/**
|
||||
* struct drm_mode_fb_cmd2 - Frame-buffer metadata.
|
||||
*
|
||||
* This struct holds frame-buffer metadata. There are two ways to use it:
|
||||
*
|
||||
* - User-space can fill this struct and perform a &DRM_IOCTL_MODE_ADDFB2
|
||||
* ioctl to register a new frame-buffer. The new frame-buffer object ID will
|
||||
* be set by the kernel in @fb_id.
|
||||
* - User-space can set @fb_id and perform a &DRM_IOCTL_MODE_GETFB2 ioctl to
|
||||
* fetch metadata about an existing frame-buffer.
|
||||
*
|
||||
* In case of planar formats, this struct allows up to 4 buffer objects with
|
||||
* offsets and pitches per plane. The pitch and offset order is dictated by the
|
||||
* format FourCC as defined by ``drm_fourcc.h``, e.g. NV12 is described as:
|
||||
*
|
||||
* YUV 4:2:0 image with a plane of 8 bit Y samples followed by an
|
||||
* interleaved U/V plane containing 8 bit 2x2 subsampled colour difference
|
||||
* samples.
|
||||
*
|
||||
* So it would consist of a Y plane at ``offsets[0]`` and a UV plane at
|
||||
* ``offsets[1]``.
|
||||
*
|
||||
* To accommodate tiled, compressed, etc formats, a modifier can be specified.
|
||||
* For more information see the "Format Modifiers" section. Note that even
|
||||
* though it looks like we have a modifier per-plane, we in fact do not. The
|
||||
* modifier for each plane must be identical. Thus all combinations of
|
||||
* different data layouts for multi-plane formats must be enumerated as
|
||||
* separate modifiers.
|
||||
*
|
||||
* All of the entries in @handles, @pitches, @offsets and @modifier must be
|
||||
* zero when unused. Warning, for @offsets and @modifier zero can't be used to
|
||||
* figure out whether the entry is used or not since it's a valid value (a zero
|
||||
* offset is common, and a zero modifier is &DRM_FORMAT_MOD_LINEAR).
|
||||
*/
|
||||
struct drm_mode_fb_cmd2 {
|
||||
/** @fb_id: Object ID of the frame-buffer. */
|
||||
__u32 fb_id;
|
||||
/** @width: Width of the frame-buffer. */
|
||||
__u32 width;
|
||||
/** @height: Height of the frame-buffer. */
|
||||
__u32 height;
|
||||
__u32 pixel_format; /* fourcc code from drm_fourcc.h */
|
||||
__u32 flags; /* see above flags */
|
||||
/**
|
||||
* @pixel_format: FourCC format code, see ``DRM_FORMAT_*`` constants in
|
||||
* ``drm_fourcc.h``.
|
||||
*/
|
||||
__u32 pixel_format;
|
||||
/**
|
||||
* @flags: Frame-buffer flags (see &DRM_MODE_FB_INTERLACED and
|
||||
* &DRM_MODE_FB_MODIFIERS).
|
||||
*/
|
||||
__u32 flags;
|
||||
|
||||
/*
|
||||
* In case of planar formats, this ioctl allows up to 4
|
||||
* buffer objects with offsets and pitches per plane.
|
||||
* The pitch and offset order is dictated by the fourcc,
|
||||
* e.g. NV12 (https://fourcc.org/yuv.php#NV12) is described as:
|
||||
*
|
||||
* YUV 4:2:0 image with a plane of 8 bit Y samples
|
||||
* followed by an interleaved U/V plane containing
|
||||
* 8 bit 2x2 subsampled colour difference samples.
|
||||
*
|
||||
* So it would consist of Y as offsets[0] and UV as
|
||||
* offsets[1]. Note that offsets[0] will generally
|
||||
* be 0 (but this is not required).
|
||||
*
|
||||
* To accommodate tiled, compressed, etc formats, a
|
||||
* modifier can be specified. The default value of zero
|
||||
* indicates "native" format as specified by the fourcc.
|
||||
* Vendor specific modifier token. Note that even though
|
||||
* it looks like we have a modifier per-plane, we in fact
|
||||
* do not. The modifier for each plane must be identical.
|
||||
* Thus all combinations of different data layouts for
|
||||
* multi plane formats must be enumerated as separate
|
||||
* modifiers.
|
||||
/**
|
||||
* @handles: GEM buffer handle, one per plane. Set to 0 if the plane is
|
||||
* unused. The same handle can be used for multiple planes.
|
||||
*/
|
||||
__u32 handles[4];
|
||||
__u32 pitches[4]; /* pitch for each plane */
|
||||
__u32 offsets[4]; /* offset of each plane */
|
||||
__u64 modifier[4]; /* ie, tiling, compress */
|
||||
/** @pitches: Pitch (aka. stride) in bytes, one per plane. */
|
||||
__u32 pitches[4];
|
||||
/** @offsets: Offset into the buffer in bytes, one per plane. */
|
||||
__u32 offsets[4];
|
||||
/**
|
||||
* @modifier: Format modifier, one per plane. See ``DRM_FORMAT_MOD_*``
|
||||
* constants in ``drm_fourcc.h``. All planes must use the same
|
||||
* modifier. Ignored unless &DRM_MODE_FB_MODIFIERS is set in @flags.
|
||||
*/
|
||||
__u64 modifier[4];
|
||||
};
|
||||
|
||||
#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01
|
||||
|
||||
@@ -154,25 +154,77 @@ enum i915_mocs_table_index {
|
||||
I915_MOCS_CACHED,
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* enum drm_i915_gem_engine_class - uapi engine type enumeration
|
||||
*
|
||||
* Different engines serve different roles, and there may be more than one
|
||||
* engine serving each role. enum drm_i915_gem_engine_class provides a
|
||||
* classification of the role of the engine, which may be used when requesting
|
||||
* operations to be performed on a certain subset of engines, or for providing
|
||||
* information about that group.
|
||||
* engine serving each role. This enum provides a classification of the role
|
||||
* of the engine, which may be used when requesting operations to be performed
|
||||
* on a certain subset of engines, or for providing information about that
|
||||
* group.
|
||||
*/
|
||||
enum drm_i915_gem_engine_class {
|
||||
/**
|
||||
* @I915_ENGINE_CLASS_RENDER:
|
||||
*
|
||||
* Render engines support instructions used for 3D, Compute (GPGPU),
|
||||
* and programmable media workloads. These instructions fetch data and
|
||||
* dispatch individual work items to threads that operate in parallel.
|
||||
* The threads run small programs (called "kernels" or "shaders") on
|
||||
* the GPU's execution units (EUs).
|
||||
*/
|
||||
I915_ENGINE_CLASS_RENDER = 0,
|
||||
|
||||
/**
|
||||
* @I915_ENGINE_CLASS_COPY:
|
||||
*
|
||||
* Copy engines (also referred to as "blitters") support instructions
|
||||
* that move blocks of data from one location in memory to another,
|
||||
* or that fill a specified location of memory with fixed data.
|
||||
* Copy engines can perform pre-defined logical or bitwise operations
|
||||
* on the source, destination, or pattern data.
|
||||
*/
|
||||
I915_ENGINE_CLASS_COPY = 1,
|
||||
|
||||
/**
|
||||
* @I915_ENGINE_CLASS_VIDEO:
|
||||
*
|
||||
* Video engines (also referred to as "bit stream decode" (BSD) or
|
||||
* "vdbox") support instructions that perform fixed-function media
|
||||
* decode and encode.
|
||||
*/
|
||||
I915_ENGINE_CLASS_VIDEO = 2,
|
||||
|
||||
/**
|
||||
* @I915_ENGINE_CLASS_VIDEO_ENHANCE:
|
||||
*
|
||||
* Video enhancement engines (also referred to as "vebox") support
|
||||
* instructions related to image enhancement.
|
||||
*/
|
||||
I915_ENGINE_CLASS_VIDEO_ENHANCE = 3,
|
||||
|
||||
/* should be kept compact */
|
||||
/**
|
||||
* @I915_ENGINE_CLASS_COMPUTE:
|
||||
*
|
||||
* Compute engines support a subset of the instructions available
|
||||
* on render engines: compute engines support Compute (GPGPU) and
|
||||
* programmable media workloads, but do not support the 3D pipeline.
|
||||
*/
|
||||
I915_ENGINE_CLASS_COMPUTE = 4,
|
||||
|
||||
/* Values in this enum should be kept compact. */
|
||||
|
||||
/**
|
||||
* @I915_ENGINE_CLASS_INVALID:
|
||||
*
|
||||
* Placeholder value to represent an invalid engine class assignment.
|
||||
*/
|
||||
I915_ENGINE_CLASS_INVALID = -1
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* struct i915_engine_class_instance - Engine class/instance identifier
|
||||
*
|
||||
* There may be more than one engine fulfilling any role within the system.
|
||||
* Each engine of a class is given a unique instance number and therefore
|
||||
* any engine can be specified by its class:instance tuplet. APIs that allow
|
||||
@@ -180,10 +232,21 @@ enum drm_i915_gem_engine_class {
|
||||
* for this identification.
|
||||
*/
|
||||
struct i915_engine_class_instance {
|
||||
__u16 engine_class; /* see enum drm_i915_gem_engine_class */
|
||||
__u16 engine_instance;
|
||||
/**
|
||||
* @engine_class:
|
||||
*
|
||||
* Engine class from enum drm_i915_gem_engine_class
|
||||
*/
|
||||
__u16 engine_class;
|
||||
#define I915_ENGINE_CLASS_INVALID_NONE -1
|
||||
#define I915_ENGINE_CLASS_INVALID_VIRTUAL -2
|
||||
|
||||
/**
|
||||
* @engine_instance:
|
||||
*
|
||||
* Engine instance.
|
||||
*/
|
||||
__u16 engine_instance;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1118,10 +1181,16 @@ struct drm_i915_gem_exec_object2 {
|
||||
/**
|
||||
* When the EXEC_OBJECT_PINNED flag is specified this is populated by
|
||||
* the user with the GTT offset at which this object will be pinned.
|
||||
*
|
||||
* When the I915_EXEC_NO_RELOC flag is specified this must contain the
|
||||
* presumed_offset of the object.
|
||||
*
|
||||
* During execbuffer2 the kernel populates it with the value of the
|
||||
* current GTT offset of the object, for future presumed_offset writes.
|
||||
*
|
||||
* See struct drm_i915_gem_create_ext for the rules when dealing with
|
||||
* alignment restrictions with I915_MEMORY_CLASS_DEVICE, on devices with
|
||||
* minimum page sizes, like DG2.
|
||||
*/
|
||||
__u64 offset;
|
||||
|
||||
@@ -2651,24 +2720,65 @@ enum drm_i915_perf_record_type {
|
||||
DRM_I915_PERF_RECORD_MAX /* non-ABI */
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* struct drm_i915_perf_oa_config
|
||||
*
|
||||
* Structure to upload perf dynamic configuration into the kernel.
|
||||
*/
|
||||
struct drm_i915_perf_oa_config {
|
||||
/** String formatted like "%08x-%04x-%04x-%04x-%012x" */
|
||||
/**
|
||||
* @uuid:
|
||||
*
|
||||
* String formatted like "%\08x-%\04x-%\04x-%\04x-%\012x"
|
||||
*/
|
||||
char uuid[36];
|
||||
|
||||
/**
|
||||
* @n_mux_regs:
|
||||
*
|
||||
* Number of mux regs in &mux_regs_ptr.
|
||||
*/
|
||||
__u32 n_mux_regs;
|
||||
|
||||
/**
|
||||
* @n_boolean_regs:
|
||||
*
|
||||
* Number of boolean regs in &boolean_regs_ptr.
|
||||
*/
|
||||
__u32 n_boolean_regs;
|
||||
|
||||
/**
|
||||
* @n_flex_regs:
|
||||
*
|
||||
* Number of flex regs in &flex_regs_ptr.
|
||||
*/
|
||||
__u32 n_flex_regs;
|
||||
|
||||
/*
|
||||
* These fields are pointers to tuples of u32 values (register address,
|
||||
* value). For example the expected length of the buffer pointed by
|
||||
* mux_regs_ptr is (2 * sizeof(u32) * n_mux_regs).
|
||||
/**
|
||||
* @mux_regs_ptr:
|
||||
*
|
||||
* Pointer to tuples of u32 values (register address, value) for mux
|
||||
* registers. Expected length of buffer is (2 * sizeof(u32) *
|
||||
* &n_mux_regs).
|
||||
*/
|
||||
__u64 mux_regs_ptr;
|
||||
|
||||
/**
|
||||
* @boolean_regs_ptr:
|
||||
*
|
||||
* Pointer to tuples of u32 values (register address, value) for mux
|
||||
* registers. Expected length of buffer is (2 * sizeof(u32) *
|
||||
* &n_boolean_regs).
|
||||
*/
|
||||
__u64 boolean_regs_ptr;
|
||||
|
||||
/**
|
||||
* @flex_regs_ptr:
|
||||
*
|
||||
* Pointer to tuples of u32 values (register address, value) for mux
|
||||
* registers. Expected length of buffer is (2 * sizeof(u32) *
|
||||
* &n_flex_regs).
|
||||
*/
|
||||
__u64 flex_regs_ptr;
|
||||
};
|
||||
|
||||
@@ -2679,12 +2789,24 @@ struct drm_i915_perf_oa_config {
|
||||
* @data_ptr is also depends on the specific @query_id.
|
||||
*/
|
||||
struct drm_i915_query_item {
|
||||
/** @query_id: The id for this query */
|
||||
/**
|
||||
* @query_id:
|
||||
*
|
||||
* The id for this query. Currently accepted query IDs are:
|
||||
* - %DRM_I915_QUERY_TOPOLOGY_INFO (see struct drm_i915_query_topology_info)
|
||||
* - %DRM_I915_QUERY_ENGINE_INFO (see struct drm_i915_engine_info)
|
||||
* - %DRM_I915_QUERY_PERF_CONFIG (see struct drm_i915_query_perf_config)
|
||||
* - %DRM_I915_QUERY_MEMORY_REGIONS (see struct drm_i915_query_memory_regions)
|
||||
* - %DRM_I915_QUERY_HWCONFIG_BLOB (see `GuC HWCONFIG blob uAPI`)
|
||||
* - %DRM_I915_QUERY_GEOMETRY_SUBSLICES (see struct drm_i915_query_topology_info)
|
||||
*/
|
||||
__u64 query_id;
|
||||
#define DRM_I915_QUERY_TOPOLOGY_INFO 1
|
||||
#define DRM_I915_QUERY_ENGINE_INFO 2
|
||||
#define DRM_I915_QUERY_PERF_CONFIG 3
|
||||
#define DRM_I915_QUERY_MEMORY_REGIONS 4
|
||||
#define DRM_I915_QUERY_TOPOLOGY_INFO 1
|
||||
#define DRM_I915_QUERY_ENGINE_INFO 2
|
||||
#define DRM_I915_QUERY_PERF_CONFIG 3
|
||||
#define DRM_I915_QUERY_MEMORY_REGIONS 4
|
||||
#define DRM_I915_QUERY_HWCONFIG_BLOB 5
|
||||
#define DRM_I915_QUERY_GEOMETRY_SUBSLICES 6
|
||||
/* Must be kept compact -- no holes and well documented */
|
||||
|
||||
/**
|
||||
@@ -2700,14 +2822,17 @@ struct drm_i915_query_item {
|
||||
/**
|
||||
* @flags:
|
||||
*
|
||||
* When query_id == DRM_I915_QUERY_TOPOLOGY_INFO, must be 0.
|
||||
* When &query_id == %DRM_I915_QUERY_TOPOLOGY_INFO, must be 0.
|
||||
*
|
||||
* When query_id == DRM_I915_QUERY_PERF_CONFIG, must be one of the
|
||||
* When &query_id == %DRM_I915_QUERY_PERF_CONFIG, must be one of the
|
||||
* following:
|
||||
*
|
||||
* - DRM_I915_QUERY_PERF_CONFIG_LIST
|
||||
* - DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
|
||||
* - DRM_I915_QUERY_PERF_CONFIG_FOR_UUID
|
||||
* - %DRM_I915_QUERY_PERF_CONFIG_LIST
|
||||
* - %DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
|
||||
* - %DRM_I915_QUERY_PERF_CONFIG_FOR_UUID
|
||||
*
|
||||
* When &query_id == %DRM_I915_QUERY_GEOMETRY_SUBSLICES must contain
|
||||
* a struct i915_engine_class_instance that references a render engine.
|
||||
*/
|
||||
__u32 flags;
|
||||
#define DRM_I915_QUERY_PERF_CONFIG_LIST 1
|
||||
@@ -2765,66 +2890,112 @@ struct drm_i915_query {
|
||||
__u64 items_ptr;
|
||||
};
|
||||
|
||||
/*
|
||||
* Data written by the kernel with query DRM_I915_QUERY_TOPOLOGY_INFO :
|
||||
/**
|
||||
* struct drm_i915_query_topology_info
|
||||
*
|
||||
* data: contains the 3 pieces of information :
|
||||
*
|
||||
* - the slice mask with one bit per slice telling whether a slice is
|
||||
* available. The availability of slice X can be queried with the following
|
||||
* formula :
|
||||
*
|
||||
* (data[X / 8] >> (X % 8)) & 1
|
||||
*
|
||||
* - the subslice mask for each slice with one bit per subslice telling
|
||||
* whether a subslice is available. Gen12 has dual-subslices, which are
|
||||
* similar to two gen11 subslices. For gen12, this array represents dual-
|
||||
* subslices. The availability of subslice Y in slice X can be queried
|
||||
* with the following formula :
|
||||
*
|
||||
* (data[subslice_offset +
|
||||
* X * subslice_stride +
|
||||
* Y / 8] >> (Y % 8)) & 1
|
||||
*
|
||||
* - the EU mask for each subslice in each slice with one bit per EU telling
|
||||
* whether an EU is available. The availability of EU Z in subslice Y in
|
||||
* slice X can be queried with the following formula :
|
||||
*
|
||||
* (data[eu_offset +
|
||||
* (X * max_subslices + Y) * eu_stride +
|
||||
* Z / 8] >> (Z % 8)) & 1
|
||||
* Describes slice/subslice/EU information queried by
|
||||
* %DRM_I915_QUERY_TOPOLOGY_INFO
|
||||
*/
|
||||
struct drm_i915_query_topology_info {
|
||||
/*
|
||||
/**
|
||||
* @flags:
|
||||
*
|
||||
* Unused for now. Must be cleared to zero.
|
||||
*/
|
||||
__u16 flags;
|
||||
|
||||
/**
|
||||
* @max_slices:
|
||||
*
|
||||
* The number of bits used to express the slice mask.
|
||||
*/
|
||||
__u16 max_slices;
|
||||
|
||||
/**
|
||||
* @max_subslices:
|
||||
*
|
||||
* The number of bits used to express the subslice mask.
|
||||
*/
|
||||
__u16 max_subslices;
|
||||
|
||||
/**
|
||||
* @max_eus_per_subslice:
|
||||
*
|
||||
* The number of bits in the EU mask that correspond to a single
|
||||
* subslice's EUs.
|
||||
*/
|
||||
__u16 max_eus_per_subslice;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @subslice_offset:
|
||||
*
|
||||
* Offset in data[] at which the subslice masks are stored.
|
||||
*/
|
||||
__u16 subslice_offset;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @subslice_stride:
|
||||
*
|
||||
* Stride at which each of the subslice masks for each slice are
|
||||
* stored.
|
||||
*/
|
||||
__u16 subslice_stride;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @eu_offset:
|
||||
*
|
||||
* Offset in data[] at which the EU masks are stored.
|
||||
*/
|
||||
__u16 eu_offset;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @eu_stride:
|
||||
*
|
||||
* Stride at which each of the EU masks for each subslice are stored.
|
||||
*/
|
||||
__u16 eu_stride;
|
||||
|
||||
/**
|
||||
* @data:
|
||||
*
|
||||
* Contains 3 pieces of information :
|
||||
*
|
||||
* - The slice mask with one bit per slice telling whether a slice is
|
||||
* available. The availability of slice X can be queried with the
|
||||
* following formula :
|
||||
*
|
||||
* .. code:: c
|
||||
*
|
||||
* (data[X / 8] >> (X % 8)) & 1
|
||||
*
|
||||
* Starting with Xe_HP platforms, Intel hardware no longer has
|
||||
* traditional slices so i915 will always report a single slice
|
||||
* (hardcoded slicemask = 0x1) which contains all of the platform's
|
||||
* subslices. I.e., the mask here does not reflect any of the newer
|
||||
* hardware concepts such as "gslices" or "cslices" since userspace
|
||||
* is capable of inferring those from the subslice mask.
|
||||
*
|
||||
* - The subslice mask for each slice with one bit per subslice telling
|
||||
* whether a subslice is available. Starting with Gen12 we use the
|
||||
* term "subslice" to refer to what the hardware documentation
|
||||
* describes as a "dual-subslices." The availability of subslice Y
|
||||
* in slice X can be queried with the following formula :
|
||||
*
|
||||
* .. code:: c
|
||||
*
|
||||
* (data[subslice_offset + X * subslice_stride + Y / 8] >> (Y % 8)) & 1
|
||||
*
|
||||
* - The EU mask for each subslice in each slice, with one bit per EU
|
||||
* telling whether an EU is available. The availability of EU Z in
|
||||
* subslice Y in slice X can be queried with the following formula :
|
||||
*
|
||||
* .. code:: c
|
||||
*
|
||||
* (data[eu_offset +
|
||||
* (X * max_subslices + Y) * eu_stride +
|
||||
* Z / 8
|
||||
* ] >> (Z % 8)) & 1
|
||||
*/
|
||||
__u8 data[];
|
||||
};
|
||||
|
||||
@@ -2945,52 +3116,68 @@ struct drm_i915_query_engine_info {
|
||||
struct drm_i915_engine_info engines[];
|
||||
};
|
||||
|
||||
/*
|
||||
* Data written by the kernel with query DRM_I915_QUERY_PERF_CONFIG.
|
||||
/**
|
||||
* struct drm_i915_query_perf_config
|
||||
*
|
||||
* Data written by the kernel with query %DRM_I915_QUERY_PERF_CONFIG and
|
||||
* %DRM_I915_QUERY_GEOMETRY_SUBSLICES.
|
||||
*/
|
||||
struct drm_i915_query_perf_config {
|
||||
union {
|
||||
/*
|
||||
* When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 sets
|
||||
* this fields to the number of configurations available.
|
||||
/**
|
||||
* @n_configs:
|
||||
*
|
||||
* When &drm_i915_query_item.flags ==
|
||||
* %DRM_I915_QUERY_PERF_CONFIG_LIST, i915 sets this fields to
|
||||
* the number of configurations available.
|
||||
*/
|
||||
__u64 n_configs;
|
||||
|
||||
/*
|
||||
* When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID,
|
||||
* i915 will use the value in this field as configuration
|
||||
* identifier to decide what data to write into config_ptr.
|
||||
/**
|
||||
* @config:
|
||||
*
|
||||
* When &drm_i915_query_item.flags ==
|
||||
* %DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID, i915 will use the
|
||||
* value in this field as configuration identifier to decide
|
||||
* what data to write into config_ptr.
|
||||
*/
|
||||
__u64 config;
|
||||
|
||||
/*
|
||||
* When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID,
|
||||
* i915 will use the value in this field as configuration
|
||||
* identifier to decide what data to write into config_ptr.
|
||||
/**
|
||||
* @uuid:
|
||||
*
|
||||
* When &drm_i915_query_item.flags ==
|
||||
* %DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID, i915 will use the
|
||||
* value in this field as configuration identifier to decide
|
||||
* what data to write into config_ptr.
|
||||
*
|
||||
* String formatted like "%08x-%04x-%04x-%04x-%012x"
|
||||
*/
|
||||
char uuid[36];
|
||||
};
|
||||
|
||||
/*
|
||||
/**
|
||||
* @flags:
|
||||
*
|
||||
* Unused for now. Must be cleared to zero.
|
||||
*/
|
||||
__u32 flags;
|
||||
|
||||
/*
|
||||
* When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 will
|
||||
* write an array of __u64 of configuration identifiers.
|
||||
/**
|
||||
* @data:
|
||||
*
|
||||
* When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_DATA, i915 will
|
||||
* write a struct drm_i915_perf_oa_config. If the following fields of
|
||||
* drm_i915_perf_oa_config are set not set to 0, i915 will write into
|
||||
* the associated pointers the values of submitted when the
|
||||
* When &drm_i915_query_item.flags == %DRM_I915_QUERY_PERF_CONFIG_LIST,
|
||||
* i915 will write an array of __u64 of configuration identifiers.
|
||||
*
|
||||
* When &drm_i915_query_item.flags == %DRM_I915_QUERY_PERF_CONFIG_DATA,
|
||||
* i915 will write a struct drm_i915_perf_oa_config. If the following
|
||||
* fields of struct drm_i915_perf_oa_config are not set to 0, i915 will
|
||||
* write into the associated pointers the values of submitted when the
|
||||
* configuration was created :
|
||||
*
|
||||
* - n_mux_regs
|
||||
* - n_boolean_regs
|
||||
* - n_flex_regs
|
||||
* - &drm_i915_perf_oa_config.n_mux_regs
|
||||
* - &drm_i915_perf_oa_config.n_boolean_regs
|
||||
* - &drm_i915_perf_oa_config.n_flex_regs
|
||||
*/
|
||||
__u8 data[];
|
||||
};
|
||||
@@ -3128,6 +3315,16 @@ struct drm_i915_query_memory_regions {
|
||||
struct drm_i915_memory_region_info regions[];
|
||||
};
|
||||
|
||||
/**
|
||||
* DOC: GuC HWCONFIG blob uAPI
|
||||
*
|
||||
* The GuC produces a blob with information about the current device.
|
||||
* i915 reads this blob from GuC and makes it available via this uAPI.
|
||||
*
|
||||
* The format and meaning of the blob content are documented in the
|
||||
* Programmer's Reference Manual.
|
||||
*/
|
||||
|
||||
/**
|
||||
* struct drm_i915_gem_create_ext - Existing gem_create behaviour, with added
|
||||
* extension support using struct i915_user_extension.
|
||||
@@ -3144,11 +3341,40 @@ struct drm_i915_gem_create_ext {
|
||||
*
|
||||
* The (page-aligned) allocated size for the object will be returned.
|
||||
*
|
||||
* Note that for some devices we have might have further minimum
|
||||
* page-size restrictions(larger than 4K), like for device local-memory.
|
||||
* However in general the final size here should always reflect any
|
||||
* rounding up, if for example using the I915_GEM_CREATE_EXT_MEMORY_REGIONS
|
||||
* extension to place the object in device local-memory.
|
||||
*
|
||||
* DG2 64K min page size implications:
|
||||
*
|
||||
* On discrete platforms, starting from DG2, we have to contend with GTT
|
||||
* page size restrictions when dealing with I915_MEMORY_CLASS_DEVICE
|
||||
* objects. Specifically the hardware only supports 64K or larger GTT
|
||||
* page sizes for such memory. The kernel will already ensure that all
|
||||
* I915_MEMORY_CLASS_DEVICE memory is allocated using 64K or larger page
|
||||
* sizes underneath.
|
||||
*
|
||||
* Note that the returned size here will always reflect any required
|
||||
* rounding up done by the kernel, i.e 4K will now become 64K on devices
|
||||
* such as DG2.
|
||||
*
|
||||
* Special DG2 GTT address alignment requirement:
|
||||
*
|
||||
* The GTT alignment will also need to be at least 2M for such objects.
|
||||
*
|
||||
* Note that due to how the hardware implements 64K GTT page support, we
|
||||
* have some further complications:
|
||||
*
|
||||
* 1) The entire PDE (which covers a 2MB virtual address range), must
|
||||
* contain only 64K PTEs, i.e mixing 4K and 64K PTEs in the same
|
||||
* PDE is forbidden by the hardware.
|
||||
*
|
||||
* 2) We still need to support 4K PTEs for I915_MEMORY_CLASS_SYSTEM
|
||||
* objects.
|
||||
*
|
||||
* To keep things simple for userland, we mandate that any GTT mappings
|
||||
* must be aligned to and rounded up to 2MB. The kernel will internally
|
||||
* pad them out to the next 2MB boundary. As this only wastes virtual
|
||||
* address space and avoids userland having to copy any needlessly
|
||||
* complicated PDE sharing scheme (coloring) and only affects DG2, this
|
||||
* is deemed to be a good compromise.
|
||||
*/
|
||||
__u64 size;
|
||||
/**
|
||||
|
||||
@@ -67,16 +67,25 @@ struct drm_msm_timespec {
|
||||
__s64 tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
#define MSM_PARAM_GPU_ID 0x01
|
||||
#define MSM_PARAM_GMEM_SIZE 0x02
|
||||
#define MSM_PARAM_CHIP_ID 0x03
|
||||
#define MSM_PARAM_MAX_FREQ 0x04
|
||||
#define MSM_PARAM_TIMESTAMP 0x05
|
||||
#define MSM_PARAM_GMEM_BASE 0x06
|
||||
#define MSM_PARAM_PRIORITIES 0x07 /* The # of priority levels */
|
||||
#define MSM_PARAM_PP_PGTABLE 0x08 /* => 1 for per-process pagetables, else 0 */
|
||||
#define MSM_PARAM_FAULTS 0x09
|
||||
#define MSM_PARAM_SUSPENDS 0x0a
|
||||
/* Below "RO" indicates a read-only param, "WO" indicates write-only, and
|
||||
* "RW" indicates a param that can be both read (GET_PARAM) and written
|
||||
* (SET_PARAM)
|
||||
*/
|
||||
#define MSM_PARAM_GPU_ID 0x01 /* RO */
|
||||
#define MSM_PARAM_GMEM_SIZE 0x02 /* RO */
|
||||
#define MSM_PARAM_CHIP_ID 0x03 /* RO */
|
||||
#define MSM_PARAM_MAX_FREQ 0x04 /* RO */
|
||||
#define MSM_PARAM_TIMESTAMP 0x05 /* RO */
|
||||
#define MSM_PARAM_GMEM_BASE 0x06 /* RO */
|
||||
#define MSM_PARAM_PRIORITIES 0x07 /* RO: The # of priority levels */
|
||||
#define MSM_PARAM_PP_PGTABLE 0x08 /* RO: Deprecated, always returns zero */
|
||||
#define MSM_PARAM_FAULTS 0x09 /* RO */
|
||||
#define MSM_PARAM_SUSPENDS 0x0a /* RO */
|
||||
#define MSM_PARAM_SYSPROF 0x0b /* WO: 1 preserves perfcntrs, 2 also disables suspend */
|
||||
#define MSM_PARAM_COMM 0x0c /* WO: override for task->comm */
|
||||
#define MSM_PARAM_CMDLINE 0x0d /* WO: override for task cmdline */
|
||||
#define MSM_PARAM_VA_START 0x0e /* RO: start of valid GPU iova range */
|
||||
#define MSM_PARAM_VA_SIZE 0x0f /* RO: size of valid GPU iova range (bytes) */
|
||||
|
||||
/* For backwards compat. The original support for preemption was based on
|
||||
* a single ring per priority level so # of priority levels equals the #
|
||||
@@ -90,6 +99,8 @@ struct drm_msm_param {
|
||||
__u32 pipe; /* in, MSM_PIPE_x */
|
||||
__u32 param; /* in, MSM_PARAM_x */
|
||||
__u64 value; /* out (get_param) or in (set_param) */
|
||||
__u32 len; /* zero for non-pointer params */
|
||||
__u32 pad; /* must be zero */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -126,6 +137,7 @@ struct drm_msm_gem_new {
|
||||
#define MSM_INFO_GET_IOVA 0x01 /* get iova, returned by value */
|
||||
#define MSM_INFO_SET_NAME 0x02 /* set the debug name (by pointer) */
|
||||
#define MSM_INFO_GET_NAME 0x03 /* get debug name, returned by pointer */
|
||||
#define MSM_INFO_SET_IOVA 0x04 /* set the iova, passed by value */
|
||||
|
||||
struct drm_msm_gem_info {
|
||||
__u32 handle; /* in */
|
||||
@@ -227,6 +239,7 @@ struct drm_msm_gem_submit_bo {
|
||||
#define MSM_SUBMIT_SUDO 0x10000000 /* run submitted cmds from RB */
|
||||
#define MSM_SUBMIT_SYNCOBJ_IN 0x08000000 /* enable input syncobj */
|
||||
#define MSM_SUBMIT_SYNCOBJ_OUT 0x04000000 /* enable output syncobj */
|
||||
#define MSM_SUBMIT_FENCE_SN_IN 0x02000000 /* userspace passes in seqno fence */
|
||||
#define MSM_SUBMIT_FLAGS ( \
|
||||
MSM_SUBMIT_NO_IMPLICIT | \
|
||||
MSM_SUBMIT_FENCE_FD_IN | \
|
||||
@@ -234,6 +247,7 @@ struct drm_msm_gem_submit_bo {
|
||||
MSM_SUBMIT_SUDO | \
|
||||
MSM_SUBMIT_SYNCOBJ_IN | \
|
||||
MSM_SUBMIT_SYNCOBJ_OUT | \
|
||||
MSM_SUBMIT_FENCE_SN_IN | \
|
||||
0)
|
||||
|
||||
#define MSM_SUBMIT_SYNCOBJ_RESET 0x00000001 /* Reset syncobj after wait. */
|
||||
@@ -253,7 +267,7 @@ struct drm_msm_gem_submit_syncobj {
|
||||
*/
|
||||
struct drm_msm_gem_submit {
|
||||
__u32 flags; /* MSM_PIPE_x | MSM_SUBMIT_x */
|
||||
__u32 fence; /* out */
|
||||
__u32 fence; /* out (or in with MSM_SUBMIT_FENCE_SN_IN flag) */
|
||||
__u32 nr_bos; /* in, number of submit_bo's */
|
||||
__u32 nr_cmds; /* in, number of submit_cmd's */
|
||||
__u64 bos; /* in, ptr to array of submit_bo's */
|
||||
@@ -333,9 +347,7 @@ struct drm_msm_submitqueue_query {
|
||||
};
|
||||
|
||||
#define DRM_MSM_GET_PARAM 0x00
|
||||
/* placeholder:
|
||||
#define DRM_MSM_SET_PARAM 0x01
|
||||
*/
|
||||
#define DRM_MSM_GEM_NEW 0x02
|
||||
#define DRM_MSM_GEM_INFO 0x03
|
||||
#define DRM_MSM_GEM_CPU_PREP 0x04
|
||||
@@ -351,6 +363,7 @@ struct drm_msm_submitqueue_query {
|
||||
#define DRM_MSM_SUBMITQUEUE_QUERY 0x0C
|
||||
|
||||
#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
|
||||
#define DRM_IOCTL_MSM_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_SET_PARAM, struct drm_msm_param)
|
||||
#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new)
|
||||
#define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info)
|
||||
#define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep)
|
||||
|
||||
@@ -84,14 +84,14 @@ struct drm_panfrost_wait_bo {
|
||||
__s64 timeout_ns; /* absolute */
|
||||
};
|
||||
|
||||
/* Valid flags to pass to drm_panfrost_create_bo */
|
||||
#define PANFROST_BO_NOEXEC 1
|
||||
#define PANFROST_BO_HEAP 2
|
||||
|
||||
/**
|
||||
* struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.
|
||||
*
|
||||
* There are currently no values for the flags argument, but it may be
|
||||
* used in a future extension.
|
||||
* The flags argument is a bit mask of PANFROST_BO_* flags.
|
||||
*/
|
||||
struct drm_panfrost_create_bo {
|
||||
__u32 size;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
*
|
||||
* Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA
|
||||
* Copyright © 2009-2022 VMware, Inc., Palo Alto, CA., USA
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -92,6 +92,12 @@ extern "C" {
|
||||
*
|
||||
* DRM_VMW_PARAM_SM5
|
||||
* SM5 support is enabled.
|
||||
*
|
||||
* DRM_VMW_PARAM_GL43
|
||||
* SM5.1+GL4.3 support is enabled.
|
||||
*
|
||||
* DRM_VMW_PARAM_DEVICE_ID
|
||||
* PCI ID of the underlying SVGA device.
|
||||
*/
|
||||
|
||||
#define DRM_VMW_PARAM_NUM_STREAMS 0
|
||||
@@ -111,6 +117,7 @@ extern "C" {
|
||||
#define DRM_VMW_PARAM_SM4_1 14
|
||||
#define DRM_VMW_PARAM_SM5 15
|
||||
#define DRM_VMW_PARAM_GL43 16
|
||||
#define DRM_VMW_PARAM_DEVICE_ID 17
|
||||
|
||||
/**
|
||||
* enum drm_vmw_handle_type - handle type for ref ioctls
|
||||
|
||||
@@ -103,12 +103,13 @@ struct acct_v3
|
||||
/*
|
||||
* accounting flags
|
||||
*/
|
||||
/* bit set when the process ... */
|
||||
/* bit set when the process/task ... */
|
||||
#define AFORK 0x01 /* ... executed fork, but did not exec */
|
||||
#define ASU 0x02 /* ... used super-user privileges */
|
||||
#define ACOMPAT 0x04 /* ... used compatibility mode (VAX only not used) */
|
||||
#define ACORE 0x08 /* ... dumped core */
|
||||
#define AXSIG 0x10 /* ... was killed by a signal */
|
||||
#define AGROUP 0x20 /* ... was the last task of the process (task group) */
|
||||
|
||||
#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
|
||||
#define ACCT_BYTEORDER 0x80 /* accounting file is big endian */
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct agp_version {
|
||||
__u16 major;
|
||||
@@ -64,10 +63,10 @@ typedef struct _agp_info {
|
||||
__u32 bridge_id; /* bridge vendor/device */
|
||||
__u32 agp_mode; /* mode info of bridge */
|
||||
unsigned long aper_base;/* base of aperture */
|
||||
size_t aper_size; /* size of aperture */
|
||||
size_t pg_total; /* max pages (swap + system) */
|
||||
size_t pg_system; /* max pages (system) */
|
||||
size_t pg_used; /* current pages used */
|
||||
__kernel_size_t aper_size; /* size of aperture */
|
||||
__kernel_size_t pg_total; /* max pages (swap + system) */
|
||||
__kernel_size_t pg_system; /* max pages (system) */
|
||||
__kernel_size_t pg_used; /* current pages used */
|
||||
} agp_info;
|
||||
|
||||
typedef struct _agp_setup {
|
||||
|
||||
@@ -236,6 +236,21 @@ struct binder_frozen_status_info {
|
||||
__u32 async_recv;
|
||||
};
|
||||
|
||||
/* struct binder_extened_error - extended error information
|
||||
* @id: identifier for the failed operation
|
||||
* @command: command as defined by binder_driver_return_protocol
|
||||
* @param: parameter holding a negative errno value
|
||||
*
|
||||
* Used with BINDER_GET_EXTENDED_ERROR. This extends the error information
|
||||
* returned by the driver upon a failed operation. Userspace can pull this
|
||||
* data to properly handle specific error scenarios.
|
||||
*/
|
||||
struct binder_extended_error {
|
||||
__u32 id;
|
||||
__u32 command;
|
||||
__s32 param;
|
||||
};
|
||||
|
||||
#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
|
||||
#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64)
|
||||
#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32)
|
||||
@@ -249,6 +264,7 @@ struct binder_frozen_status_info {
|
||||
#define BINDER_FREEZE _IOW('b', 14, struct binder_freeze_info)
|
||||
#define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info)
|
||||
#define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32)
|
||||
#define BINDER_GET_EXTENDED_ERROR _IOWR('b', 17, struct binder_extended_error)
|
||||
|
||||
/*
|
||||
* NOTE: Two special error codes you should check for when calling
|
||||
@@ -288,8 +304,8 @@ struct binder_transaction_data {
|
||||
|
||||
/* General information about the transaction. */
|
||||
__u32 flags;
|
||||
pid_t sender_pid;
|
||||
uid_t sender_euid;
|
||||
__kernel_pid_t sender_pid;
|
||||
__kernel_uid32_t sender_euid;
|
||||
binder_size_t data_size; /* number of bytes of data */
|
||||
binder_size_t offsets_size; /* number of bytes of offsets */
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* atm_zatm.h - Driver-specific declarations of the ZATM driver (for use by
|
||||
driver-specific utilities) */
|
||||
|
||||
/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
|
||||
|
||||
|
||||
#ifndef LINUX_ATM_ZATM_H
|
||||
#define LINUX_ATM_ZATM_H
|
||||
|
||||
/*
|
||||
* Note: non-kernel programs including this file must also include
|
||||
* sys/types.h for struct timeval
|
||||
*/
|
||||
|
||||
#include <linux/atmapi.h>
|
||||
#include <linux/atmioc.h>
|
||||
|
||||
#define ZATM_GETPOOL _IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
|
||||
/* get pool statistics */
|
||||
#define ZATM_GETPOOLZ _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
|
||||
/* get statistics and zero */
|
||||
#define ZATM_SETPOOL _IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc)
|
||||
/* set pool parameters */
|
||||
|
||||
struct zatm_pool_info {
|
||||
int ref_count; /* free buffer pool usage counters */
|
||||
int low_water,high_water; /* refill parameters */
|
||||
int rqa_count,rqu_count; /* queue condition counters */
|
||||
int offset,next_off; /* alignment optimizations: offset */
|
||||
int next_cnt,next_thres; /* repetition counter and threshold */
|
||||
};
|
||||
|
||||
struct zatm_pool_req {
|
||||
int pool_num; /* pool number */
|
||||
struct zatm_pool_info info; /* actual information */
|
||||
};
|
||||
|
||||
#define ZATM_OAM_POOL 0 /* free buffer pool for OAM cells */
|
||||
#define ZATM_AAL0_POOL 1 /* free buffer pool for AAL0 cells */
|
||||
#define ZATM_AAL5_POOL_BASE 2 /* first AAL5 free buffer pool */
|
||||
#define ZATM_LAST_POOL ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */
|
||||
|
||||
#define ZATM_TIMER_HISTORY_SIZE 16 /* number of timer adjustments to
|
||||
record; must be 2^n */
|
||||
|
||||
#endif
|
||||
@@ -439,6 +439,8 @@ enum {
|
||||
#define AUDIT_ARCH_UNICORE (EM_UNICORE|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_XTENSA (EM_XTENSA)
|
||||
#define AUDIT_ARCH_LOONGARCH32 (EM_LOONGARCH|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_LOONGARCH64 (EM_LOONGARCH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
|
||||
|
||||
#define AUDIT_PERM_EXEC 1
|
||||
#define AUDIT_PERM_WRITE 2
|
||||
|
||||
@@ -330,6 +330,8 @@ union bpf_iter_link_info {
|
||||
* *ctx_out*, *data_in* and *data_out* must be NULL.
|
||||
* *repeat* must be zero.
|
||||
*
|
||||
* BPF_PROG_RUN is an alias for BPF_PROG_TEST_RUN.
|
||||
*
|
||||
* Return
|
||||
* Returns zero on success. On error, -1 is returned and *errno*
|
||||
* is set appropriately.
|
||||
@@ -995,6 +997,7 @@ enum bpf_attach_type {
|
||||
BPF_SK_REUSEPORT_SELECT,
|
||||
BPF_SK_REUSEPORT_SELECT_OR_MIGRATE,
|
||||
BPF_PERF_EVENT,
|
||||
BPF_TRACE_KPROBE_MULTI,
|
||||
__MAX_BPF_ATTACH_TYPE
|
||||
};
|
||||
|
||||
@@ -1009,6 +1012,8 @@ enum bpf_link_type {
|
||||
BPF_LINK_TYPE_NETNS = 5,
|
||||
BPF_LINK_TYPE_XDP = 6,
|
||||
BPF_LINK_TYPE_PERF_EVENT = 7,
|
||||
BPF_LINK_TYPE_KPROBE_MULTI = 8,
|
||||
BPF_LINK_TYPE_STRUCT_OPS = 9,
|
||||
|
||||
MAX_BPF_LINK_TYPE,
|
||||
};
|
||||
@@ -1111,6 +1116,16 @@ enum bpf_link_type {
|
||||
*/
|
||||
#define BPF_F_SLEEPABLE (1U << 4)
|
||||
|
||||
/* If BPF_F_XDP_HAS_FRAGS is used in BPF_PROG_LOAD command, the loaded program
|
||||
* fully support xdp frags.
|
||||
*/
|
||||
#define BPF_F_XDP_HAS_FRAGS (1U << 5)
|
||||
|
||||
/* link_create.kprobe_multi.flags used in LINK_CREATE command for
|
||||
* BPF_TRACE_KPROBE_MULTI attach type to create return probe.
|
||||
*/
|
||||
#define BPF_F_KPROBE_MULTI_RETURN (1U << 0)
|
||||
|
||||
/* When BPF ldimm64's insn[0].src_reg != 0 then this can have
|
||||
* the following extensions:
|
||||
*
|
||||
@@ -1225,6 +1240,8 @@ enum {
|
||||
|
||||
/* If set, run the test on the cpu specified by bpf_attr.test.cpu */
|
||||
#define BPF_F_TEST_RUN_ON_CPU (1U << 0)
|
||||
/* If set, XDP frames will be transmitted after processing */
|
||||
#define BPF_F_TEST_XDP_LIVE_FRAMES (1U << 1)
|
||||
|
||||
/* type for BPF_ENABLE_STATS */
|
||||
enum bpf_stats_type {
|
||||
@@ -1386,6 +1403,7 @@ union bpf_attr {
|
||||
__aligned_u64 ctx_out;
|
||||
__u32 flags;
|
||||
__u32 cpu;
|
||||
__u32 batch_size;
|
||||
} test;
|
||||
|
||||
struct { /* anonymous struct used by BPF_*_GET_*_ID */
|
||||
@@ -1465,6 +1483,22 @@ union bpf_attr {
|
||||
*/
|
||||
__u64 bpf_cookie;
|
||||
} perf_event;
|
||||
struct {
|
||||
__u32 flags;
|
||||
__u32 cnt;
|
||||
__aligned_u64 syms;
|
||||
__aligned_u64 addrs;
|
||||
__aligned_u64 cookies;
|
||||
} kprobe_multi;
|
||||
struct {
|
||||
/* this is overlaid with the target_btf_id above. */
|
||||
__u32 target_btf_id;
|
||||
/* black box user-provided value passed through
|
||||
* to BPF program at the execution time and
|
||||
* accessible through bpf_get_attach_cookie() BPF helper
|
||||
*/
|
||||
__u64 cookie;
|
||||
} tracing;
|
||||
};
|
||||
} link_create;
|
||||
|
||||
@@ -1775,6 +1809,8 @@ union bpf_attr {
|
||||
* 0 on success, or a negative error in case of failure.
|
||||
*
|
||||
* u64 bpf_get_current_pid_tgid(void)
|
||||
* Description
|
||||
* Get the current pid and tgid.
|
||||
* Return
|
||||
* A 64-bit integer containing the current tgid and pid, and
|
||||
* created as such:
|
||||
@@ -1782,6 +1818,8 @@ union bpf_attr {
|
||||
* *current_task*\ **->pid**.
|
||||
*
|
||||
* u64 bpf_get_current_uid_gid(void)
|
||||
* Description
|
||||
* Get the current uid and gid.
|
||||
* Return
|
||||
* A 64-bit integer containing the current GID and UID, and
|
||||
* created as such: *current_gid* **<< 32 \|** *current_uid*.
|
||||
@@ -2256,6 +2294,8 @@ union bpf_attr {
|
||||
* The 32-bit hash.
|
||||
*
|
||||
* u64 bpf_get_current_task(void)
|
||||
* Description
|
||||
* Get the current task.
|
||||
* Return
|
||||
* A pointer to the current task struct.
|
||||
*
|
||||
@@ -2286,8 +2326,8 @@ union bpf_attr {
|
||||
* Return
|
||||
* The return value depends on the result of the test, and can be:
|
||||
*
|
||||
* * 0, if current task belongs to the cgroup2.
|
||||
* * 1, if current task does not belong to the cgroup2.
|
||||
* * 1, if current task belongs to the cgroup2.
|
||||
* * 0, if current task does not belong to the cgroup2.
|
||||
* * A negative error code, if an error occurred.
|
||||
*
|
||||
* long bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)
|
||||
@@ -2369,6 +2409,8 @@ union bpf_attr {
|
||||
* indicate that the hash is outdated and to trigger a
|
||||
* recalculation the next time the kernel tries to access this
|
||||
* hash or when the **bpf_get_hash_recalc**\ () helper is called.
|
||||
* Return
|
||||
* void.
|
||||
*
|
||||
* long bpf_get_numa_node_id(void)
|
||||
* Description
|
||||
@@ -2466,6 +2508,8 @@ union bpf_attr {
|
||||
* A 8-byte long unique number or 0 if *sk* is NULL.
|
||||
*
|
||||
* u32 bpf_get_socket_uid(struct sk_buff *skb)
|
||||
* Description
|
||||
* Get the owner UID of the socked associated to *skb*.
|
||||
* Return
|
||||
* The owner UID of the socket associated to *skb*. If the socket
|
||||
* is **NULL**, or if it is not a full socket (i.e. if it is a
|
||||
@@ -2975,8 +3019,8 @@ union bpf_attr {
|
||||
*
|
||||
* # sysctl kernel.perf_event_max_stack=<new value>
|
||||
* Return
|
||||
* A non-negative value equal to or less than *size* on success,
|
||||
* or a negative error in case of failure.
|
||||
* The non-negative copied *buf* length equal to or less than
|
||||
* *size* on success, or a negative error in case of failure.
|
||||
*
|
||||
* long bpf_skb_load_bytes_relative(const void *skb, u32 offset, void *to, u32 len, u32 start_header)
|
||||
* Description
|
||||
@@ -3240,6 +3284,9 @@ union bpf_attr {
|
||||
* The id is returned or 0 in case the id could not be retrieved.
|
||||
*
|
||||
* u64 bpf_get_current_cgroup_id(void)
|
||||
* Description
|
||||
* Get the current cgroup id based on the cgroup within which
|
||||
* the current task is running.
|
||||
* Return
|
||||
* A 64-bit integer containing the current cgroup id based
|
||||
* on the cgroup within which the current task is running.
|
||||
@@ -4279,8 +4326,8 @@ union bpf_attr {
|
||||
*
|
||||
* # sysctl kernel.perf_event_max_stack=<new value>
|
||||
* Return
|
||||
* A non-negative value equal to or less than *size* on success,
|
||||
* or a negative error in case of failure.
|
||||
* The non-negative copied *buf* length equal to or less than
|
||||
* *size* on success, or a negative error in case of failure.
|
||||
*
|
||||
* long bpf_load_hdr_opt(struct bpf_sock_ops *skops, void *searchby_res, u32 len, u64 flags)
|
||||
* Description
|
||||
@@ -5018,6 +5065,190 @@ union bpf_attr {
|
||||
*
|
||||
* Return
|
||||
* The number of arguments of the traced function.
|
||||
*
|
||||
* int bpf_get_retval(void)
|
||||
* Description
|
||||
* Get the syscall's return value that will be returned to userspace.
|
||||
*
|
||||
* This helper is currently supported by cgroup programs only.
|
||||
* Return
|
||||
* The syscall's return value.
|
||||
*
|
||||
* int bpf_set_retval(int retval)
|
||||
* Description
|
||||
* Set the syscall's return value that will be returned to userspace.
|
||||
*
|
||||
* This helper is currently supported by cgroup programs only.
|
||||
* Return
|
||||
* 0 on success, or a negative error in case of failure.
|
||||
*
|
||||
* u64 bpf_xdp_get_buff_len(struct xdp_buff *xdp_md)
|
||||
* Description
|
||||
* Get the total size of a given xdp buff (linear and paged area)
|
||||
* Return
|
||||
* The total size of a given xdp buffer.
|
||||
*
|
||||
* long bpf_xdp_load_bytes(struct xdp_buff *xdp_md, u32 offset, void *buf, u32 len)
|
||||
* Description
|
||||
* This helper is provided as an easy way to load data from a
|
||||
* xdp buffer. It can be used to load *len* bytes from *offset* from
|
||||
* the frame associated to *xdp_md*, into the buffer pointed by
|
||||
* *buf*.
|
||||
* Return
|
||||
* 0 on success, or a negative error in case of failure.
|
||||
*
|
||||
* long bpf_xdp_store_bytes(struct xdp_buff *xdp_md, u32 offset, void *buf, u32 len)
|
||||
* Description
|
||||
* Store *len* bytes from buffer *buf* into the frame
|
||||
* associated to *xdp_md*, at *offset*.
|
||||
* Return
|
||||
* 0 on success, or a negative error in case of failure.
|
||||
*
|
||||
* long bpf_copy_from_user_task(void *dst, u32 size, const void *user_ptr, struct task_struct *tsk, u64 flags)
|
||||
* Description
|
||||
* Read *size* bytes from user space address *user_ptr* in *tsk*'s
|
||||
* address space, and stores the data in *dst*. *flags* is not
|
||||
* used yet and is provided for future extensibility. This helper
|
||||
* can only be used by sleepable programs.
|
||||
* Return
|
||||
* 0 on success, or a negative error in case of failure. On error
|
||||
* *dst* buffer is zeroed out.
|
||||
*
|
||||
* long bpf_skb_set_tstamp(struct sk_buff *skb, u64 tstamp, u32 tstamp_type)
|
||||
* Description
|
||||
* Change the __sk_buff->tstamp_type to *tstamp_type*
|
||||
* and set *tstamp* to the __sk_buff->tstamp together.
|
||||
*
|
||||
* If there is no need to change the __sk_buff->tstamp_type,
|
||||
* the tstamp value can be directly written to __sk_buff->tstamp
|
||||
* instead.
|
||||
*
|
||||
* BPF_SKB_TSTAMP_DELIVERY_MONO is the only tstamp that
|
||||
* will be kept during bpf_redirect_*(). A non zero
|
||||
* *tstamp* must be used with the BPF_SKB_TSTAMP_DELIVERY_MONO
|
||||
* *tstamp_type*.
|
||||
*
|
||||
* A BPF_SKB_TSTAMP_UNSPEC *tstamp_type* can only be used
|
||||
* with a zero *tstamp*.
|
||||
*
|
||||
* Only IPv4 and IPv6 skb->protocol are supported.
|
||||
*
|
||||
* This function is most useful when it needs to set a
|
||||
* mono delivery time to __sk_buff->tstamp and then
|
||||
* bpf_redirect_*() to the egress of an iface. For example,
|
||||
* changing the (rcv) timestamp in __sk_buff->tstamp at
|
||||
* ingress to a mono delivery time and then bpf_redirect_*()
|
||||
* to sch_fq@phy-dev.
|
||||
* Return
|
||||
* 0 on success.
|
||||
* **-EINVAL** for invalid input
|
||||
* **-EOPNOTSUPP** for unsupported protocol
|
||||
*
|
||||
* long bpf_ima_file_hash(struct file *file, void *dst, u32 size)
|
||||
* Description
|
||||
* Returns a calculated IMA hash of the *file*.
|
||||
* If the hash is larger than *size*, then only *size*
|
||||
* bytes will be copied to *dst*
|
||||
* Return
|
||||
* The **hash_algo** is returned on success,
|
||||
* **-EOPNOTSUP** if the hash calculation failed or **-EINVAL** if
|
||||
* invalid arguments are passed.
|
||||
*
|
||||
* void *bpf_kptr_xchg(void *map_value, void *ptr)
|
||||
* Description
|
||||
* Exchange kptr at pointer *map_value* with *ptr*, and return the
|
||||
* old value. *ptr* can be NULL, otherwise it must be a referenced
|
||||
* pointer which will be released when this helper is called.
|
||||
* Return
|
||||
* The old value of kptr (which can be NULL). The returned pointer
|
||||
* if not NULL, is a reference which must be released using its
|
||||
* corresponding release function, or moved into a BPF map before
|
||||
* program exit.
|
||||
*
|
||||
* void *bpf_map_lookup_percpu_elem(struct bpf_map *map, const void *key, u32 cpu)
|
||||
* Description
|
||||
* Perform a lookup in *percpu map* for an entry associated to
|
||||
* *key* on *cpu*.
|
||||
* Return
|
||||
* Map value associated to *key* on *cpu*, or **NULL** if no entry
|
||||
* was found or *cpu* is invalid.
|
||||
*
|
||||
* struct mptcp_sock *bpf_skc_to_mptcp_sock(void *sk)
|
||||
* Description
|
||||
* Dynamically cast a *sk* pointer to a *mptcp_sock* pointer.
|
||||
* Return
|
||||
* *sk* if casting is valid, or **NULL** otherwise.
|
||||
*
|
||||
* long bpf_dynptr_from_mem(void *data, u32 size, u64 flags, struct bpf_dynptr *ptr)
|
||||
* Description
|
||||
* Get a dynptr to local memory *data*.
|
||||
*
|
||||
* *data* must be a ptr to a map value.
|
||||
* The maximum *size* supported is DYNPTR_MAX_SIZE.
|
||||
* *flags* is currently unused.
|
||||
* Return
|
||||
* 0 on success, -E2BIG if the size exceeds DYNPTR_MAX_SIZE,
|
||||
* -EINVAL if flags is not 0.
|
||||
*
|
||||
* long bpf_ringbuf_reserve_dynptr(void *ringbuf, u32 size, u64 flags, struct bpf_dynptr *ptr)
|
||||
* Description
|
||||
* Reserve *size* bytes of payload in a ring buffer *ringbuf*
|
||||
* through the dynptr interface. *flags* must be 0.
|
||||
*
|
||||
* Please note that a corresponding bpf_ringbuf_submit_dynptr or
|
||||
* bpf_ringbuf_discard_dynptr must be called on *ptr*, even if the
|
||||
* reservation fails. This is enforced by the verifier.
|
||||
* Return
|
||||
* 0 on success, or a negative error in case of failure.
|
||||
*
|
||||
* void bpf_ringbuf_submit_dynptr(struct bpf_dynptr *ptr, u64 flags)
|
||||
* Description
|
||||
* Submit reserved ring buffer sample, pointed to by *data*,
|
||||
* through the dynptr interface. This is a no-op if the dynptr is
|
||||
* invalid/null.
|
||||
*
|
||||
* For more information on *flags*, please see
|
||||
* 'bpf_ringbuf_submit'.
|
||||
* Return
|
||||
* Nothing. Always succeeds.
|
||||
*
|
||||
* void bpf_ringbuf_discard_dynptr(struct bpf_dynptr *ptr, u64 flags)
|
||||
* Description
|
||||
* Discard reserved ring buffer sample through the dynptr
|
||||
* interface. This is a no-op if the dynptr is invalid/null.
|
||||
*
|
||||
* For more information on *flags*, please see
|
||||
* 'bpf_ringbuf_discard'.
|
||||
* Return
|
||||
* Nothing. Always succeeds.
|
||||
*
|
||||
* long bpf_dynptr_read(void *dst, u32 len, struct bpf_dynptr *src, u32 offset)
|
||||
* Description
|
||||
* Read *len* bytes from *src* into *dst*, starting from *offset*
|
||||
* into *src*.
|
||||
* Return
|
||||
* 0 on success, -E2BIG if *offset* + *len* exceeds the length
|
||||
* of *src*'s data, -EINVAL if *src* is an invalid dynptr.
|
||||
*
|
||||
* long bpf_dynptr_write(struct bpf_dynptr *dst, u32 offset, void *src, u32 len)
|
||||
* Description
|
||||
* Write *len* bytes from *src* into *dst*, starting from *offset*
|
||||
* into *dst*.
|
||||
* Return
|
||||
* 0 on success, -E2BIG if *offset* + *len* exceeds the length
|
||||
* of *dst*'s data, -EINVAL if *dst* is an invalid dynptr or if *dst*
|
||||
* is a read-only dynptr.
|
||||
*
|
||||
* void *bpf_dynptr_data(struct bpf_dynptr *ptr, u32 offset, u32 len)
|
||||
* Description
|
||||
* Get a pointer to the underlying dynptr data.
|
||||
*
|
||||
* *len* must be a statically known value. The returned data slice
|
||||
* is invalidated whenever the dynptr is invalidated.
|
||||
* Return
|
||||
* Pointer to the underlying dynptr data, NULL if the dynptr is
|
||||
* read-only, if the dynptr is invalid, or if the offset and length
|
||||
* is out of bounds.
|
||||
*/
|
||||
#define __BPF_FUNC_MAPPER(FN) \
|
||||
FN(unspec), \
|
||||
@@ -5206,6 +5437,24 @@ union bpf_attr {
|
||||
FN(get_func_arg), \
|
||||
FN(get_func_ret), \
|
||||
FN(get_func_arg_cnt), \
|
||||
FN(get_retval), \
|
||||
FN(set_retval), \
|
||||
FN(xdp_get_buff_len), \
|
||||
FN(xdp_load_bytes), \
|
||||
FN(xdp_store_bytes), \
|
||||
FN(copy_from_user_task), \
|
||||
FN(skb_set_tstamp), \
|
||||
FN(ima_file_hash), \
|
||||
FN(kptr_xchg), \
|
||||
FN(map_lookup_percpu_elem), \
|
||||
FN(skc_to_mptcp_sock), \
|
||||
FN(dynptr_from_mem), \
|
||||
FN(ringbuf_reserve_dynptr), \
|
||||
FN(ringbuf_submit_dynptr), \
|
||||
FN(ringbuf_discard_dynptr), \
|
||||
FN(dynptr_read), \
|
||||
FN(dynptr_write), \
|
||||
FN(dynptr_data), \
|
||||
/* */
|
||||
|
||||
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
|
||||
@@ -5395,6 +5644,15 @@ union { \
|
||||
__u64 :64; \
|
||||
} __attribute__((aligned(8)))
|
||||
|
||||
enum {
|
||||
BPF_SKB_TSTAMP_UNSPEC,
|
||||
BPF_SKB_TSTAMP_DELIVERY_MONO, /* tstamp has mono delivery time */
|
||||
/* For any BPF_SKB_TSTAMP_* that the bpf prog cannot handle,
|
||||
* the bpf prog should handle it like BPF_SKB_TSTAMP_UNSPEC
|
||||
* and try to deduce it by ingress, egress or skb->sk->sk_clockid.
|
||||
*/
|
||||
};
|
||||
|
||||
/* user accessible mirror of in-kernel sk_buff.
|
||||
* new fields can only be added to the end of this structure
|
||||
*/
|
||||
@@ -5435,7 +5693,8 @@ struct __sk_buff {
|
||||
__u32 gso_segs;
|
||||
__bpf_md_ptr(struct bpf_sock *, sk);
|
||||
__u32 gso_size;
|
||||
__u32 :32; /* Padding, future use. */
|
||||
__u8 tstamp_type;
|
||||
__u32 :24; /* Padding, future use. */
|
||||
__u64 hwtstamp;
|
||||
};
|
||||
|
||||
@@ -5449,6 +5708,10 @@ struct bpf_tunnel_key {
|
||||
__u8 tunnel_ttl;
|
||||
__u16 tunnel_ext; /* Padding, future use. */
|
||||
__u32 tunnel_label;
|
||||
union {
|
||||
__u32 local_ipv4;
|
||||
__u32 local_ipv6[4];
|
||||
};
|
||||
};
|
||||
|
||||
/* user accessible mirror of in-kernel xfrm_state.
|
||||
@@ -5500,7 +5763,8 @@ struct bpf_sock {
|
||||
__u32 src_ip4;
|
||||
__u32 src_ip6[4];
|
||||
__u32 src_port; /* host byte order */
|
||||
__u32 dst_port; /* network byte order */
|
||||
__be16 dst_port; /* network byte order */
|
||||
__u16 :16; /* zero padding */
|
||||
__u32 dst_ip4;
|
||||
__u32 dst_ip6[4];
|
||||
__u32 state;
|
||||
@@ -6342,6 +6606,11 @@ struct bpf_timer {
|
||||
__u64 :64;
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
struct bpf_dynptr {
|
||||
__u64 :64;
|
||||
__u64 :64;
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
struct bpf_sysctl {
|
||||
__u32 write; /* Sysctl is being read (= 0) or written (= 1).
|
||||
* Allows 1,2,4-byte read, but no write.
|
||||
@@ -6378,7 +6647,8 @@ struct bpf_sk_lookup {
|
||||
__u32 protocol; /* IP protocol (IPPROTO_TCP, IPPROTO_UDP) */
|
||||
__u32 remote_ip4; /* Network byte order */
|
||||
__u32 remote_ip6[4]; /* Network byte order */
|
||||
__u32 remote_port; /* Network byte order */
|
||||
__be16 remote_port; /* Network byte order */
|
||||
__u16 :16; /* Zero padding */
|
||||
__u32 local_ip4; /* Network byte order */
|
||||
__u32 local_ip6[4]; /* Network byte order */
|
||||
__u32 local_port; /* Host byte order */
|
||||
|
||||
@@ -33,8 +33,8 @@ struct btf_type {
|
||||
/* "info" bits arrangement
|
||||
* bits 0-15: vlen (e.g. # of struct's members)
|
||||
* bits 16-23: unused
|
||||
* bits 24-27: kind (e.g. int, ptr, array...etc)
|
||||
* bits 28-30: unused
|
||||
* bits 24-28: kind (e.g. int, ptr, array...etc)
|
||||
* bits 29-30: unused
|
||||
* bit 31: kind_flag, currently used by
|
||||
* struct, union and fwd
|
||||
*/
|
||||
|
||||
@@ -309,6 +309,7 @@ struct btrfs_ioctl_fs_info_args {
|
||||
#define BTRFS_FEATURE_INCOMPAT_METADATA_UUID (1ULL << 10)
|
||||
#define BTRFS_FEATURE_INCOMPAT_RAID1C34 (1ULL << 11)
|
||||
#define BTRFS_FEATURE_INCOMPAT_ZONED (1ULL << 12)
|
||||
#define BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2 (1ULL << 13)
|
||||
|
||||
struct btrfs_ioctl_feature_flags {
|
||||
__u64 compat_flags;
|
||||
@@ -868,6 +869,134 @@ struct btrfs_ioctl_get_subvol_rootref_args {
|
||||
__u8 align[7];
|
||||
};
|
||||
|
||||
/*
|
||||
* Data and metadata for an encoded read or write.
|
||||
*
|
||||
* Encoded I/O bypasses any encoding automatically done by the filesystem (e.g.,
|
||||
* compression). This can be used to read the compressed contents of a file or
|
||||
* write pre-compressed data directly to a file.
|
||||
*
|
||||
* BTRFS_IOC_ENCODED_READ and BTRFS_IOC_ENCODED_WRITE are essentially
|
||||
* preadv/pwritev with additional metadata about how the data is encoded and the
|
||||
* size of the unencoded data.
|
||||
*
|
||||
* BTRFS_IOC_ENCODED_READ fills the given iovecs with the encoded data, fills
|
||||
* the metadata fields, and returns the size of the encoded data. It reads one
|
||||
* extent per call. It can also read data which is not encoded.
|
||||
*
|
||||
* BTRFS_IOC_ENCODED_WRITE uses the metadata fields, writes the encoded data
|
||||
* from the iovecs, and returns the size of the encoded data. Note that the
|
||||
* encoded data is not validated when it is written; if it is not valid (e.g.,
|
||||
* it cannot be decompressed), then a subsequent read may return an error.
|
||||
*
|
||||
* Since the filesystem page cache contains decoded data, encoded I/O bypasses
|
||||
* the page cache. Encoded I/O requires CAP_SYS_ADMIN.
|
||||
*/
|
||||
struct btrfs_ioctl_encoded_io_args {
|
||||
/* Input parameters for both reads and writes. */
|
||||
|
||||
/*
|
||||
* iovecs containing encoded data.
|
||||
*
|
||||
* For reads, if the size of the encoded data is larger than the sum of
|
||||
* iov[n].iov_len for 0 <= n < iovcnt, then the ioctl fails with
|
||||
* ENOBUFS.
|
||||
*
|
||||
* For writes, the size of the encoded data is the sum of iov[n].iov_len
|
||||
* for 0 <= n < iovcnt. This must be less than 128 KiB (this limit may
|
||||
* increase in the future). This must also be less than or equal to
|
||||
* unencoded_len.
|
||||
*/
|
||||
const struct iovec __user *iov;
|
||||
/* Number of iovecs. */
|
||||
unsigned long iovcnt;
|
||||
/*
|
||||
* Offset in file.
|
||||
*
|
||||
* For writes, must be aligned to the sector size of the filesystem.
|
||||
*/
|
||||
__s64 offset;
|
||||
/* Currently must be zero. */
|
||||
__u64 flags;
|
||||
|
||||
/*
|
||||
* For reads, the following members are output parameters that will
|
||||
* contain the returned metadata for the encoded data.
|
||||
* For writes, the following members must be set to the metadata for the
|
||||
* encoded data.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Length of the data in the file.
|
||||
*
|
||||
* Must be less than or equal to unencoded_len - unencoded_offset. For
|
||||
* writes, must be aligned to the sector size of the filesystem unless
|
||||
* the data ends at or beyond the current end of the file.
|
||||
*/
|
||||
__u64 len;
|
||||
/*
|
||||
* Length of the unencoded (i.e., decrypted and decompressed) data.
|
||||
*
|
||||
* For writes, must be no more than 128 KiB (this limit may increase in
|
||||
* the future). If the unencoded data is actually longer than
|
||||
* unencoded_len, then it is truncated; if it is shorter, then it is
|
||||
* extended with zeroes.
|
||||
*/
|
||||
__u64 unencoded_len;
|
||||
/*
|
||||
* Offset from the first byte of the unencoded data to the first byte of
|
||||
* logical data in the file.
|
||||
*
|
||||
* Must be less than unencoded_len.
|
||||
*/
|
||||
__u64 unencoded_offset;
|
||||
/*
|
||||
* BTRFS_ENCODED_IO_COMPRESSION_* type.
|
||||
*
|
||||
* For writes, must not be BTRFS_ENCODED_IO_COMPRESSION_NONE.
|
||||
*/
|
||||
__u32 compression;
|
||||
/* Currently always BTRFS_ENCODED_IO_ENCRYPTION_NONE. */
|
||||
__u32 encryption;
|
||||
/*
|
||||
* Reserved for future expansion.
|
||||
*
|
||||
* For reads, always returned as zero. Users should check for non-zero
|
||||
* bytes. If there are any, then the kernel has a newer version of this
|
||||
* structure with additional information that the user definition is
|
||||
* missing.
|
||||
*
|
||||
* For writes, must be zeroed.
|
||||
*/
|
||||
__u8 reserved[64];
|
||||
};
|
||||
|
||||
/* Data is not compressed. */
|
||||
#define BTRFS_ENCODED_IO_COMPRESSION_NONE 0
|
||||
/* Data is compressed as a single zlib stream. */
|
||||
#define BTRFS_ENCODED_IO_COMPRESSION_ZLIB 1
|
||||
/*
|
||||
* Data is compressed as a single zstd frame with the windowLog compression
|
||||
* parameter set to no more than 17.
|
||||
*/
|
||||
#define BTRFS_ENCODED_IO_COMPRESSION_ZSTD 2
|
||||
/*
|
||||
* Data is compressed sector by sector (using the sector size indicated by the
|
||||
* name of the constant) with LZO1X and wrapped in the format documented in
|
||||
* fs/btrfs/lzo.c. For writes, the compression sector size must match the
|
||||
* filesystem sector size.
|
||||
*/
|
||||
#define BTRFS_ENCODED_IO_COMPRESSION_LZO_4K 3
|
||||
#define BTRFS_ENCODED_IO_COMPRESSION_LZO_8K 4
|
||||
#define BTRFS_ENCODED_IO_COMPRESSION_LZO_16K 5
|
||||
#define BTRFS_ENCODED_IO_COMPRESSION_LZO_32K 6
|
||||
#define BTRFS_ENCODED_IO_COMPRESSION_LZO_64K 7
|
||||
#define BTRFS_ENCODED_IO_COMPRESSION_TYPES 8
|
||||
|
||||
/* Data is not encrypted. */
|
||||
#define BTRFS_ENCODED_IO_ENCRYPTION_NONE 0
|
||||
#define BTRFS_ENCODED_IO_ENCRYPTION_TYPES 1
|
||||
|
||||
/* Error codes as returned by the kernel */
|
||||
enum btrfs_err_code {
|
||||
BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET = 1,
|
||||
@@ -996,5 +1125,9 @@ enum btrfs_err_code {
|
||||
struct btrfs_ioctl_ino_lookup_user_args)
|
||||
#define BTRFS_IOC_SNAP_DESTROY_V2 _IOW(BTRFS_IOCTL_MAGIC, 63, \
|
||||
struct btrfs_ioctl_vol_args_v2)
|
||||
#define BTRFS_IOC_ENCODED_READ _IOR(BTRFS_IOCTL_MAGIC, 64, \
|
||||
struct btrfs_ioctl_encoded_io_args)
|
||||
#define BTRFS_IOC_ENCODED_WRITE _IOW(BTRFS_IOCTL_MAGIC, 64, \
|
||||
struct btrfs_ioctl_encoded_io_args)
|
||||
|
||||
#endif /* _UAPI_LINUX_BTRFS_H */
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
/* tracks free space in block groups. */
|
||||
#define BTRFS_FREE_SPACE_TREE_OBJECTID 10ULL
|
||||
|
||||
/* Holds the block group items for extent tree v2. */
|
||||
#define BTRFS_BLOCK_GROUP_TREE_OBJECTID 11ULL
|
||||
|
||||
/* device stats in the device tree */
|
||||
#define BTRFS_DEV_STATS_OBJECTID 0ULL
|
||||
|
||||
@@ -877,19 +880,6 @@ struct btrfs_dev_replace_item {
|
||||
#define BTRFS_BLOCK_GROUP_RESERVED (BTRFS_AVAIL_ALLOC_BIT_SINGLE | \
|
||||
BTRFS_SPACE_INFO_GLOBAL_RSV)
|
||||
|
||||
enum btrfs_raid_types {
|
||||
BTRFS_RAID_RAID10,
|
||||
BTRFS_RAID_RAID1,
|
||||
BTRFS_RAID_DUP,
|
||||
BTRFS_RAID_RAID0,
|
||||
BTRFS_RAID_SINGLE,
|
||||
BTRFS_RAID_RAID5,
|
||||
BTRFS_RAID_RAID6,
|
||||
BTRFS_RAID_RAID1C3,
|
||||
BTRFS_RAID_RAID1C4,
|
||||
BTRFS_NR_RAID_TYPES
|
||||
};
|
||||
|
||||
#define BTRFS_BLOCK_GROUP_TYPE_MASK (BTRFS_BLOCK_GROUP_DATA | \
|
||||
BTRFS_BLOCK_GROUP_SYSTEM | \
|
||||
BTRFS_BLOCK_GROUP_METADATA)
|
||||
|
||||
68
include/uapi/linux/cachefiles.h
Normal file
68
include/uapi/linux/cachefiles.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _LINUX_CACHEFILES_H
|
||||
#define _LINUX_CACHEFILES_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
/*
|
||||
* Fscache ensures that the maximum length of cookie key is 255. The volume key
|
||||
* is controlled by netfs, and generally no bigger than 255.
|
||||
*/
|
||||
#define CACHEFILES_MSG_MAX_SIZE 1024
|
||||
|
||||
enum cachefiles_opcode {
|
||||
CACHEFILES_OP_OPEN,
|
||||
CACHEFILES_OP_CLOSE,
|
||||
CACHEFILES_OP_READ,
|
||||
};
|
||||
|
||||
/*
|
||||
* Message Header
|
||||
*
|
||||
* @msg_id a unique ID identifying this message
|
||||
* @opcode message type, CACHEFILE_OP_*
|
||||
* @len message length, including message header and following data
|
||||
* @object_id a unique ID identifying a cache file
|
||||
* @data message type specific payload
|
||||
*/
|
||||
struct cachefiles_msg {
|
||||
__u32 msg_id;
|
||||
__u32 opcode;
|
||||
__u32 len;
|
||||
__u32 object_id;
|
||||
__u8 data[];
|
||||
};
|
||||
|
||||
/*
|
||||
* @data contains the volume_key followed directly by the cookie_key. volume_key
|
||||
* is a NUL-terminated string; @volume_key_size indicates the size of the volume
|
||||
* key in bytes. cookie_key is binary data, which is netfs specific;
|
||||
* @cookie_key_size indicates the size of the cookie key in bytes.
|
||||
*
|
||||
* @fd identifies an anon_fd referring to the cache file.
|
||||
*/
|
||||
struct cachefiles_open {
|
||||
__u32 volume_key_size;
|
||||
__u32 cookie_key_size;
|
||||
__u32 fd;
|
||||
__u32 flags;
|
||||
__u8 data[];
|
||||
};
|
||||
|
||||
/*
|
||||
* @off indicates the starting offset of the requested file range
|
||||
* @len indicates the length of the requested file range
|
||||
*/
|
||||
struct cachefiles_read {
|
||||
__u64 off;
|
||||
__u64 len;
|
||||
};
|
||||
|
||||
/*
|
||||
* Reply for READ request
|
||||
* @arg for this ioctl is the @id field of READ request.
|
||||
*/
|
||||
#define CACHEFILES_IOC_READ_COMPLETE _IOW(0x98, 1, int)
|
||||
|
||||
#endif
|
||||
@@ -124,33 +124,30 @@ struct can_isotp_ll_options {
|
||||
|
||||
/* flags for isotp behaviour */
|
||||
|
||||
#define CAN_ISOTP_LISTEN_MODE 0x001 /* listen only (do not send FC) */
|
||||
#define CAN_ISOTP_EXTEND_ADDR 0x002 /* enable extended addressing */
|
||||
#define CAN_ISOTP_TX_PADDING 0x004 /* enable CAN frame padding tx path */
|
||||
#define CAN_ISOTP_RX_PADDING 0x008 /* enable CAN frame padding rx path */
|
||||
#define CAN_ISOTP_CHK_PAD_LEN 0x010 /* check received CAN frame padding */
|
||||
#define CAN_ISOTP_CHK_PAD_DATA 0x020 /* check received CAN frame padding */
|
||||
#define CAN_ISOTP_HALF_DUPLEX 0x040 /* half duplex error state handling */
|
||||
#define CAN_ISOTP_FORCE_TXSTMIN 0x080 /* ignore stmin from received FC */
|
||||
#define CAN_ISOTP_FORCE_RXSTMIN 0x100 /* ignore CFs depending on rx stmin */
|
||||
#define CAN_ISOTP_RX_EXT_ADDR 0x200 /* different rx extended addressing */
|
||||
#define CAN_ISOTP_WAIT_TX_DONE 0x400 /* wait for tx completion */
|
||||
#define CAN_ISOTP_SF_BROADCAST 0x800 /* 1-to-N functional addressing */
|
||||
#define CAN_ISOTP_LISTEN_MODE 0x0001 /* listen only (do not send FC) */
|
||||
#define CAN_ISOTP_EXTEND_ADDR 0x0002 /* enable extended addressing */
|
||||
#define CAN_ISOTP_TX_PADDING 0x0004 /* enable CAN frame padding tx path */
|
||||
#define CAN_ISOTP_RX_PADDING 0x0008 /* enable CAN frame padding rx path */
|
||||
#define CAN_ISOTP_CHK_PAD_LEN 0x0010 /* check received CAN frame padding */
|
||||
#define CAN_ISOTP_CHK_PAD_DATA 0x0020 /* check received CAN frame padding */
|
||||
#define CAN_ISOTP_HALF_DUPLEX 0x0040 /* half duplex error state handling */
|
||||
#define CAN_ISOTP_FORCE_TXSTMIN 0x0080 /* ignore stmin from received FC */
|
||||
#define CAN_ISOTP_FORCE_RXSTMIN 0x0100 /* ignore CFs depending on rx stmin */
|
||||
#define CAN_ISOTP_RX_EXT_ADDR 0x0200 /* different rx extended addressing */
|
||||
#define CAN_ISOTP_WAIT_TX_DONE 0x0400 /* wait for tx completion */
|
||||
#define CAN_ISOTP_SF_BROADCAST 0x0800 /* 1-to-N functional addressing */
|
||||
#define CAN_ISOTP_CF_BROADCAST 0x1000 /* 1-to-N transmission w/o FC */
|
||||
|
||||
/* default values */
|
||||
/* protocol machine default values */
|
||||
|
||||
#define CAN_ISOTP_DEFAULT_FLAGS 0
|
||||
#define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00
|
||||
#define CAN_ISOTP_DEFAULT_PAD_CONTENT 0xCC /* prevent bit-stuffing */
|
||||
#define CAN_ISOTP_DEFAULT_FRAME_TXTIME 0
|
||||
#define CAN_ISOTP_DEFAULT_FRAME_TXTIME 50000 /* 50 micro seconds */
|
||||
#define CAN_ISOTP_DEFAULT_RECV_BS 0
|
||||
#define CAN_ISOTP_DEFAULT_RECV_STMIN 0x00
|
||||
#define CAN_ISOTP_DEFAULT_RECV_WFTMAX 0
|
||||
|
||||
#define CAN_ISOTP_DEFAULT_LL_MTU CAN_MTU
|
||||
#define CAN_ISOTP_DEFAULT_LL_TX_DL CAN_MAX_DLEN
|
||||
#define CAN_ISOTP_DEFAULT_LL_TX_FLAGS 0
|
||||
|
||||
/*
|
||||
* Remark on CAN_ISOTP_DEFAULT_RECV_* values:
|
||||
*
|
||||
@@ -162,4 +159,24 @@ struct can_isotp_ll_options {
|
||||
* consistency and copied directly into the flow control (FC) frame.
|
||||
*/
|
||||
|
||||
/* link layer default values => make use of Classical CAN frames */
|
||||
|
||||
#define CAN_ISOTP_DEFAULT_LL_MTU CAN_MTU
|
||||
#define CAN_ISOTP_DEFAULT_LL_TX_DL CAN_MAX_DLEN
|
||||
#define CAN_ISOTP_DEFAULT_LL_TX_FLAGS 0
|
||||
|
||||
/*
|
||||
* The CAN_ISOTP_DEFAULT_FRAME_TXTIME has become a non-zero value as
|
||||
* it only makes sense for isotp implementation tests to run without
|
||||
* a N_As value. As user space applications usually do not set the
|
||||
* frame_txtime element of struct can_isotp_options the new in-kernel
|
||||
* default is very likely overwritten with zero when the sockopt()
|
||||
* CAN_ISOTP_OPTS is invoked.
|
||||
* To make sure that a N_As value of zero is only set intentional the
|
||||
* value '0' is now interpreted as 'do not change the current value'.
|
||||
* When a frame_txtime of zero is required for testing purposes this
|
||||
* CAN_ISOTP_FRAME_TXTIME_ZERO u32 value has to be set in frame_txtime.
|
||||
*/
|
||||
#define CAN_ISOTP_FRAME_TXTIME_ZERO 0xFFFFFFFF
|
||||
|
||||
#endif /* !_UAPI_CAN_ISOTP_H */
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
#define CDROMREADALL 0x5318 /* read all 2646 bytes */
|
||||
|
||||
/*
|
||||
* These ioctls are (now) only in ide-cd.c for controlling
|
||||
* These ioctls were only in (now removed) ide-cd.c for controlling
|
||||
* drive spindown time. They should be implemented in the
|
||||
* Uniform driver, via generic packet commands, GPCMD_MODE_SELECT_10,
|
||||
* GPCMD_MODE_SENSE_10 and the GPMODE_POWER_PAGE...
|
||||
|
||||
@@ -142,6 +142,26 @@ static inline void cec_msg_set_reply_to(struct cec_msg *msg,
|
||||
msg->reply = msg->timeout = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* cec_msg_recv_is_tx_result - return true if this message contains the
|
||||
* result of an earlier non-blocking transmit
|
||||
* @msg: the message structure from CEC_RECEIVE
|
||||
*/
|
||||
static inline int cec_msg_recv_is_tx_result(const struct cec_msg *msg)
|
||||
{
|
||||
return msg->sequence && msg->tx_status && !msg->rx_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* cec_msg_recv_is_rx_result - return true if this message contains the
|
||||
* reply of an earlier non-blocking transmit
|
||||
* @msg: the message structure from CEC_RECEIVE
|
||||
*/
|
||||
static inline int cec_msg_recv_is_rx_result(const struct cec_msg *msg)
|
||||
{
|
||||
return msg->sequence && !msg->tx_status && msg->rx_status;
|
||||
}
|
||||
|
||||
/* cec_msg flags field */
|
||||
#define CEC_MSG_FL_REPLY_TO_FOLLOWERS (1 << 0)
|
||||
#define CEC_MSG_FL_RAW (1 << 1)
|
||||
|
||||
@@ -61,6 +61,8 @@ enum counter_event_type {
|
||||
COUNTER_EVENT_THRESHOLD,
|
||||
/* Index signal detected */
|
||||
COUNTER_EVENT_INDEX,
|
||||
/* State of counter is changed */
|
||||
COUNTER_EVENT_CHANGE_OF_STATE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -68,8 +68,8 @@ static const struct {
|
||||
* struct cxl_command_info - Command information returned from a query.
|
||||
* @id: ID number for the command.
|
||||
* @flags: Flags that specify command behavior.
|
||||
* @size_in: Expected input size, or -1 if variable length.
|
||||
* @size_out: Expected output size, or -1 if variable length.
|
||||
* @size_in: Expected input size, or ~0 if variable length.
|
||||
* @size_out: Expected output size, or ~0 if variable length.
|
||||
*
|
||||
* Represents a single command that is supported by both the driver and the
|
||||
* hardware. This is returned as part of an array from the query ioctl. The
|
||||
@@ -78,7 +78,7 @@ static const struct {
|
||||
*
|
||||
* - @id = 10
|
||||
* - @flags = 0
|
||||
* - @size_in = -1
|
||||
* - @size_in = ~0
|
||||
* - @size_out = 0
|
||||
*
|
||||
* See struct cxl_mem_query_commands.
|
||||
@@ -89,8 +89,8 @@ struct cxl_command_info {
|
||||
__u32 flags;
|
||||
#define CXL_MEM_COMMAND_FLAG_MASK GENMASK(0, 0)
|
||||
|
||||
__s32 size_in;
|
||||
__s32 size_out;
|
||||
__u32 size_in;
|
||||
__u32 size_out;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -169,13 +169,13 @@ struct cxl_send_command {
|
||||
__u32 retval;
|
||||
|
||||
struct {
|
||||
__s32 size;
|
||||
__u32 size;
|
||||
__u32 rsvd;
|
||||
__u64 payload;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
__s32 size;
|
||||
__u32 size;
|
||||
__u32 rsvd;
|
||||
__u64 payload;
|
||||
} out;
|
||||
|
||||
@@ -131,6 +131,11 @@ enum devlink_command {
|
||||
DEVLINK_CMD_RATE_NEW,
|
||||
DEVLINK_CMD_RATE_DEL,
|
||||
|
||||
DEVLINK_CMD_LINECARD_GET, /* can dump */
|
||||
DEVLINK_CMD_LINECARD_SET,
|
||||
DEVLINK_CMD_LINECARD_NEW,
|
||||
DEVLINK_CMD_LINECARD_DEL,
|
||||
|
||||
/* add new commands above here */
|
||||
__DEVLINK_CMD_MAX,
|
||||
DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
|
||||
@@ -338,6 +343,19 @@ enum devlink_reload_limit {
|
||||
|
||||
#define DEVLINK_RELOAD_LIMITS_VALID_MASK (_BITUL(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
|
||||
|
||||
enum devlink_linecard_state {
|
||||
DEVLINK_LINECARD_STATE_UNSPEC,
|
||||
DEVLINK_LINECARD_STATE_UNPROVISIONED,
|
||||
DEVLINK_LINECARD_STATE_UNPROVISIONING,
|
||||
DEVLINK_LINECARD_STATE_PROVISIONING,
|
||||
DEVLINK_LINECARD_STATE_PROVISIONING_FAILED,
|
||||
DEVLINK_LINECARD_STATE_PROVISIONED,
|
||||
DEVLINK_LINECARD_STATE_ACTIVE,
|
||||
|
||||
__DEVLINK_LINECARD_STATE_MAX,
|
||||
DEVLINK_LINECARD_STATE_MAX = __DEVLINK_LINECARD_STATE_MAX - 1
|
||||
};
|
||||
|
||||
enum devlink_attr {
|
||||
/* don't change the order or add anything between, this is ABI! */
|
||||
DEVLINK_ATTR_UNSPEC,
|
||||
@@ -553,6 +571,11 @@ enum devlink_attr {
|
||||
|
||||
DEVLINK_ATTR_REGION_MAX_SNAPSHOTS, /* u32 */
|
||||
|
||||
DEVLINK_ATTR_LINECARD_INDEX, /* u32 */
|
||||
DEVLINK_ATTR_LINECARD_STATE, /* u8 */
|
||||
DEVLINK_ATTR_LINECARD_TYPE, /* string */
|
||||
DEVLINK_ATTR_LINECARD_SUPPORTED_TYPES, /* nested */
|
||||
|
||||
/* add new attributes above here, update the policy in devlink.c */
|
||||
|
||||
__DEVLINK_ATTR_MAX,
|
||||
|
||||
@@ -286,9 +286,9 @@ enum {
|
||||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 45
|
||||
#define DM_VERSION_MINOR 46
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2021-03-22)"
|
||||
#define DM_VERSION_EXTRA "-ioctl (2022-02-22)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
||||
@@ -92,7 +92,7 @@ struct dma_buf_sync {
|
||||
* between them in actual uapi, they're just different numbers.
|
||||
*/
|
||||
#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
|
||||
#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32)
|
||||
#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64)
|
||||
#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, __u32)
|
||||
#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, __u64)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#define EM_RISCV 243 /* RISC-V */
|
||||
#define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */
|
||||
#define EM_CSKY 252 /* C-SKY */
|
||||
#define EM_LOONGARCH 258 /* LoongArch */
|
||||
#define EM_FRV 0x5441 /* Fujitsu FR-V */
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,10 +35,14 @@ typedef __s64 Elf64_Sxword;
|
||||
#define PT_HIOS 0x6fffffff /* OS-specific */
|
||||
#define PT_LOPROC 0x70000000
|
||||
#define PT_HIPROC 0x7fffffff
|
||||
#define PT_GNU_EH_FRAME 0x6474e550
|
||||
#define PT_GNU_PROPERTY 0x6474e553
|
||||
|
||||
#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
|
||||
#define PT_GNU_STACK (PT_LOOS + 0x474e551)
|
||||
#define PT_GNU_RELRO (PT_LOOS + 0x474e552)
|
||||
#define PT_GNU_PROPERTY (PT_LOOS + 0x474e553)
|
||||
|
||||
|
||||
/* ARM MTE memory tag segment type */
|
||||
#define PT_AARCH64_MEMTAG_MTE (PT_LOPROC + 0x2)
|
||||
|
||||
/*
|
||||
* Extended Numbering
|
||||
@@ -130,7 +134,7 @@ typedef __s64 Elf64_Sxword;
|
||||
#define STT_TLS 6
|
||||
|
||||
#define ELF_ST_BIND(x) ((x) >> 4)
|
||||
#define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf)
|
||||
#define ELF_ST_TYPE(x) ((x) & 0xf)
|
||||
#define ELF32_ST_BIND(x) ELF_ST_BIND(x)
|
||||
#define ELF32_ST_TYPE(x) ELF_ST_TYPE(x)
|
||||
#define ELF64_ST_BIND(x) ELF_ST_BIND(x)
|
||||
@@ -427,11 +431,18 @@ typedef struct elf64_shdr {
|
||||
#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */
|
||||
#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* arm64 tagged address control (prctl()) */
|
||||
#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* arm64 ptr auth enabled keys (prctl()) */
|
||||
#define NT_ARM_SSVE 0x40b /* ARM Streaming SVE registers */
|
||||
#define NT_ARM_ZA 0x40c /* ARM SME ZA registers */
|
||||
#define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */
|
||||
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */
|
||||
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */
|
||||
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode */
|
||||
#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers */
|
||||
#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */
|
||||
#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and status registers */
|
||||
#define NT_LOONGARCH_LSX 0xa02 /* LoongArch Loongson SIMD Extension registers */
|
||||
#define NT_LOONGARCH_LASX 0xa03 /* LoongArch Loongson Advanced SIMD Extension registers */
|
||||
#define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary Translation registers */
|
||||
|
||||
/* Note types with note name "GNU" */
|
||||
#define NT_GNU_PROPERTY_TYPE_0 5
|
||||
|
||||
@@ -1691,6 +1691,7 @@ enum ethtool_link_mode_bit_indices {
|
||||
ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 89,
|
||||
ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 90,
|
||||
ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 91,
|
||||
ETHTOOL_LINK_MODE_10baseT1L_Full_BIT = 92,
|
||||
/* must be last entry */
|
||||
__ETHTOOL_LINK_MODE_MASK_NBITS
|
||||
};
|
||||
|
||||
@@ -318,6 +318,12 @@ enum {
|
||||
|
||||
/* RINGS */
|
||||
|
||||
enum {
|
||||
ETHTOOL_TCP_DATA_SPLIT_UNKNOWN = 0,
|
||||
ETHTOOL_TCP_DATA_SPLIT_DISABLED,
|
||||
ETHTOOL_TCP_DATA_SPLIT_ENABLED,
|
||||
};
|
||||
|
||||
enum {
|
||||
ETHTOOL_A_RINGS_UNSPEC,
|
||||
ETHTOOL_A_RINGS_HEADER, /* nest - _A_HEADER_* */
|
||||
@@ -330,6 +336,9 @@ enum {
|
||||
ETHTOOL_A_RINGS_RX_JUMBO, /* u32 */
|
||||
ETHTOOL_A_RINGS_TX, /* u32 */
|
||||
ETHTOOL_A_RINGS_RX_BUF_LEN, /* u32 */
|
||||
ETHTOOL_A_RINGS_TCP_DATA_SPLIT, /* u8 */
|
||||
ETHTOOL_A_RINGS_CQE_SIZE, /* u32 */
|
||||
ETHTOOL_A_RINGS_TX_PUSH, /* u8 */
|
||||
|
||||
/* add new constants above here */
|
||||
__ETHTOOL_A_RINGS_CNT,
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
#define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040
|
||||
#define FAN_MARK_FLUSH 0x00000080
|
||||
/* FAN_MARK_FILESYSTEM is 0x00000100 */
|
||||
#define FAN_MARK_EVICTABLE 0x00000200
|
||||
|
||||
/* These are NOT bitwise flags. Both bits can be used togther. */
|
||||
#define FAN_MARK_INODE 0x00000000
|
||||
|
||||
@@ -182,7 +182,7 @@ struct fb_fix_screeninfo {
|
||||
*
|
||||
* For pseudocolor: offset and length should be the same for all color
|
||||
* components. Offset specifies the position of the least significant bit
|
||||
* of the pallette index in a pixel value. Length indicates the number
|
||||
* of the palette index in a pixel value. Length indicates the number
|
||||
* of available palette entries (i.e. # of entries = 1 << length).
|
||||
*/
|
||||
struct fb_bitfield {
|
||||
|
||||
@@ -55,4 +55,18 @@ struct scom_access {
|
||||
#define FSI_SCOM_WRITE _IOWR('s', 0x02, struct scom_access)
|
||||
#define FSI_SCOM_RESET _IOW('s', 0x03, __u32)
|
||||
|
||||
/*
|
||||
* /dev/sbefifo* ioctl interface
|
||||
*/
|
||||
|
||||
/**
|
||||
* FSI_SBEFIFO_READ_TIMEOUT sets the read timeout for response from SBE.
|
||||
*
|
||||
* The read timeout is specified in seconds. The minimum value of read
|
||||
* timeout is 10 seconds (default) and the maximum value of read timeout is
|
||||
* 120 seconds. A read timeout of 0 will reset the value to the default of
|
||||
* (10 seconds).
|
||||
*/
|
||||
#define FSI_SBEFIFO_READ_TIMEOUT_SECONDS _IOW('s', 0x00, __u32)
|
||||
|
||||
#endif /* _UAPI_LINUX_FSI_H */
|
||||
|
||||
@@ -69,7 +69,7 @@ struct fsmap_head {
|
||||
};
|
||||
|
||||
/* Size of an fsmap_head with room for nr records. */
|
||||
static inline size_t
|
||||
static inline __kernel_size_t
|
||||
fsmap_sizeof(
|
||||
unsigned int nr)
|
||||
{
|
||||
|
||||
@@ -66,6 +66,8 @@ struct gpiochip_info {
|
||||
* @GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN: line has pull-down bias enabled
|
||||
* @GPIO_V2_LINE_FLAG_BIAS_DISABLED: line has bias disabled
|
||||
* @GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME: line events contain REALTIME timestamps
|
||||
* @GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE: line events contain timestamps from
|
||||
* hardware timestamp engine
|
||||
*/
|
||||
enum gpio_v2_line_flag {
|
||||
GPIO_V2_LINE_FLAG_USED = _BITULL(0),
|
||||
@@ -80,6 +82,7 @@ enum gpio_v2_line_flag {
|
||||
GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN = _BITULL(9),
|
||||
GPIO_V2_LINE_FLAG_BIAS_DISABLED = _BITULL(10),
|
||||
GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME = _BITULL(11),
|
||||
GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE = _BITULL(12),
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ enum gtp_genl_cmds {
|
||||
GTP_CMD_NEWPDP,
|
||||
GTP_CMD_DELPDP,
|
||||
GTP_CMD_GETPDP,
|
||||
GTP_CMD_ECHOREQ,
|
||||
|
||||
GTP_CMD_MAX,
|
||||
};
|
||||
|
||||
@@ -90,6 +90,17 @@ struct hv_vss_check_dm_info {
|
||||
__u32 flags;
|
||||
} __attribute__((packed));
|
||||
|
||||
/*
|
||||
* struct hv_vss_msg encodes the fields that the Linux VSS
|
||||
* driver accesses. However, FREEZE messages from Hyper-V contain
|
||||
* additional LUN information that Linux doesn't use and are not
|
||||
* represented in struct hv_vss_msg. A received FREEZE message may
|
||||
* be as large as 6,260 bytes, so the driver must allocate at least
|
||||
* that much space, not sizeof(struct hv_vss_msg). Other messages
|
||||
* such as AUTO_RECOVER may be as large as 12,500 bytes. However,
|
||||
* because the Linux VSS driver responds that it doesn't support
|
||||
* auto-recovery, it should not receive such messages.
|
||||
*/
|
||||
struct hv_vss_msg {
|
||||
union {
|
||||
struct hv_vss_hdr vss_hdr;
|
||||
|
||||
@@ -53,6 +53,11 @@ enum idxd_scmd_stat {
|
||||
|
||||
/* IAX */
|
||||
#define IDXD_OP_FLAG_RD_SRC2_AECS 0x010000
|
||||
#define IDXD_OP_FLAG_RD_SRC2_2ND 0x020000
|
||||
#define IDXD_OP_FLAG_WR_SRC2_AECS_COMP 0x040000
|
||||
#define IDXD_OP_FLAG_WR_SRC2_AECS_OVFL 0x080000
|
||||
#define IDXD_OP_FLAG_SRC2_STS 0x100000
|
||||
#define IDXD_OP_FLAG_CRC_RFC3720 0x200000
|
||||
|
||||
/* Opcode */
|
||||
enum dsa_opcode {
|
||||
@@ -81,6 +86,18 @@ enum iax_opcode {
|
||||
IAX_OPCODE_MEMMOVE,
|
||||
IAX_OPCODE_DECOMPRESS = 0x42,
|
||||
IAX_OPCODE_COMPRESS,
|
||||
IAX_OPCODE_CRC64,
|
||||
IAX_OPCODE_ZERO_DECOMP_32 = 0x48,
|
||||
IAX_OPCODE_ZERO_DECOMP_16,
|
||||
IAX_OPCODE_DECOMP_32 = 0x4c,
|
||||
IAX_OPCODE_DECOMP_16,
|
||||
IAX_OPCODE_SCAN = 0x50,
|
||||
IAX_OPCODE_SET_MEMBER,
|
||||
IAX_OPCODE_EXTRACT,
|
||||
IAX_OPCODE_SELECT,
|
||||
IAX_OPCODE_RLE_BURST,
|
||||
IAX_OPCDE_FIND_UNIQUE,
|
||||
IAX_OPCODE_EXPAND,
|
||||
};
|
||||
|
||||
/* Completion record status */
|
||||
@@ -120,6 +137,7 @@ enum iax_completion_status {
|
||||
IAX_COMP_NONE = 0,
|
||||
IAX_COMP_SUCCESS,
|
||||
IAX_COMP_PAGE_FAULT_IR = 0x04,
|
||||
IAX_COMP_ANALYTICS_ERROR = 0x0a,
|
||||
IAX_COMP_OUTBUF_OVERFLOW,
|
||||
IAX_COMP_BAD_OPCODE = 0x10,
|
||||
IAX_COMP_INVALID_FLAGS,
|
||||
@@ -140,7 +158,10 @@ enum iax_completion_status {
|
||||
IAX_COMP_WATCHDOG,
|
||||
IAX_COMP_INVALID_COMP_FLAG = 0x30,
|
||||
IAX_COMP_INVALID_FILTER_FLAG,
|
||||
IAX_COMP_INVALID_NUM_ELEMS = 0x33,
|
||||
IAX_COMP_INVALID_INPUT_SIZE,
|
||||
IAX_COMP_INVALID_NUM_ELEMS,
|
||||
IAX_COMP_INVALID_SRC1_WIDTH,
|
||||
IAX_COMP_INVALID_INVERT_OUT,
|
||||
};
|
||||
|
||||
#define DSA_COMP_STATUS_MASK 0x7f
|
||||
@@ -319,8 +340,12 @@ struct iax_completion_record {
|
||||
uint32_t output_size;
|
||||
uint8_t output_bits;
|
||||
uint8_t rsvd3;
|
||||
uint16_t rsvd4;
|
||||
uint64_t rsvd5[4];
|
||||
uint16_t xor_csum;
|
||||
uint32_t crc;
|
||||
uint32_t min;
|
||||
uint32_t max;
|
||||
uint32_t sum;
|
||||
uint64_t rsvd4[2];
|
||||
} __attribute__((packed));
|
||||
|
||||
struct iax_raw_completion_record {
|
||||
|
||||
@@ -33,8 +33,9 @@ enum {
|
||||
IFA_CACHEINFO,
|
||||
IFA_MULTICAST,
|
||||
IFA_FLAGS,
|
||||
IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */
|
||||
IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */
|
||||
IFA_TARGET_NETNSID,
|
||||
IFA_PROTO, /* u8, address protocol */
|
||||
__IFA_MAX,
|
||||
};
|
||||
|
||||
@@ -69,4 +70,10 @@ struct ifa_cacheinfo {
|
||||
#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
|
||||
#endif
|
||||
|
||||
/* ifa_proto */
|
||||
#define IFAPROT_UNSPEC 0
|
||||
#define IFAPROT_KERNEL_LO 1 /* loopback */
|
||||
#define IFAPROT_KERNEL_RA 2 /* set by kernel from router announcement */
|
||||
#define IFAPROT_KERNEL_LL 3 /* link-local set by kernel */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -122,6 +122,7 @@ enum {
|
||||
IFLA_BRIDGE_VLAN_TUNNEL_INFO,
|
||||
IFLA_BRIDGE_MRP,
|
||||
IFLA_BRIDGE_CFM,
|
||||
IFLA_BRIDGE_MST,
|
||||
__IFLA_BRIDGE_MAX,
|
||||
};
|
||||
#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
|
||||
@@ -453,6 +454,21 @@ enum {
|
||||
|
||||
#define IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX (__IFLA_BRIDGE_CFM_CC_PEER_STATUS_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MST_UNSPEC,
|
||||
IFLA_BRIDGE_MST_ENTRY,
|
||||
__IFLA_BRIDGE_MST_MAX,
|
||||
};
|
||||
#define IFLA_BRIDGE_MST_MAX (__IFLA_BRIDGE_MST_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_BRIDGE_MST_ENTRY_UNSPEC,
|
||||
IFLA_BRIDGE_MST_ENTRY_MSTI,
|
||||
IFLA_BRIDGE_MST_ENTRY_STATE,
|
||||
__IFLA_BRIDGE_MST_ENTRY_MAX,
|
||||
};
|
||||
#define IFLA_BRIDGE_MST_ENTRY_MAX (__IFLA_BRIDGE_MST_ENTRY_MAX - 1)
|
||||
|
||||
struct bridge_stp_xstats {
|
||||
__u64 transition_blk;
|
||||
__u64 transition_fwd;
|
||||
@@ -564,6 +580,7 @@ enum {
|
||||
BRIDGE_VLANDB_GOPTS_MCAST_QUERIER,
|
||||
BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS,
|
||||
BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE,
|
||||
BRIDGE_VLANDB_GOPTS_MSTI,
|
||||
__BRIDGE_VLANDB_GOPTS_MAX
|
||||
};
|
||||
#define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLANDB_GOPTS_MAX - 1)
|
||||
@@ -759,6 +776,7 @@ struct br_mcast_stats {
|
||||
enum br_boolopt_id {
|
||||
BR_BOOLOPT_NO_LL_LEARN,
|
||||
BR_BOOLOPT_MCAST_VLAN_SNOOPING,
|
||||
BR_BOOLOPT_MST_ENABLE,
|
||||
BR_BOOLOPT_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -86,8 +86,10 @@
|
||||
* over Ethernet
|
||||
*/
|
||||
#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
|
||||
#define ETH_P_PROFINET 0x8892 /* PROFINET */
|
||||
#define ETH_P_REALTEK 0x8899 /* Multiple proprietary protocols */
|
||||
#define ETH_P_AOE 0x88A2 /* ATA over Ethernet */
|
||||
#define ETH_P_ETHERCAT 0x88A4 /* EtherCAT */
|
||||
#define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */
|
||||
#define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */
|
||||
#define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */
|
||||
|
||||
@@ -211,6 +211,9 @@ struct rtnl_link_stats {
|
||||
* @rx_nohandler: Number of packets received on the interface
|
||||
* but dropped by the networking stack because the device is
|
||||
* not designated to receive packets (e.g. backup link in a bond).
|
||||
*
|
||||
* @rx_otherhost_dropped: Number of packets dropped due to mismatch
|
||||
* in destination MAC address.
|
||||
*/
|
||||
struct rtnl_link_stats64 {
|
||||
__u64 rx_packets;
|
||||
@@ -243,6 +246,23 @@ struct rtnl_link_stats64 {
|
||||
__u64 rx_compressed;
|
||||
__u64 tx_compressed;
|
||||
__u64 rx_nohandler;
|
||||
|
||||
__u64 rx_otherhost_dropped;
|
||||
};
|
||||
|
||||
/* Subset of link stats useful for in-HW collection. Meaning of the fields is as
|
||||
* for struct rtnl_link_stats64.
|
||||
*/
|
||||
struct rtnl_hw_stats64 {
|
||||
__u64 rx_packets;
|
||||
__u64 tx_packets;
|
||||
__u64 rx_bytes;
|
||||
__u64 tx_bytes;
|
||||
__u64 rx_errors;
|
||||
__u64 tx_errors;
|
||||
__u64 rx_dropped;
|
||||
__u64 tx_dropped;
|
||||
__u64 multicast;
|
||||
};
|
||||
|
||||
/* The struct should be in sync with struct ifmap */
|
||||
@@ -348,6 +368,8 @@ enum {
|
||||
IFLA_PARENT_DEV_NAME,
|
||||
IFLA_PARENT_DEV_BUS_NAME,
|
||||
IFLA_GRO_MAX_SIZE,
|
||||
IFLA_TSO_MAX_SIZE,
|
||||
IFLA_TSO_MAX_SEGS,
|
||||
|
||||
__IFLA_MAX
|
||||
};
|
||||
@@ -537,6 +559,7 @@ enum {
|
||||
IFLA_BRPORT_MRP_IN_OPEN,
|
||||
IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT,
|
||||
IFLA_BRPORT_MCAST_EHT_HOSTS_CNT,
|
||||
IFLA_BRPORT_LOCKED,
|
||||
__IFLA_BRPORT_MAX
|
||||
};
|
||||
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
|
||||
@@ -712,7 +735,55 @@ enum ipvlan_mode {
|
||||
#define IPVLAN_F_PRIVATE 0x01
|
||||
#define IPVLAN_F_VEPA 0x02
|
||||
|
||||
/* Tunnel RTM header */
|
||||
struct tunnel_msg {
|
||||
__u8 family;
|
||||
__u8 flags;
|
||||
__u16 reserved2;
|
||||
__u32 ifindex;
|
||||
};
|
||||
|
||||
/* VXLAN section */
|
||||
|
||||
/* include statistics in the dump */
|
||||
#define TUNNEL_MSG_FLAG_STATS 0x01
|
||||
|
||||
#define TUNNEL_MSG_VALID_USER_FLAGS TUNNEL_MSG_FLAG_STATS
|
||||
|
||||
/* Embedded inside VXLAN_VNIFILTER_ENTRY_STATS */
|
||||
enum {
|
||||
VNIFILTER_ENTRY_STATS_UNSPEC,
|
||||
VNIFILTER_ENTRY_STATS_RX_BYTES,
|
||||
VNIFILTER_ENTRY_STATS_RX_PKTS,
|
||||
VNIFILTER_ENTRY_STATS_RX_DROPS,
|
||||
VNIFILTER_ENTRY_STATS_RX_ERRORS,
|
||||
VNIFILTER_ENTRY_STATS_TX_BYTES,
|
||||
VNIFILTER_ENTRY_STATS_TX_PKTS,
|
||||
VNIFILTER_ENTRY_STATS_TX_DROPS,
|
||||
VNIFILTER_ENTRY_STATS_TX_ERRORS,
|
||||
VNIFILTER_ENTRY_STATS_PAD,
|
||||
__VNIFILTER_ENTRY_STATS_MAX
|
||||
};
|
||||
#define VNIFILTER_ENTRY_STATS_MAX (__VNIFILTER_ENTRY_STATS_MAX - 1)
|
||||
|
||||
enum {
|
||||
VXLAN_VNIFILTER_ENTRY_UNSPEC,
|
||||
VXLAN_VNIFILTER_ENTRY_START,
|
||||
VXLAN_VNIFILTER_ENTRY_END,
|
||||
VXLAN_VNIFILTER_ENTRY_GROUP,
|
||||
VXLAN_VNIFILTER_ENTRY_GROUP6,
|
||||
VXLAN_VNIFILTER_ENTRY_STATS,
|
||||
__VXLAN_VNIFILTER_ENTRY_MAX
|
||||
};
|
||||
#define VXLAN_VNIFILTER_ENTRY_MAX (__VXLAN_VNIFILTER_ENTRY_MAX - 1)
|
||||
|
||||
enum {
|
||||
VXLAN_VNIFILTER_UNSPEC,
|
||||
VXLAN_VNIFILTER_ENTRY,
|
||||
__VXLAN_VNIFILTER_MAX
|
||||
};
|
||||
#define VXLAN_VNIFILTER_MAX (__VXLAN_VNIFILTER_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_VXLAN_UNSPEC,
|
||||
IFLA_VXLAN_ID,
|
||||
@@ -744,6 +815,7 @@ enum {
|
||||
IFLA_VXLAN_GPE,
|
||||
IFLA_VXLAN_TTL_INHERIT,
|
||||
IFLA_VXLAN_DF,
|
||||
IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */
|
||||
__IFLA_VXLAN_MAX
|
||||
};
|
||||
#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
|
||||
@@ -777,6 +849,7 @@ enum {
|
||||
IFLA_GENEVE_LABEL,
|
||||
IFLA_GENEVE_TTL_INHERIT,
|
||||
IFLA_GENEVE_DF,
|
||||
IFLA_GENEVE_INNER_PROTO_INHERIT,
|
||||
__IFLA_GENEVE_MAX
|
||||
};
|
||||
#define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
|
||||
@@ -822,6 +895,8 @@ enum {
|
||||
IFLA_GTP_FD1,
|
||||
IFLA_GTP_PDP_HASHSIZE,
|
||||
IFLA_GTP_ROLE,
|
||||
IFLA_GTP_CREATE_SOCKETS,
|
||||
IFLA_GTP_RESTART_COUNT,
|
||||
__IFLA_GTP_MAX,
|
||||
};
|
||||
#define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)
|
||||
@@ -860,6 +935,7 @@ enum {
|
||||
IFLA_BOND_PEER_NOTIF_DELAY,
|
||||
IFLA_BOND_AD_LACP_ACTIVE,
|
||||
IFLA_BOND_MISSED_MAX,
|
||||
IFLA_BOND_NS_IP6_TARGET,
|
||||
__IFLA_BOND_MAX,
|
||||
};
|
||||
|
||||
@@ -1156,6 +1232,17 @@ enum {
|
||||
|
||||
#define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1))
|
||||
|
||||
enum {
|
||||
IFLA_STATS_GETSET_UNSPEC,
|
||||
IFLA_STATS_GET_FILTERS, /* Nest of IFLA_STATS_LINK_xxx, each a u32 with
|
||||
* a filter mask for the corresponding group.
|
||||
*/
|
||||
IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS, /* 0 or 1 as u8 */
|
||||
__IFLA_STATS_GETSET_MAX,
|
||||
};
|
||||
|
||||
#define IFLA_STATS_GETSET_MAX (__IFLA_STATS_GETSET_MAX - 1)
|
||||
|
||||
/* These are embedded into IFLA_STATS_LINK_XSTATS:
|
||||
* [IFLA_STATS_LINK_XSTATS]
|
||||
* -> [LINK_XSTATS_TYPE_xxx]
|
||||
@@ -1173,10 +1260,21 @@ enum {
|
||||
enum {
|
||||
IFLA_OFFLOAD_XSTATS_UNSPEC,
|
||||
IFLA_OFFLOAD_XSTATS_CPU_HIT, /* struct rtnl_link_stats64 */
|
||||
IFLA_OFFLOAD_XSTATS_HW_S_INFO, /* HW stats info. A nest */
|
||||
IFLA_OFFLOAD_XSTATS_L3_STATS, /* struct rtnl_hw_stats64 */
|
||||
__IFLA_OFFLOAD_XSTATS_MAX
|
||||
};
|
||||
#define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1)
|
||||
|
||||
enum {
|
||||
IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC,
|
||||
IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST, /* u8 */
|
||||
IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED, /* u8 */
|
||||
__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX,
|
||||
};
|
||||
#define IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX \
|
||||
(__IFLA_OFFLOAD_XSTATS_HW_S_INFO_MAX - 1)
|
||||
|
||||
/* XDP section */
|
||||
|
||||
#define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0)
|
||||
|
||||
@@ -176,8 +176,10 @@ enum {
|
||||
#define TUNNEL_VXLAN_OPT __cpu_to_be16(0x1000)
|
||||
#define TUNNEL_NOCACHE __cpu_to_be16(0x2000)
|
||||
#define TUNNEL_ERSPAN_OPT __cpu_to_be16(0x4000)
|
||||
#define TUNNEL_GTP_OPT __cpu_to_be16(0x8000)
|
||||
|
||||
#define TUNNEL_OPTIONS_PRESENT \
|
||||
(TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT)
|
||||
(TUNNEL_GENEVE_OPT | TUNNEL_VXLAN_OPT | TUNNEL_ERSPAN_OPT | \
|
||||
TUNNEL_GTP_OPT)
|
||||
|
||||
#endif /* _UAPI_IF_TUNNEL_H_ */
|
||||
|
||||
@@ -104,6 +104,7 @@ enum iio_event_type {
|
||||
IIO_EV_TYPE_THRESH_ADAPTIVE,
|
||||
IIO_EV_TYPE_MAG_ADAPTIVE,
|
||||
IIO_EV_TYPE_CHANGE,
|
||||
IIO_EV_TYPE_MAG_REFERENCED,
|
||||
};
|
||||
|
||||
enum iio_event_direction {
|
||||
|
||||
@@ -274,6 +274,7 @@ struct input_mask {
|
||||
#define BUS_RMI 0x1D
|
||||
#define BUS_CEC 0x1E
|
||||
#define BUS_INTEL_ISHTP 0x1F
|
||||
#define BUS_AMD_SFH 0x20
|
||||
|
||||
/*
|
||||
* MT_TOOL types
|
||||
|
||||
@@ -22,6 +22,7 @@ struct io_uring_sqe {
|
||||
union {
|
||||
__u64 off; /* offset into file */
|
||||
__u64 addr2;
|
||||
__u32 cmd_op;
|
||||
};
|
||||
union {
|
||||
__u64 addr; /* pointer to buffer or iovecs */
|
||||
@@ -45,6 +46,7 @@ struct io_uring_sqe {
|
||||
__u32 rename_flags;
|
||||
__u32 unlink_flags;
|
||||
__u32 hardlink_flags;
|
||||
__u32 xattr_flags;
|
||||
};
|
||||
__u64 user_data; /* data to be passed back at completion time */
|
||||
/* pack this to avoid bogus arm OABI complaints */
|
||||
@@ -60,9 +62,28 @@ struct io_uring_sqe {
|
||||
__s32 splice_fd_in;
|
||||
__u32 file_index;
|
||||
};
|
||||
__u64 __pad2[2];
|
||||
union {
|
||||
struct {
|
||||
__u64 addr3;
|
||||
__u64 __pad2[1];
|
||||
};
|
||||
/*
|
||||
* If the ring is initialized with IORING_SETUP_SQE128, then
|
||||
* this field is used for 80 bytes of arbitrary command data
|
||||
*/
|
||||
__u8 cmd[0];
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* If sqe->file_index is set to this for opcodes that instantiate a new
|
||||
* direct descriptor (like openat/openat2/accept), then io_uring will allocate
|
||||
* an available direct descriptor instead of having the application pass one
|
||||
* in. The picked direct descriptor will be returned in cqe->res, or -ENFILE
|
||||
* if the space is full.
|
||||
*/
|
||||
#define IORING_FILE_INDEX_ALLOC (~0U)
|
||||
|
||||
enum {
|
||||
IOSQE_FIXED_FILE_BIT,
|
||||
IOSQE_IO_DRAIN_BIT,
|
||||
@@ -101,8 +122,26 @@ enum {
|
||||
#define IORING_SETUP_CLAMP (1U << 4) /* clamp SQ/CQ ring sizes */
|
||||
#define IORING_SETUP_ATTACH_WQ (1U << 5) /* attach to existing wq */
|
||||
#define IORING_SETUP_R_DISABLED (1U << 6) /* start with ring disabled */
|
||||
#define IORING_SETUP_SUBMIT_ALL (1U << 7) /* continue submit on error */
|
||||
/*
|
||||
* Cooperative task running. When requests complete, they often require
|
||||
* forcing the submitter to transition to the kernel to complete. If this
|
||||
* flag is set, work will be done when the task transitions anyway, rather
|
||||
* than force an inter-processor interrupt reschedule. This avoids interrupting
|
||||
* a task running in userspace, and saves an IPI.
|
||||
*/
|
||||
#define IORING_SETUP_COOP_TASKRUN (1U << 8)
|
||||
/*
|
||||
* If COOP_TASKRUN is set, get notified if task work is available for
|
||||
* running and a kernel transition would be needed to run it. This sets
|
||||
* IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN.
|
||||
*/
|
||||
#define IORING_SETUP_TASKRUN_FLAG (1U << 9)
|
||||
|
||||
enum {
|
||||
#define IORING_SETUP_SQE128 (1U << 10) /* SQEs are 128 byte */
|
||||
#define IORING_SETUP_CQE32 (1U << 11) /* CQEs are 32 byte */
|
||||
|
||||
enum io_uring_op {
|
||||
IORING_OP_NOP,
|
||||
IORING_OP_READV,
|
||||
IORING_OP_WRITEV,
|
||||
@@ -143,6 +182,13 @@ enum {
|
||||
IORING_OP_MKDIRAT,
|
||||
IORING_OP_SYMLINKAT,
|
||||
IORING_OP_LINKAT,
|
||||
IORING_OP_MSG_RING,
|
||||
IORING_OP_FSETXATTR,
|
||||
IORING_OP_SETXATTR,
|
||||
IORING_OP_FGETXATTR,
|
||||
IORING_OP_GETXATTR,
|
||||
IORING_OP_SOCKET,
|
||||
IORING_OP_URING_CMD,
|
||||
|
||||
/* this goes last, obviously */
|
||||
IORING_OP_LAST,
|
||||
@@ -185,6 +231,33 @@ enum {
|
||||
#define IORING_POLL_UPDATE_EVENTS (1U << 1)
|
||||
#define IORING_POLL_UPDATE_USER_DATA (1U << 2)
|
||||
|
||||
/*
|
||||
* ASYNC_CANCEL flags.
|
||||
*
|
||||
* IORING_ASYNC_CANCEL_ALL Cancel all requests that match the given key
|
||||
* IORING_ASYNC_CANCEL_FD Key off 'fd' for cancelation rather than the
|
||||
* request 'user_data'
|
||||
* IORING_ASYNC_CANCEL_ANY Match any request
|
||||
*/
|
||||
#define IORING_ASYNC_CANCEL_ALL (1U << 0)
|
||||
#define IORING_ASYNC_CANCEL_FD (1U << 1)
|
||||
#define IORING_ASYNC_CANCEL_ANY (1U << 2)
|
||||
|
||||
/*
|
||||
* send/sendmsg and recv/recvmsg flags (sqe->ioprio)
|
||||
*
|
||||
* IORING_RECVSEND_POLL_FIRST If set, instead of first attempting to send
|
||||
* or receive and arm poll if that yields an
|
||||
* -EAGAIN result, arm poll upfront and skip
|
||||
* the initial transfer attempt.
|
||||
*/
|
||||
#define IORING_RECVSEND_POLL_FIRST (1U << 0)
|
||||
|
||||
/*
|
||||
* accept flags stored in sqe->ioprio
|
||||
*/
|
||||
#define IORING_ACCEPT_MULTISHOT (1U << 0)
|
||||
|
||||
/*
|
||||
* IO completion data structure (Completion Queue Entry)
|
||||
*/
|
||||
@@ -192,6 +265,12 @@ struct io_uring_cqe {
|
||||
__u64 user_data; /* sqe->data submission passed back */
|
||||
__s32 res; /* result code for this event */
|
||||
__u32 flags;
|
||||
|
||||
/*
|
||||
* If the ring is initialized with IORING_SETUP_CQE32, then this field
|
||||
* contains 16-bytes of padding, doubling the size of the CQE.
|
||||
*/
|
||||
__u64 big_cqe[];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -199,9 +278,11 @@ struct io_uring_cqe {
|
||||
*
|
||||
* IORING_CQE_F_BUFFER If set, the upper 16 bits are the buffer ID
|
||||
* IORING_CQE_F_MORE If set, parent SQE will generate more CQE entries
|
||||
* IORING_CQE_F_SOCK_NONEMPTY If set, more data to read after socket recv
|
||||
*/
|
||||
#define IORING_CQE_F_BUFFER (1U << 0)
|
||||
#define IORING_CQE_F_MORE (1U << 1)
|
||||
#define IORING_CQE_F_SOCK_NONEMPTY (1U << 2)
|
||||
|
||||
enum {
|
||||
IORING_CQE_BUFFER_SHIFT = 16,
|
||||
@@ -234,6 +315,7 @@ struct io_sqring_offsets {
|
||||
*/
|
||||
#define IORING_SQ_NEED_WAKEUP (1U << 0) /* needs io_uring_enter wakeup */
|
||||
#define IORING_SQ_CQ_OVERFLOW (1U << 1) /* CQ ring is overflown */
|
||||
#define IORING_SQ_TASKRUN (1U << 2) /* task should enter the kernel */
|
||||
|
||||
struct io_cqring_offsets {
|
||||
__u32 head;
|
||||
@@ -257,10 +339,11 @@ struct io_cqring_offsets {
|
||||
/*
|
||||
* io_uring_enter(2) flags
|
||||
*/
|
||||
#define IORING_ENTER_GETEVENTS (1U << 0)
|
||||
#define IORING_ENTER_SQ_WAKEUP (1U << 1)
|
||||
#define IORING_ENTER_SQ_WAIT (1U << 2)
|
||||
#define IORING_ENTER_EXT_ARG (1U << 3)
|
||||
#define IORING_ENTER_GETEVENTS (1U << 0)
|
||||
#define IORING_ENTER_SQ_WAKEUP (1U << 1)
|
||||
#define IORING_ENTER_SQ_WAIT (1U << 2)
|
||||
#define IORING_ENTER_EXT_ARG (1U << 3)
|
||||
#define IORING_ENTER_REGISTERED_RING (1U << 4)
|
||||
|
||||
/*
|
||||
* Passed in for io_uring_setup(2). Copied back with updated info on success
|
||||
@@ -293,6 +376,7 @@ struct io_uring_params {
|
||||
#define IORING_FEAT_NATIVE_WORKERS (1U << 9)
|
||||
#define IORING_FEAT_RSRC_TAGS (1U << 10)
|
||||
#define IORING_FEAT_CQE_SKIP (1U << 11)
|
||||
#define IORING_FEAT_LINKED_FILE (1U << 12)
|
||||
|
||||
/*
|
||||
* io_uring_register(2) opcodes and arguments
|
||||
@@ -325,6 +409,14 @@ enum {
|
||||
/* set/get max number of io-wq workers */
|
||||
IORING_REGISTER_IOWQ_MAX_WORKERS = 19,
|
||||
|
||||
/* register/unregister io_uring fd with the ring */
|
||||
IORING_REGISTER_RING_FDS = 20,
|
||||
IORING_UNREGISTER_RING_FDS = 21,
|
||||
|
||||
/* register ring based provide buffer group */
|
||||
IORING_REGISTER_PBUF_RING = 22,
|
||||
IORING_UNREGISTER_PBUF_RING = 23,
|
||||
|
||||
/* this goes last */
|
||||
IORING_REGISTER_LAST
|
||||
};
|
||||
@@ -342,9 +434,15 @@ struct io_uring_files_update {
|
||||
__aligned_u64 /* __s32 * */ fds;
|
||||
};
|
||||
|
||||
/*
|
||||
* Register a fully sparse file space, rather than pass in an array of all
|
||||
* -1 file descriptors.
|
||||
*/
|
||||
#define IORING_RSRC_REGISTER_SPARSE (1U << 0)
|
||||
|
||||
struct io_uring_rsrc_register {
|
||||
__u32 nr;
|
||||
__u32 resv;
|
||||
__u32 flags;
|
||||
__u64 resv2;
|
||||
__aligned_u64 data;
|
||||
__aligned_u64 tags;
|
||||
@@ -396,6 +494,38 @@ struct io_uring_restriction {
|
||||
__u32 resv2[3];
|
||||
};
|
||||
|
||||
struct io_uring_buf {
|
||||
__u64 addr;
|
||||
__u32 len;
|
||||
__u16 bid;
|
||||
__u16 resv;
|
||||
};
|
||||
|
||||
struct io_uring_buf_ring {
|
||||
union {
|
||||
/*
|
||||
* To avoid spilling into more pages than we need to, the
|
||||
* ring tail is overlaid with the io_uring_buf->resv field.
|
||||
*/
|
||||
struct {
|
||||
__u64 resv1;
|
||||
__u32 resv2;
|
||||
__u16 resv3;
|
||||
__u16 tail;
|
||||
};
|
||||
struct io_uring_buf bufs[0];
|
||||
};
|
||||
};
|
||||
|
||||
/* argument for IORING_(UN)REGISTER_PBUF_RING */
|
||||
struct io_uring_buf_reg {
|
||||
__u64 ring_addr;
|
||||
__u32 ring_entries;
|
||||
__u16 bgid;
|
||||
__u16 pad;
|
||||
__u64 resv[3];
|
||||
};
|
||||
|
||||
/*
|
||||
* io_uring_restriction->opcode values
|
||||
*/
|
||||
|
||||
@@ -41,6 +41,15 @@ enum {
|
||||
/* IOAM Trace Header */
|
||||
IOAM6_IPTUNNEL_TRACE, /* struct ioam6_trace_hdr */
|
||||
|
||||
/* Insertion frequency:
|
||||
* "k over n" packets (0 < k <= n)
|
||||
* [0.0001% ... 100%]
|
||||
*/
|
||||
#define IOAM6_IPTUNNEL_FREQ_MIN 1
|
||||
#define IOAM6_IPTUNNEL_FREQ_MAX 1000000
|
||||
IOAM6_IPTUNNEL_FREQ_K, /* u32 */
|
||||
IOAM6_IPTUNNEL_FREQ_N, /* u32 */
|
||||
|
||||
__IOAM6_IPTUNNEL_MAX,
|
||||
};
|
||||
|
||||
|
||||
@@ -158,185 +158,4 @@ struct iommu_page_response {
|
||||
__u32 code;
|
||||
};
|
||||
|
||||
/* defines the granularity of the invalidation */
|
||||
enum iommu_inv_granularity {
|
||||
IOMMU_INV_GRANU_DOMAIN, /* domain-selective invalidation */
|
||||
IOMMU_INV_GRANU_PASID, /* PASID-selective invalidation */
|
||||
IOMMU_INV_GRANU_ADDR, /* page-selective invalidation */
|
||||
IOMMU_INV_GRANU_NR, /* number of invalidation granularities */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iommu_inv_addr_info - Address Selective Invalidation Structure
|
||||
*
|
||||
* @flags: indicates the granularity of the address-selective invalidation
|
||||
* - If the PASID bit is set, the @pasid field is populated and the invalidation
|
||||
* relates to cache entries tagged with this PASID and matching the address
|
||||
* range.
|
||||
* - If ARCHID bit is set, @archid is populated and the invalidation relates
|
||||
* to cache entries tagged with this architecture specific ID and matching
|
||||
* the address range.
|
||||
* - Both PASID and ARCHID can be set as they may tag different caches.
|
||||
* - If neither PASID or ARCHID is set, global addr invalidation applies.
|
||||
* - The LEAF flag indicates whether only the leaf PTE caching needs to be
|
||||
* invalidated and other paging structure caches can be preserved.
|
||||
* @pasid: process address space ID
|
||||
* @archid: architecture-specific ID
|
||||
* @addr: first stage/level input address
|
||||
* @granule_size: page/block size of the mapping in bytes
|
||||
* @nb_granules: number of contiguous granules to be invalidated
|
||||
*/
|
||||
struct iommu_inv_addr_info {
|
||||
#define IOMMU_INV_ADDR_FLAGS_PASID (1 << 0)
|
||||
#define IOMMU_INV_ADDR_FLAGS_ARCHID (1 << 1)
|
||||
#define IOMMU_INV_ADDR_FLAGS_LEAF (1 << 2)
|
||||
__u32 flags;
|
||||
__u32 archid;
|
||||
__u64 pasid;
|
||||
__u64 addr;
|
||||
__u64 granule_size;
|
||||
__u64 nb_granules;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iommu_inv_pasid_info - PASID Selective Invalidation Structure
|
||||
*
|
||||
* @flags: indicates the granularity of the PASID-selective invalidation
|
||||
* - If the PASID bit is set, the @pasid field is populated and the invalidation
|
||||
* relates to cache entries tagged with this PASID and matching the address
|
||||
* range.
|
||||
* - If the ARCHID bit is set, the @archid is populated and the invalidation
|
||||
* relates to cache entries tagged with this architecture specific ID and
|
||||
* matching the address range.
|
||||
* - Both PASID and ARCHID can be set as they may tag different caches.
|
||||
* - At least one of PASID or ARCHID must be set.
|
||||
* @pasid: process address space ID
|
||||
* @archid: architecture-specific ID
|
||||
*/
|
||||
struct iommu_inv_pasid_info {
|
||||
#define IOMMU_INV_PASID_FLAGS_PASID (1 << 0)
|
||||
#define IOMMU_INV_PASID_FLAGS_ARCHID (1 << 1)
|
||||
__u32 flags;
|
||||
__u32 archid;
|
||||
__u64 pasid;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iommu_cache_invalidate_info - First level/stage invalidation
|
||||
* information
|
||||
* @argsz: User filled size of this data
|
||||
* @version: API version of this structure
|
||||
* @cache: bitfield that allows to select which caches to invalidate
|
||||
* @granularity: defines the lowest granularity used for the invalidation:
|
||||
* domain > PASID > addr
|
||||
* @padding: reserved for future use (should be zero)
|
||||
* @pasid_info: invalidation data when @granularity is %IOMMU_INV_GRANU_PASID
|
||||
* @addr_info: invalidation data when @granularity is %IOMMU_INV_GRANU_ADDR
|
||||
*
|
||||
* Not all the combinations of cache/granularity are valid:
|
||||
*
|
||||
* +--------------+---------------+---------------+---------------+
|
||||
* | type / | DEV_IOTLB | IOTLB | PASID |
|
||||
* | granularity | | | cache |
|
||||
* +==============+===============+===============+===============+
|
||||
* | DOMAIN | N/A | Y | Y |
|
||||
* +--------------+---------------+---------------+---------------+
|
||||
* | PASID | Y | Y | Y |
|
||||
* +--------------+---------------+---------------+---------------+
|
||||
* | ADDR | Y | Y | N/A |
|
||||
* +--------------+---------------+---------------+---------------+
|
||||
*
|
||||
* Invalidations by %IOMMU_INV_GRANU_DOMAIN don't take any argument other than
|
||||
* @version and @cache.
|
||||
*
|
||||
* If multiple cache types are invalidated simultaneously, they all
|
||||
* must support the used granularity.
|
||||
*/
|
||||
struct iommu_cache_invalidate_info {
|
||||
__u32 argsz;
|
||||
#define IOMMU_CACHE_INVALIDATE_INFO_VERSION_1 1
|
||||
__u32 version;
|
||||
/* IOMMU paging structure cache */
|
||||
#define IOMMU_CACHE_INV_TYPE_IOTLB (1 << 0) /* IOMMU IOTLB */
|
||||
#define IOMMU_CACHE_INV_TYPE_DEV_IOTLB (1 << 1) /* Device IOTLB */
|
||||
#define IOMMU_CACHE_INV_TYPE_PASID (1 << 2) /* PASID cache */
|
||||
#define IOMMU_CACHE_INV_TYPE_NR (3)
|
||||
__u8 cache;
|
||||
__u8 granularity;
|
||||
__u8 padding[6];
|
||||
union {
|
||||
struct iommu_inv_pasid_info pasid_info;
|
||||
struct iommu_inv_addr_info addr_info;
|
||||
} granu;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iommu_gpasid_bind_data_vtd - Intel VT-d specific data on device and guest
|
||||
* SVA binding.
|
||||
*
|
||||
* @flags: VT-d PASID table entry attributes
|
||||
* @pat: Page attribute table data to compute effective memory type
|
||||
* @emt: Extended memory type
|
||||
*
|
||||
* Only guest vIOMMU selectable and effective options are passed down to
|
||||
* the host IOMMU.
|
||||
*/
|
||||
struct iommu_gpasid_bind_data_vtd {
|
||||
#define IOMMU_SVA_VTD_GPASID_SRE (1 << 0) /* supervisor request */
|
||||
#define IOMMU_SVA_VTD_GPASID_EAFE (1 << 1) /* extended access enable */
|
||||
#define IOMMU_SVA_VTD_GPASID_PCD (1 << 2) /* page-level cache disable */
|
||||
#define IOMMU_SVA_VTD_GPASID_PWT (1 << 3) /* page-level write through */
|
||||
#define IOMMU_SVA_VTD_GPASID_EMTE (1 << 4) /* extended mem type enable */
|
||||
#define IOMMU_SVA_VTD_GPASID_CD (1 << 5) /* PASID-level cache disable */
|
||||
#define IOMMU_SVA_VTD_GPASID_WPE (1 << 6) /* Write protect enable */
|
||||
#define IOMMU_SVA_VTD_GPASID_LAST (1 << 7)
|
||||
__u64 flags;
|
||||
__u32 pat;
|
||||
__u32 emt;
|
||||
};
|
||||
|
||||
#define IOMMU_SVA_VTD_GPASID_MTS_MASK (IOMMU_SVA_VTD_GPASID_CD | \
|
||||
IOMMU_SVA_VTD_GPASID_EMTE | \
|
||||
IOMMU_SVA_VTD_GPASID_PCD | \
|
||||
IOMMU_SVA_VTD_GPASID_PWT)
|
||||
|
||||
/**
|
||||
* struct iommu_gpasid_bind_data - Information about device and guest PASID binding
|
||||
* @argsz: User filled size of this data
|
||||
* @version: Version of this data structure
|
||||
* @format: PASID table entry format
|
||||
* @flags: Additional information on guest bind request
|
||||
* @gpgd: Guest page directory base of the guest mm to bind
|
||||
* @hpasid: Process address space ID used for the guest mm in host IOMMU
|
||||
* @gpasid: Process address space ID used for the guest mm in guest IOMMU
|
||||
* @addr_width: Guest virtual address width
|
||||
* @padding: Reserved for future use (should be zero)
|
||||
* @vtd: Intel VT-d specific data
|
||||
*
|
||||
* Guest to host PASID mapping can be an identity or non-identity, where guest
|
||||
* has its own PASID space. For non-identify mapping, guest to host PASID lookup
|
||||
* is needed when VM programs guest PASID into an assigned device. VMM may
|
||||
* trap such PASID programming then request host IOMMU driver to convert guest
|
||||
* PASID to host PASID based on this bind data.
|
||||
*/
|
||||
struct iommu_gpasid_bind_data {
|
||||
__u32 argsz;
|
||||
#define IOMMU_GPASID_BIND_VERSION_1 1
|
||||
__u32 version;
|
||||
#define IOMMU_PASID_FORMAT_INTEL_VTD 1
|
||||
#define IOMMU_PASID_FORMAT_LAST 2
|
||||
__u32 format;
|
||||
__u32 addr_width;
|
||||
#define IOMMU_SVA_GPASID_VAL (1 << 0) /* guest PASID valid */
|
||||
__u64 flags;
|
||||
__u64 gpgd;
|
||||
__u64 hpasid;
|
||||
__u64 gpasid;
|
||||
__u8 padding[8];
|
||||
/* Vendor specific data */
|
||||
union {
|
||||
struct iommu_gpasid_bind_data_vtd vtd;
|
||||
} vendor;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_IOMMU_H */
|
||||
|
||||
@@ -194,6 +194,7 @@ enum {
|
||||
DEVCONF_IOAM6_ID,
|
||||
DEVCONF_IOAM6_ID_WIDE,
|
||||
DEVCONF_NDISC_EVICT_NOCARRIER,
|
||||
DEVCONF_ACCEPT_UNTRACKED_NA,
|
||||
DEVCONF_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#define KEXEC_ARCH_MIPS ( 8 << 16)
|
||||
#define KEXEC_ARCH_AARCH64 (183 << 16)
|
||||
#define KEXEC_ARCH_RISCV (243 << 16)
|
||||
#define KEXEC_ARCH_LOONGARCH (258 << 16)
|
||||
|
||||
/* The artificial cap on the number of segments passed to kexec_load. */
|
||||
#define KEXEC_SEGMENT_MAX 16
|
||||
@@ -54,9 +55,9 @@
|
||||
*/
|
||||
struct kexec_segment {
|
||||
const void *buf;
|
||||
size_t bufsz;
|
||||
__kernel_size_t bufsz;
|
||||
const void *mem;
|
||||
size_t memsz;
|
||||
__kernel_size_t memsz;
|
||||
};
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
@@ -32,9 +32,11 @@
|
||||
* - 1.4 - Indicate new SRAM EDC bit in device properties
|
||||
* - 1.5 - Add SVM API
|
||||
* - 1.6 - Query clear flags in SVM get_attr API
|
||||
* - 1.7 - Checkpoint Restore (CRIU) API
|
||||
* - 1.8 - CRIU - Support for SDMA transfers with GTT BOs
|
||||
*/
|
||||
#define KFD_IOCTL_MAJOR_VERSION 1
|
||||
#define KFD_IOCTL_MINOR_VERSION 6
|
||||
#define KFD_IOCTL_MINOR_VERSION 8
|
||||
|
||||
struct kfd_ioctl_get_version_args {
|
||||
__u32 major_version; /* from KFD */
|
||||
@@ -194,6 +196,8 @@ struct kfd_ioctl_dbg_wave_control_args {
|
||||
__u32 buf_size_in_bytes; /*including gpu_id and buf_size */
|
||||
};
|
||||
|
||||
#define KFD_INVALID_FD 0xffffffff
|
||||
|
||||
/* Matching HSA_EVENTTYPE */
|
||||
#define KFD_IOC_EVENT_SIGNAL 0
|
||||
#define KFD_IOC_EVENT_NODECHANGE 1
|
||||
@@ -462,12 +466,89 @@ enum kfd_smi_event {
|
||||
};
|
||||
|
||||
#define KFD_SMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
|
||||
#define KFD_SMI_EVENT_MSG_SIZE 96
|
||||
|
||||
struct kfd_ioctl_smi_events_args {
|
||||
__u32 gpuid; /* to KFD */
|
||||
__u32 anon_fd; /* from KFD */
|
||||
};
|
||||
|
||||
/**************************************************************************************************
|
||||
* CRIU IOCTLs (Checkpoint Restore In Userspace)
|
||||
*
|
||||
* When checkpointing a process, the userspace application will perform:
|
||||
* 1. PROCESS_INFO op to determine current process information. This pauses execution and evicts
|
||||
* all the queues.
|
||||
* 2. CHECKPOINT op to checkpoint process contents (BOs, queues, events, svm-ranges)
|
||||
* 3. UNPAUSE op to un-evict all the queues
|
||||
*
|
||||
* When restoring a process, the CRIU userspace application will perform:
|
||||
*
|
||||
* 1. RESTORE op to restore process contents
|
||||
* 2. RESUME op to start the process
|
||||
*
|
||||
* Note: Queues are forced into an evicted state after a successful PROCESS_INFO. User
|
||||
* application needs to perform an UNPAUSE operation after calling PROCESS_INFO.
|
||||
*/
|
||||
|
||||
enum kfd_criu_op {
|
||||
KFD_CRIU_OP_PROCESS_INFO,
|
||||
KFD_CRIU_OP_CHECKPOINT,
|
||||
KFD_CRIU_OP_UNPAUSE,
|
||||
KFD_CRIU_OP_RESTORE,
|
||||
KFD_CRIU_OP_RESUME,
|
||||
};
|
||||
|
||||
/**
|
||||
* kfd_ioctl_criu_args - Arguments perform CRIU operation
|
||||
* @devices: [in/out] User pointer to memory location for devices information.
|
||||
* This is an array of type kfd_criu_device_bucket.
|
||||
* @bos: [in/out] User pointer to memory location for BOs information
|
||||
* This is an array of type kfd_criu_bo_bucket.
|
||||
* @priv_data: [in/out] User pointer to memory location for private data
|
||||
* @priv_data_size: [in/out] Size of priv_data in bytes
|
||||
* @num_devices: [in/out] Number of GPUs used by process. Size of @devices array.
|
||||
* @num_bos [in/out] Number of BOs used by process. Size of @bos array.
|
||||
* @num_objects: [in/out] Number of objects used by process. Objects are opaque to
|
||||
* user application.
|
||||
* @pid: [in/out] PID of the process being checkpointed
|
||||
* @op [in] Type of operation (kfd_criu_op)
|
||||
*
|
||||
* Return: 0 on success, -errno on failure
|
||||
*/
|
||||
struct kfd_ioctl_criu_args {
|
||||
__u64 devices; /* Used during ops: CHECKPOINT, RESTORE */
|
||||
__u64 bos; /* Used during ops: CHECKPOINT, RESTORE */
|
||||
__u64 priv_data; /* Used during ops: CHECKPOINT, RESTORE */
|
||||
__u64 priv_data_size; /* Used during ops: PROCESS_INFO, RESTORE */
|
||||
__u32 num_devices; /* Used during ops: PROCESS_INFO, RESTORE */
|
||||
__u32 num_bos; /* Used during ops: PROCESS_INFO, RESTORE */
|
||||
__u32 num_objects; /* Used during ops: PROCESS_INFO, RESTORE */
|
||||
__u32 pid; /* Used during ops: PROCESS_INFO, RESUME */
|
||||
__u32 op;
|
||||
};
|
||||
|
||||
struct kfd_criu_device_bucket {
|
||||
__u32 user_gpu_id;
|
||||
__u32 actual_gpu_id;
|
||||
__u32 drm_fd;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct kfd_criu_bo_bucket {
|
||||
__u64 addr;
|
||||
__u64 size;
|
||||
__u64 offset;
|
||||
__u64 restored_offset; /* During restore, updated offset for BO */
|
||||
__u32 gpu_id; /* This is the user_gpu_id */
|
||||
__u32 alloc_flags;
|
||||
__u32 dmabuf_fd;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/* CRIU IOCTLs - END */
|
||||
/**************************************************************************************************/
|
||||
|
||||
/* Register offset inside the remapped mmio page
|
||||
*/
|
||||
enum kfd_mmio_remap {
|
||||
@@ -596,7 +677,7 @@ struct kfd_ioctl_svm_args {
|
||||
__u32 op;
|
||||
__u32 nattr;
|
||||
/* Variable length array of attributes */
|
||||
struct kfd_ioctl_svm_attribute attrs[0];
|
||||
struct kfd_ioctl_svm_attribute attrs[];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -679,16 +760,16 @@ struct kfd_ioctl_set_xnack_mode_args {
|
||||
#define AMDKFD_IOC_WAIT_EVENTS \
|
||||
AMDKFD_IOWR(0x0C, struct kfd_ioctl_wait_events_args)
|
||||
|
||||
#define AMDKFD_IOC_DBG_REGISTER \
|
||||
#define AMDKFD_IOC_DBG_REGISTER_DEPRECATED \
|
||||
AMDKFD_IOW(0x0D, struct kfd_ioctl_dbg_register_args)
|
||||
|
||||
#define AMDKFD_IOC_DBG_UNREGISTER \
|
||||
#define AMDKFD_IOC_DBG_UNREGISTER_DEPRECATED \
|
||||
AMDKFD_IOW(0x0E, struct kfd_ioctl_dbg_unregister_args)
|
||||
|
||||
#define AMDKFD_IOC_DBG_ADDRESS_WATCH \
|
||||
#define AMDKFD_IOC_DBG_ADDRESS_WATCH_DEPRECATED \
|
||||
AMDKFD_IOW(0x0F, struct kfd_ioctl_dbg_address_watch_args)
|
||||
|
||||
#define AMDKFD_IOC_DBG_WAVE_CONTROL \
|
||||
#define AMDKFD_IOC_DBG_WAVE_CONTROL_DEPRECATED \
|
||||
AMDKFD_IOW(0x10, struct kfd_ioctl_dbg_wave_control_args)
|
||||
|
||||
#define AMDKFD_IOC_SET_SCRATCH_BACKING_VA \
|
||||
@@ -742,7 +823,10 @@ struct kfd_ioctl_set_xnack_mode_args {
|
||||
#define AMDKFD_IOC_SET_XNACK_MODE \
|
||||
AMDKFD_IOWR(0x21, struct kfd_ioctl_set_xnack_mode_args)
|
||||
|
||||
#define AMDKFD_IOC_CRIU_OP \
|
||||
AMDKFD_IOWR(0x22, struct kfd_ioctl_criu_args)
|
||||
|
||||
#define AMDKFD_COMMAND_START 0x01
|
||||
#define AMDKFD_COMMAND_END 0x22
|
||||
#define AMDKFD_COMMAND_END 0x23
|
||||
|
||||
#endif
|
||||
|
||||
@@ -444,8 +444,17 @@ struct kvm_run {
|
||||
#define KVM_SYSTEM_EVENT_SHUTDOWN 1
|
||||
#define KVM_SYSTEM_EVENT_RESET 2
|
||||
#define KVM_SYSTEM_EVENT_CRASH 3
|
||||
#define KVM_SYSTEM_EVENT_WAKEUP 4
|
||||
#define KVM_SYSTEM_EVENT_SUSPEND 5
|
||||
#define KVM_SYSTEM_EVENT_SEV_TERM 6
|
||||
__u32 type;
|
||||
__u64 flags;
|
||||
__u32 ndata;
|
||||
union {
|
||||
#ifndef __KERNEL__
|
||||
__u64 flags;
|
||||
#endif
|
||||
__u64 data[16];
|
||||
};
|
||||
} system_event;
|
||||
/* KVM_EXIT_S390_STSI */
|
||||
struct {
|
||||
@@ -562,9 +571,12 @@ struct kvm_s390_mem_op {
|
||||
__u32 op; /* type of operation */
|
||||
__u64 buf; /* buffer in userspace */
|
||||
union {
|
||||
__u8 ar; /* the access register number */
|
||||
struct {
|
||||
__u8 ar; /* the access register number */
|
||||
__u8 key; /* access key, ignored if flag unset */
|
||||
};
|
||||
__u32 sida_offset; /* offset into the sida */
|
||||
__u8 reserved[32]; /* should be set to 0 */
|
||||
__u8 reserved[32]; /* ignored */
|
||||
};
|
||||
};
|
||||
/* types for kvm_s390_mem_op->op */
|
||||
@@ -572,9 +584,12 @@ struct kvm_s390_mem_op {
|
||||
#define KVM_S390_MEMOP_LOGICAL_WRITE 1
|
||||
#define KVM_S390_MEMOP_SIDA_READ 2
|
||||
#define KVM_S390_MEMOP_SIDA_WRITE 3
|
||||
#define KVM_S390_MEMOP_ABSOLUTE_READ 4
|
||||
#define KVM_S390_MEMOP_ABSOLUTE_WRITE 5
|
||||
/* flags for kvm_s390_mem_op->flags */
|
||||
#define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0)
|
||||
#define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1)
|
||||
#define KVM_S390_MEMOP_F_SKEY_PROTECTION (1ULL << 2)
|
||||
|
||||
/* for KVM_INTERRUPT */
|
||||
struct kvm_interrupt {
|
||||
@@ -634,6 +649,7 @@ struct kvm_vapic_addr {
|
||||
#define KVM_MP_STATE_OPERATING 7
|
||||
#define KVM_MP_STATE_LOAD 8
|
||||
#define KVM_MP_STATE_AP_RESET_HOLD 9
|
||||
#define KVM_MP_STATE_SUSPENDED 10
|
||||
|
||||
struct kvm_mp_state {
|
||||
__u32 mp_state;
|
||||
@@ -1135,6 +1151,12 @@ struct kvm_ppc_resize_hpt {
|
||||
#define KVM_CAP_XSAVE2 208
|
||||
#define KVM_CAP_SYS_ATTRIBUTES 209
|
||||
#define KVM_CAP_PPC_AIL_MODE_3 210
|
||||
#define KVM_CAP_S390_MEM_OP_EXTENSION 211
|
||||
#define KVM_CAP_PMU_CAPABILITY 212
|
||||
#define KVM_CAP_DISABLE_QUIRKS2 213
|
||||
#define KVM_CAP_VM_TSC_CONTROL 214
|
||||
#define KVM_CAP_SYSTEM_EVENT_DATA 215
|
||||
#define KVM_CAP_ARM_SYSTEM_SUSPEND 216
|
||||
|
||||
#ifdef KVM_CAP_IRQ_ROUTING
|
||||
|
||||
@@ -1223,6 +1245,7 @@ struct kvm_x86_mce {
|
||||
#define KVM_XEN_HVM_CONFIG_SHARED_INFO (1 << 2)
|
||||
#define KVM_XEN_HVM_CONFIG_RUNSTATE (1 << 3)
|
||||
#define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 4)
|
||||
#define KVM_XEN_HVM_CONFIG_EVTCHN_SEND (1 << 5)
|
||||
|
||||
struct kvm_xen_hvm_config {
|
||||
__u32 flags;
|
||||
@@ -1461,7 +1484,8 @@ struct kvm_s390_ucas_mapping {
|
||||
#define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2)
|
||||
/* Available with KVM_CAP_PPC_GET_PVINFO */
|
||||
#define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo)
|
||||
/* Available with KVM_CAP_TSC_CONTROL */
|
||||
/* Available with KVM_CAP_TSC_CONTROL for a vCPU, or with
|
||||
* KVM_CAP_VM_TSC_CONTROL to set defaults for a VM */
|
||||
#define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2)
|
||||
#define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3)
|
||||
/* Available with KVM_CAP_PCI_2_3 */
|
||||
@@ -1677,6 +1701,32 @@ struct kvm_xen_hvm_attr {
|
||||
struct {
|
||||
__u64 gfn;
|
||||
} shared_info;
|
||||
struct {
|
||||
__u32 send_port;
|
||||
__u32 type; /* EVTCHNSTAT_ipi / EVTCHNSTAT_interdomain */
|
||||
__u32 flags;
|
||||
#define KVM_XEN_EVTCHN_DEASSIGN (1 << 0)
|
||||
#define KVM_XEN_EVTCHN_UPDATE (1 << 1)
|
||||
#define KVM_XEN_EVTCHN_RESET (1 << 2)
|
||||
/*
|
||||
* Events sent by the guest are either looped back to
|
||||
* the guest itself (potentially on a different port#)
|
||||
* or signalled via an eventfd.
|
||||
*/
|
||||
union {
|
||||
struct {
|
||||
__u32 port;
|
||||
__u32 vcpu;
|
||||
__u32 priority;
|
||||
} port;
|
||||
struct {
|
||||
__u32 port; /* Zero for eventfd */
|
||||
__s32 fd;
|
||||
} eventfd;
|
||||
__u32 padding[4];
|
||||
} deliver;
|
||||
} evtchn;
|
||||
__u32 xen_version;
|
||||
__u64 pad[8];
|
||||
} u;
|
||||
};
|
||||
@@ -1685,11 +1735,17 @@ struct kvm_xen_hvm_attr {
|
||||
#define KVM_XEN_ATTR_TYPE_LONG_MODE 0x0
|
||||
#define KVM_XEN_ATTR_TYPE_SHARED_INFO 0x1
|
||||
#define KVM_XEN_ATTR_TYPE_UPCALL_VECTOR 0x2
|
||||
/* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */
|
||||
#define KVM_XEN_ATTR_TYPE_EVTCHN 0x3
|
||||
#define KVM_XEN_ATTR_TYPE_XEN_VERSION 0x4
|
||||
|
||||
/* Per-vCPU Xen attributes */
|
||||
#define KVM_XEN_VCPU_GET_ATTR _IOWR(KVMIO, 0xca, struct kvm_xen_vcpu_attr)
|
||||
#define KVM_XEN_VCPU_SET_ATTR _IOW(KVMIO, 0xcb, struct kvm_xen_vcpu_attr)
|
||||
|
||||
/* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */
|
||||
#define KVM_XEN_HVM_EVTCHN_SEND _IOW(KVMIO, 0xd0, struct kvm_irq_routing_xen_evtchn)
|
||||
|
||||
#define KVM_GET_SREGS2 _IOR(KVMIO, 0xcc, struct kvm_sregs2)
|
||||
#define KVM_SET_SREGS2 _IOW(KVMIO, 0xcd, struct kvm_sregs2)
|
||||
|
||||
@@ -1707,6 +1763,13 @@ struct kvm_xen_vcpu_attr {
|
||||
__u64 time_blocked;
|
||||
__u64 time_offline;
|
||||
} runstate;
|
||||
__u32 vcpu_id;
|
||||
struct {
|
||||
__u32 port;
|
||||
__u32 priority;
|
||||
__u64 expires_ns;
|
||||
} timer;
|
||||
__u8 vector;
|
||||
} u;
|
||||
};
|
||||
|
||||
@@ -1717,6 +1780,10 @@ struct kvm_xen_vcpu_attr {
|
||||
#define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT 0x3
|
||||
#define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_DATA 0x4
|
||||
#define KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST 0x5
|
||||
/* Available with KVM_CAP_XEN_HVM / KVM_XEN_HVM_CONFIG_EVTCHN_SEND */
|
||||
#define KVM_XEN_VCPU_ATTR_TYPE_VCPU_ID 0x6
|
||||
#define KVM_XEN_VCPU_ATTR_TYPE_TIMER 0x7
|
||||
#define KVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTOR 0x8
|
||||
|
||||
/* Secure Encrypted Virtualization command */
|
||||
enum sev_cmd_id {
|
||||
@@ -1971,6 +2038,8 @@ struct kvm_dirty_gfn {
|
||||
#define KVM_BUS_LOCK_DETECTION_OFF (1 << 0)
|
||||
#define KVM_BUS_LOCK_DETECTION_EXIT (1 << 1)
|
||||
|
||||
#define KVM_PMU_CAP_DISABLE (1 << 0)
|
||||
|
||||
/**
|
||||
* struct kvm_stats_header - Header of per vm/vcpu binary statistics data.
|
||||
* @flags: Some extra information for header, always 0 for now.
|
||||
|
||||
@@ -21,8 +21,14 @@ struct landlock_ruleset_attr {
|
||||
/**
|
||||
* @handled_access_fs: Bitmask of actions (cf. `Filesystem flags`_)
|
||||
* that is handled by this ruleset and should then be forbidden if no
|
||||
* rule explicitly allow them. This is needed for backward
|
||||
* compatibility reasons.
|
||||
* rule explicitly allow them: it is a deny-by-default list that should
|
||||
* contain as much Landlock access rights as possible. Indeed, all
|
||||
* Landlock filesystem access rights that are not part of
|
||||
* handled_access_fs are allowed. This is needed for backward
|
||||
* compatibility reasons. One exception is the
|
||||
* LANDLOCK_ACCESS_FS_REFER access right, which is always implicitly
|
||||
* handled, but must still be explicitly handled to add new rules with
|
||||
* this access right.
|
||||
*/
|
||||
__u64 handled_access_fs;
|
||||
};
|
||||
@@ -33,7 +39,9 @@ struct landlock_ruleset_attr {
|
||||
* - %LANDLOCK_CREATE_RULESET_VERSION: Get the highest supported Landlock ABI
|
||||
* version.
|
||||
*/
|
||||
/* clang-format off */
|
||||
#define LANDLOCK_CREATE_RULESET_VERSION (1U << 0)
|
||||
/* clang-format on */
|
||||
|
||||
/**
|
||||
* enum landlock_rule_type - Landlock rule type
|
||||
@@ -60,8 +68,9 @@ struct landlock_path_beneath_attr {
|
||||
*/
|
||||
__u64 allowed_access;
|
||||
/**
|
||||
* @parent_fd: File descriptor, open with ``O_PATH``, which identifies
|
||||
* the parent directory of a file hierarchy, or just a file.
|
||||
* @parent_fd: File descriptor, preferably opened with ``O_PATH``,
|
||||
* which identifies the parent directory of a file hierarchy, or just a
|
||||
* file.
|
||||
*/
|
||||
__s32 parent_fd;
|
||||
/*
|
||||
@@ -109,6 +118,22 @@ struct landlock_path_beneath_attr {
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_FIFO: Create (or rename or link) a named pipe.
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_BLOCK: Create (or rename or link) a block device.
|
||||
* - %LANDLOCK_ACCESS_FS_MAKE_SYM: Create (or rename or link) a symbolic link.
|
||||
* - %LANDLOCK_ACCESS_FS_REFER: Link or rename a file from or to a different
|
||||
* directory (i.e. reparent a file hierarchy). This access right is
|
||||
* available since the second version of the Landlock ABI. This is also the
|
||||
* only access right which is always considered handled by any ruleset in
|
||||
* such a way that reparenting a file hierarchy is always denied by default.
|
||||
* To avoid privilege escalation, it is not enough to add a rule with this
|
||||
* access right. When linking or renaming a file, the destination directory
|
||||
* hierarchy must also always have the same or a superset of restrictions of
|
||||
* the source hierarchy. If it is not the case, or if the domain doesn't
|
||||
* handle this access right, such actions are denied by default with errno
|
||||
* set to EXDEV. Linking also requires a LANDLOCK_ACCESS_FS_MAKE_* access
|
||||
* right on the destination directory, and renaming also requires a
|
||||
* LANDLOCK_ACCESS_FS_REMOVE_* access right on the source's (file or
|
||||
* directory) parent. Otherwise, such actions are denied with errno set to
|
||||
* EACCES. The EACCES errno prevails over EXDEV to let user space
|
||||
* efficiently deal with an unrecoverable error.
|
||||
*
|
||||
* .. warning::
|
||||
*
|
||||
@@ -120,6 +145,7 @@ struct landlock_path_beneath_attr {
|
||||
* :manpage:`access(2)`.
|
||||
* Future Landlock evolutions will enable to restrict them.
|
||||
*/
|
||||
/* clang-format off */
|
||||
#define LANDLOCK_ACCESS_FS_EXECUTE (1ULL << 0)
|
||||
#define LANDLOCK_ACCESS_FS_WRITE_FILE (1ULL << 1)
|
||||
#define LANDLOCK_ACCESS_FS_READ_FILE (1ULL << 2)
|
||||
@@ -133,5 +159,7 @@ struct landlock_path_beneath_attr {
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_FIFO (1ULL << 10)
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_BLOCK (1ULL << 11)
|
||||
#define LANDLOCK_ACCESS_FS_MAKE_SYM (1ULL << 12)
|
||||
#define LANDLOCK_ACCESS_FS_REFER (1ULL << 13)
|
||||
/* clang-format on */
|
||||
|
||||
#endif /* _UAPI_LINUX_LANDLOCK_H */
|
||||
|
||||
@@ -16,14 +16,16 @@
|
||||
#define LIRC_MODE2_PULSE 0x01000000
|
||||
#define LIRC_MODE2_FREQUENCY 0x02000000
|
||||
#define LIRC_MODE2_TIMEOUT 0x03000000
|
||||
#define LIRC_MODE2_OVERFLOW 0x04000000
|
||||
|
||||
#define LIRC_VALUE_MASK 0x00FFFFFF
|
||||
#define LIRC_MODE2_MASK 0xFF000000
|
||||
|
||||
#define LIRC_SPACE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_SPACE)
|
||||
#define LIRC_PULSE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_PULSE)
|
||||
#define LIRC_FREQUENCY(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_FREQUENCY)
|
||||
#define LIRC_TIMEOUT(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_TIMEOUT)
|
||||
#define LIRC_SPACE(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_SPACE)
|
||||
#define LIRC_PULSE(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_PULSE)
|
||||
#define LIRC_FREQUENCY(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_FREQUENCY)
|
||||
#define LIRC_TIMEOUT(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_TIMEOUT)
|
||||
#define LIRC_OVERFLOW(val) (((val) & LIRC_VALUE_MASK) | LIRC_MODE2_OVERFLOW)
|
||||
|
||||
#define LIRC_VALUE(val) ((val)&LIRC_VALUE_MASK)
|
||||
#define LIRC_MODE2(val) ((val)&LIRC_MODE2_MASK)
|
||||
@@ -32,6 +34,7 @@
|
||||
#define LIRC_IS_PULSE(val) (LIRC_MODE2(val) == LIRC_MODE2_PULSE)
|
||||
#define LIRC_IS_FREQUENCY(val) (LIRC_MODE2(val) == LIRC_MODE2_FREQUENCY)
|
||||
#define LIRC_IS_TIMEOUT(val) (LIRC_MODE2(val) == LIRC_MODE2_TIMEOUT)
|
||||
#define LIRC_IS_OVERFLOW(val) (LIRC_MODE2(val) == LIRC_MODE2_OVERFLOW)
|
||||
|
||||
/* used heavily by lirc userspace */
|
||||
#define lirc_t int
|
||||
@@ -70,13 +73,10 @@
|
||||
#define LIRC_CAN_REC_MASK LIRC_MODE2REC(LIRC_CAN_SEND_MASK)
|
||||
|
||||
#define LIRC_CAN_SET_REC_CARRIER (LIRC_CAN_SET_SEND_CARRIER << 16)
|
||||
#define LIRC_CAN_SET_REC_DUTY_CYCLE (LIRC_CAN_SET_SEND_DUTY_CYCLE << 16)
|
||||
|
||||
#define LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE 0x40000000
|
||||
#define LIRC_CAN_SET_REC_CARRIER_RANGE 0x80000000
|
||||
#define LIRC_CAN_GET_REC_RESOLUTION 0x20000000
|
||||
#define LIRC_CAN_SET_REC_TIMEOUT 0x10000000
|
||||
#define LIRC_CAN_SET_REC_FILTER 0x08000000
|
||||
|
||||
#define LIRC_CAN_MEASURE_CARRIER 0x02000000
|
||||
#define LIRC_CAN_USE_WIDEBAND_RECEIVER 0x04000000
|
||||
@@ -84,7 +84,12 @@
|
||||
#define LIRC_CAN_SEND(x) ((x)&LIRC_CAN_SEND_MASK)
|
||||
#define LIRC_CAN_REC(x) ((x)&LIRC_CAN_REC_MASK)
|
||||
|
||||
#define LIRC_CAN_NOTIFY_DECODE 0x01000000
|
||||
/*
|
||||
* Unused features. These features were never implemented, in tree or
|
||||
* out of tree. These definitions are here so not to break the lircd build.
|
||||
*/
|
||||
#define LIRC_CAN_SET_REC_FILTER 0
|
||||
#define LIRC_CAN_NOTIFY_DECODE 0
|
||||
|
||||
/*** IOCTL commands for lirc driver ***/
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
|
||||
/*
|
||||
* include/linux/loop.h
|
||||
*
|
||||
* Written by Theodore Ts'o, 3/29/93.
|
||||
*
|
||||
* Copyright 1993 by Theodore Ts'o. Redistribution of this file is
|
||||
* permitted under the GNU General Public License.
|
||||
* Copyright 1993 by Theodore Ts'o.
|
||||
*/
|
||||
#ifndef _UAPI_LINUX_LOOP_H
|
||||
#define _UAPI_LINUX_LOOP_H
|
||||
@@ -45,7 +40,7 @@ struct loop_info {
|
||||
unsigned long lo_inode; /* ioctl r/o */
|
||||
__kernel_old_dev_t lo_rdevice; /* ioctl r/o */
|
||||
int lo_offset;
|
||||
int lo_encrypt_type;
|
||||
int lo_encrypt_type; /* obsolete, ignored */
|
||||
int lo_encrypt_key_size; /* ioctl w/o */
|
||||
int lo_flags;
|
||||
char lo_name[LO_NAME_SIZE];
|
||||
@@ -61,7 +56,7 @@ struct loop_info64 {
|
||||
__u64 lo_offset;
|
||||
__u64 lo_sizelimit;/* bytes, 0 == max available */
|
||||
__u32 lo_number; /* ioctl r/o */
|
||||
__u32 lo_encrypt_type;
|
||||
__u32 lo_encrypt_type; /* obsolete, ignored */
|
||||
__u32 lo_encrypt_key_size; /* ioctl w/o */
|
||||
__u32 lo_flags;
|
||||
__u8 lo_file_name[LO_NAME_SIZE];
|
||||
|
||||
@@ -44,7 +44,25 @@ struct sockaddr_mctp_ext {
|
||||
|
||||
#define MCTP_TAG_MASK 0x07
|
||||
#define MCTP_TAG_OWNER 0x08
|
||||
#define MCTP_TAG_PREALLOC 0x10
|
||||
|
||||
#define MCTP_OPT_ADDR_EXT 1
|
||||
|
||||
#define SIOCMCTPALLOCTAG (SIOCPROTOPRIVATE + 0)
|
||||
#define SIOCMCTPDROPTAG (SIOCPROTOPRIVATE + 1)
|
||||
|
||||
struct mctp_ioc_tag_ctl {
|
||||
mctp_eid_t peer_addr;
|
||||
|
||||
/* For SIOCMCTPALLOCTAG: must be passed as zero, kernel will
|
||||
* populate with the allocated tag value. Returned tag value will
|
||||
* always have TO and PREALLOC set.
|
||||
*
|
||||
* For SIOCMCTPDROPTAG: userspace provides tag value to drop, from
|
||||
* a prior SIOCMCTPALLOCTAG call (and so must have TO and PREALLOC set).
|
||||
*/
|
||||
__u8 tag;
|
||||
__u16 flags;
|
||||
};
|
||||
|
||||
#endif /* __UAPI_MCTP_H */
|
||||
|
||||
@@ -67,6 +67,19 @@
|
||||
#define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */
|
||||
#define MDIO_AN_10GBT_CTRL 32 /* 10GBASE-T auto-negotiation control */
|
||||
#define MDIO_AN_10GBT_STAT 33 /* 10GBASE-T auto-negotiation status */
|
||||
#define MDIO_B10L_PMA_CTRL 2294 /* 10BASE-T1L PMA control */
|
||||
#define MDIO_PMA_10T1L_STAT 2295 /* 10BASE-T1L PMA status */
|
||||
#define MDIO_PCS_10T1L_CTRL 2278 /* 10BASE-T1L PCS control */
|
||||
#define MDIO_PMA_PMD_BT1 18 /* BASE-T1 PMA/PMD extended ability */
|
||||
#define MDIO_AN_T1_CTRL 512 /* BASE-T1 AN control */
|
||||
#define MDIO_AN_T1_STAT 513 /* BASE-T1 AN status */
|
||||
#define MDIO_AN_T1_ADV_L 514 /* BASE-T1 AN advertisement register [15:0] */
|
||||
#define MDIO_AN_T1_ADV_M 515 /* BASE-T1 AN advertisement register [31:16] */
|
||||
#define MDIO_AN_T1_ADV_H 516 /* BASE-T1 AN advertisement register [47:32] */
|
||||
#define MDIO_AN_T1_LP_L 517 /* BASE-T1 AN LP Base Page ability register [15:0] */
|
||||
#define MDIO_AN_T1_LP_M 518 /* BASE-T1 AN LP Base Page ability register [31:16] */
|
||||
#define MDIO_AN_T1_LP_H 519 /* BASE-T1 AN LP Base Page ability register [47:32] */
|
||||
#define MDIO_PMA_PMD_BT1_CTRL 2100 /* BASE-T1 PMA/PMD control register */
|
||||
|
||||
/* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */
|
||||
#define MDIO_PMA_LASI_RXCTRL 0x9000 /* RX_ALARM control */
|
||||
@@ -159,6 +172,7 @@
|
||||
#define MDIO_PMA_CTRL2_10BT 0x000f /* 10BASE-T type */
|
||||
#define MDIO_PMA_CTRL2_2_5GBT 0x0030 /* 2.5GBaseT type */
|
||||
#define MDIO_PMA_CTRL2_5GBT 0x0031 /* 5GBaseT type */
|
||||
#define MDIO_PMA_CTRL2_BASET1 0x003D /* BASE-T1 type */
|
||||
#define MDIO_PCS_CTRL2_TYPE 0x0003 /* PCS type selection */
|
||||
#define MDIO_PCS_CTRL2_10GBR 0x0000 /* 10GBASE-R type */
|
||||
#define MDIO_PCS_CTRL2_10GBX 0x0001 /* 10GBASE-X type */
|
||||
@@ -212,6 +226,7 @@
|
||||
#define MDIO_PMA_EXTABLE_1000BKX 0x0040 /* 1000BASE-KX ability */
|
||||
#define MDIO_PMA_EXTABLE_100BTX 0x0080 /* 100BASE-TX ability */
|
||||
#define MDIO_PMA_EXTABLE_10BT 0x0100 /* 10BASE-T ability */
|
||||
#define MDIO_PMA_EXTABLE_BT1 0x0800 /* BASE-T1 ability */
|
||||
#define MDIO_PMA_EXTABLE_NBT 0x4000 /* 2.5/5GBASE-T ability */
|
||||
|
||||
/* PHY XGXS lane state register. */
|
||||
@@ -268,6 +283,66 @@
|
||||
#define MDIO_AN_10GBT_STAT_MS 0x4000 /* Master/slave config */
|
||||
#define MDIO_AN_10GBT_STAT_MSFLT 0x8000 /* Master/slave config fault */
|
||||
|
||||
/* 10BASE-T1L PMA control */
|
||||
#define MDIO_PMA_10T1L_CTRL_LB_EN 0x0001 /* Enable loopback mode */
|
||||
#define MDIO_PMA_10T1L_CTRL_EEE_EN 0x0400 /* Enable EEE mode */
|
||||
#define MDIO_PMA_10T1L_CTRL_LOW_POWER 0x0800 /* Low-power mode */
|
||||
#define MDIO_PMA_10T1L_CTRL_2V4_EN 0x1000 /* Enable 2.4 Vpp operating mode */
|
||||
#define MDIO_PMA_10T1L_CTRL_TX_DIS 0x4000 /* Transmit disable */
|
||||
#define MDIO_PMA_10T1L_CTRL_PMA_RST 0x8000 /* MA reset */
|
||||
|
||||
/* 10BASE-T1L PMA status register. */
|
||||
#define MDIO_PMA_10T1L_STAT_LINK 0x0001 /* PMA receive link up */
|
||||
#define MDIO_PMA_10T1L_STAT_FAULT 0x0002 /* Fault condition detected */
|
||||
#define MDIO_PMA_10T1L_STAT_POLARITY 0x0004 /* Receive polarity is reversed */
|
||||
#define MDIO_PMA_10T1L_STAT_RECV_FAULT 0x0200 /* Able to detect fault on receive path */
|
||||
#define MDIO_PMA_10T1L_STAT_EEE 0x0400 /* PHY has EEE ability */
|
||||
#define MDIO_PMA_10T1L_STAT_LOW_POWER 0x0800 /* PMA has low-power ability */
|
||||
#define MDIO_PMA_10T1L_STAT_2V4_ABLE 0x1000 /* PHY has 2.4 Vpp operating mode ability */
|
||||
#define MDIO_PMA_10T1L_STAT_LB_ABLE 0x2000 /* PHY has loopback ability */
|
||||
|
||||
/* 10BASE-T1L PCS control register. */
|
||||
#define MDIO_PCS_10T1L_CTRL_LB 0x4000 /* Enable PCS level loopback mode */
|
||||
#define MDIO_PCS_10T1L_CTRL_RESET 0x8000 /* PCS reset */
|
||||
|
||||
/* BASE-T1 PMA/PMD extended ability register. */
|
||||
#define MDIO_PMA_PMD_BT1_B10L_ABLE 0x0004 /* 10BASE-T1L Ability */
|
||||
|
||||
/* BASE-T1 auto-negotiation advertisement register [15:0] */
|
||||
#define MDIO_AN_T1_ADV_L_PAUSE_CAP ADVERTISE_PAUSE_CAP
|
||||
#define MDIO_AN_T1_ADV_L_PAUSE_ASYM ADVERTISE_PAUSE_ASYM
|
||||
#define MDIO_AN_T1_ADV_L_FORCE_MS 0x1000 /* Force Master/slave Configuration */
|
||||
#define MDIO_AN_T1_ADV_L_REMOTE_FAULT ADVERTISE_RFAULT
|
||||
#define MDIO_AN_T1_ADV_L_ACK ADVERTISE_LPACK
|
||||
#define MDIO_AN_T1_ADV_L_NEXT_PAGE_REQ ADVERTISE_NPAGE
|
||||
|
||||
/* BASE-T1 auto-negotiation advertisement register [31:16] */
|
||||
#define MDIO_AN_T1_ADV_M_B10L 0x4000 /* device is compatible with 10BASE-T1L */
|
||||
#define MDIO_AN_T1_ADV_M_MST 0x0010 /* advertise master preference */
|
||||
|
||||
/* BASE-T1 auto-negotiation advertisement register [47:32] */
|
||||
#define MDIO_AN_T1_ADV_H_10L_TX_HI_REQ 0x1000 /* 10BASE-T1L High Level Transmit Request */
|
||||
#define MDIO_AN_T1_ADV_H_10L_TX_HI 0x2000 /* 10BASE-T1L High Level Transmit Ability */
|
||||
|
||||
/* BASE-T1 AN LP Base Page ability register [15:0] */
|
||||
#define MDIO_AN_T1_LP_L_PAUSE_CAP LPA_PAUSE_CAP
|
||||
#define MDIO_AN_T1_LP_L_PAUSE_ASYM LPA_PAUSE_ASYM
|
||||
#define MDIO_AN_T1_LP_L_FORCE_MS 0x1000 /* LP Force Master/slave Configuration */
|
||||
#define MDIO_AN_T1_LP_L_REMOTE_FAULT LPA_RFAULT
|
||||
#define MDIO_AN_T1_LP_L_ACK LPA_LPACK
|
||||
#define MDIO_AN_T1_LP_L_NEXT_PAGE_REQ LPA_NPAGE
|
||||
|
||||
/* BASE-T1 AN LP Base Page ability register [31:16] */
|
||||
#define MDIO_AN_T1_LP_M_MST 0x0010 /* LP master preference */
|
||||
#define MDIO_AN_T1_LP_M_B10L 0x4000 /* LP is compatible with 10BASE-T1L */
|
||||
|
||||
/* BASE-T1 AN LP Base Page ability register [47:32] */
|
||||
#define MDIO_AN_T1_LP_H_10L_TX_HI_REQ 0x1000 /* 10BASE-T1L High Level LP Transmit Request */
|
||||
#define MDIO_AN_T1_LP_H_10L_TX_HI 0x2000 /* 10BASE-T1L High Level LP Transmit Ability */
|
||||
|
||||
/* BASE-T1 PMA/PMD control register */
|
||||
#define MDIO_PMA_PMD_BT1_CTRL_CFG_MST 0x4000 /* MASTER-SLAVE config value */
|
||||
|
||||
/* EEE Supported/Advertisement/LP Advertisement registers.
|
||||
*
|
||||
* EEE capability Register (3.20), Advertisement (7.60) and
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
#ifndef __LINUX_MEDIA_H
|
||||
#define __LINUX_MEDIA_H
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -226,6 +223,7 @@ struct media_pad_desc {
|
||||
#define MEDIA_LNK_FL_LINK_TYPE (0xf << 28)
|
||||
# define MEDIA_LNK_FL_DATA_LINK (0 << 28)
|
||||
# define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28)
|
||||
# define MEDIA_LNK_FL_ANCILLARY_LINK (2 << 28)
|
||||
|
||||
struct media_link_desc {
|
||||
struct media_pad_desc source;
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
#ifndef _UAPI_MPTCP_H
|
||||
#define _UAPI_MPTCP_H
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <netinet/in.h> /* for sockaddr_in and sockaddr_in6 */
|
||||
#include <sys/socket.h> /* for struct sockaddr */
|
||||
#endif
|
||||
|
||||
#include <linux/const.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/in.h> /* for sockaddr_in */
|
||||
#include <linux/in6.h> /* for sockaddr_in6 */
|
||||
#include <linux/socket.h> /* for sockaddr_storage and sa_family */
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <sys/socket.h> /* for struct sockaddr */
|
||||
#endif
|
||||
|
||||
#define MPTCP_SUBFLOW_FLAG_MCAP_REM _BITUL(0)
|
||||
#define MPTCP_SUBFLOW_FLAG_MCAP_LOC _BITUL(1)
|
||||
#define MPTCP_SUBFLOW_FLAG_JOIN_REM _BITUL(2)
|
||||
@@ -55,6 +56,9 @@ enum {
|
||||
MPTCP_PM_ATTR_ADDR, /* nested address */
|
||||
MPTCP_PM_ATTR_RCV_ADD_ADDRS, /* u32 */
|
||||
MPTCP_PM_ATTR_SUBFLOWS, /* u32 */
|
||||
MPTCP_PM_ATTR_TOKEN, /* u32 */
|
||||
MPTCP_PM_ATTR_LOC_ID, /* u8 */
|
||||
MPTCP_PM_ATTR_ADDR_REMOTE, /* nested address */
|
||||
|
||||
__MPTCP_PM_ATTR_MAX
|
||||
};
|
||||
@@ -81,6 +85,7 @@ enum {
|
||||
#define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1)
|
||||
#define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2)
|
||||
#define MPTCP_PM_ADDR_FLAG_FULLMESH (1 << 3)
|
||||
#define MPTCP_PM_ADDR_FLAG_IMPLICIT (1 << 4)
|
||||
|
||||
enum {
|
||||
MPTCP_PM_CMD_UNSPEC,
|
||||
@@ -92,6 +97,10 @@ enum {
|
||||
MPTCP_PM_CMD_SET_LIMITS,
|
||||
MPTCP_PM_CMD_GET_LIMITS,
|
||||
MPTCP_PM_CMD_SET_FLAGS,
|
||||
MPTCP_PM_CMD_ANNOUNCE,
|
||||
MPTCP_PM_CMD_REMOVE,
|
||||
MPTCP_PM_CMD_SUBFLOW_CREATE,
|
||||
MPTCP_PM_CMD_SUBFLOW_DESTROY,
|
||||
|
||||
__MPTCP_PM_CMD_AFTER_LAST
|
||||
};
|
||||
@@ -187,6 +196,7 @@ enum mptcp_event_attr {
|
||||
MPTCP_ATTR_IF_IDX, /* s32 */
|
||||
MPTCP_ATTR_RESET_REASON,/* u32 */
|
||||
MPTCP_ATTR_RESET_FLAGS, /* u32 */
|
||||
MPTCP_ATTR_SERVER_SIDE, /* u8 */
|
||||
|
||||
__MPTCP_ATTR_AFTER_LAST
|
||||
};
|
||||
|
||||
@@ -134,6 +134,7 @@ struct mrt6msg {
|
||||
#define MRT6MSG_NOCACHE 1
|
||||
#define MRT6MSG_WRONGMIF 2
|
||||
#define MRT6MSG_WHOLEPKT 3 /* used for use level encap */
|
||||
#define MRT6MSG_WRMIFWHOLE 4 /* For PIM Register and assert processing */
|
||||
__u8 im6_mbz; /* must be zero */
|
||||
__u8 im6_msgtype; /* what type of message */
|
||||
__u16 im6_mif; /* mif rec'd on */
|
||||
|
||||
@@ -189,7 +189,6 @@ static inline const char *nvdimm_cmd_name(unsigned cmd)
|
||||
#define ND_DEVICE_REGION_BLK 3 /* nd_region: (parent of BLK namespaces) */
|
||||
#define ND_DEVICE_NAMESPACE_IO 4 /* legacy persistent memory */
|
||||
#define ND_DEVICE_NAMESPACE_PMEM 5 /* PMEM namespace (may alias with BLK) */
|
||||
#define ND_DEVICE_NAMESPACE_BLK 6 /* BLK namespace (may alias with PMEM) */
|
||||
#define ND_DEVICE_DAX_PMEM 7 /* Device DAX interface to pmem */
|
||||
|
||||
enum nd_driver_flags {
|
||||
@@ -198,7 +197,6 @@ enum nd_driver_flags {
|
||||
ND_DRIVER_REGION_BLK = 1 << ND_DEVICE_REGION_BLK,
|
||||
ND_DRIVER_NAMESPACE_IO = 1 << ND_DEVICE_NAMESPACE_IO,
|
||||
ND_DRIVER_NAMESPACE_PMEM = 1 << ND_DEVICE_NAMESPACE_PMEM,
|
||||
ND_DRIVER_NAMESPACE_BLK = 1 << ND_DEVICE_NAMESPACE_BLK,
|
||||
ND_DRIVER_DAX_PMEM = 1 << ND_DEVICE_DAX_PMEM,
|
||||
};
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ enum {
|
||||
NDA_NH_ID,
|
||||
NDA_FDB_EXT_ATTRS,
|
||||
NDA_FLAGS_EXT,
|
||||
NDA_NDM_STATE_MASK,
|
||||
NDA_NDM_FLAGS_MASK,
|
||||
__NDA_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ enum net_dm_attr {
|
||||
NET_DM_ATTR_SW_DROPS, /* flag */
|
||||
NET_DM_ATTR_HW_DROPS, /* flag */
|
||||
NET_DM_ATTR_FLOW_ACTION_COOKIE, /* binary */
|
||||
NET_DM_ATTR_REASON, /* string */
|
||||
|
||||
__NET_DM_ATTR_MAX,
|
||||
NET_DM_ATTR_MAX = __NET_DM_ATTR_MAX - 1
|
||||
|
||||
@@ -61,6 +61,7 @@ enum nfqnl_attr_type {
|
||||
NFQA_SECCTX, /* security context string */
|
||||
NFQA_VLAN, /* nested attribute: packet vlan info */
|
||||
NFQA_L2HDR, /* full L2 header */
|
||||
NFQA_PRIORITY, /* skb->priority */
|
||||
|
||||
__NFQA_MAX
|
||||
};
|
||||
|
||||
@@ -72,6 +72,7 @@ struct nlmsghdr {
|
||||
|
||||
/* Modifiers to DELETE request */
|
||||
#define NLM_F_NONREC 0x100 /* Do not delete recursively */
|
||||
#define NLM_F_BULK 0x200 /* Delete multiple objects */
|
||||
|
||||
/* Flags for ACK message */
|
||||
#define NLM_F_CAPPED 0x100 /* request was capped */
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
#define NFS4_OPEN_RESULT_CONFIRM 0x0002
|
||||
#define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
|
||||
#define NFS4_OPEN_RESULT_PRESERVE_UNLINKED 0x0008
|
||||
#define NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK 0x0020
|
||||
|
||||
#define NFS4_SHARE_ACCESS_MASK 0x000F
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#define NFSDBG_CALLBACK 0x0100
|
||||
#define NFSDBG_CLIENT 0x0200
|
||||
#define NFSDBG_MOUNT 0x0400
|
||||
#define NFSDBG_FSCACHE 0x0800
|
||||
#define NFSDBG_FSCACHE 0x0800 /* unused */
|
||||
#define NFSDBG_PNFS 0x1000
|
||||
#define NFSDBG_PNFS_LD 0x2000
|
||||
#define NFSDBG_STATE 0x4000
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
|
||||
* Copyright 2008 Colin McCabe <colin@cozybit.com>
|
||||
* Copyright 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -2659,6 +2659,10 @@ enum nl80211_commands {
|
||||
* enumerated in &enum nl80211_ap_settings_flags. This attribute shall be
|
||||
* used with %NL80211_CMD_START_AP request.
|
||||
*
|
||||
* @NL80211_ATTR_EHT_CAPABILITY: EHT Capability information element (from
|
||||
* association request when used with NL80211_CMD_NEW_STATION). Can be set
|
||||
* only if %NL80211_STA_FLAG_WME is set.
|
||||
*
|
||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
@@ -3169,6 +3173,10 @@ enum nl80211_attrs {
|
||||
|
||||
NL80211_ATTR_AP_SETTINGS_FLAGS,
|
||||
|
||||
NL80211_ATTR_EHT_CAPABILITY,
|
||||
|
||||
NL80211_ATTR_DISABLE_EHT,
|
||||
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
@@ -3224,6 +3232,8 @@ enum nl80211_attrs {
|
||||
#define NL80211_HE_MAX_CAPABILITY_LEN 54
|
||||
#define NL80211_MAX_NR_CIPHER_SUITES 5
|
||||
#define NL80211_MAX_NR_AKM_SUITES 2
|
||||
#define NL80211_EHT_MIN_CAPABILITY_LEN 13
|
||||
#define NL80211_EHT_MAX_CAPABILITY_LEN 51
|
||||
|
||||
#define NL80211_MIN_REMAIN_ON_CHANNEL_TIME 10
|
||||
|
||||
@@ -3251,7 +3261,7 @@ enum nl80211_attrs {
|
||||
* and therefore can't be created in the normal ways, use the
|
||||
* %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE
|
||||
* commands to create and destroy one
|
||||
* @NL80211_IF_TYPE_OCB: Outside Context of a BSS
|
||||
* @NL80211_IFTYPE_OCB: Outside Context of a BSS
|
||||
* This mode corresponds to the MIB variable dot11OCBActivated=true
|
||||
* @NL80211_IFTYPE_NAN: NAN device interface type (not a netdev)
|
||||
* @NL80211_IFTYPE_MAX: highest interface type number currently defined
|
||||
@@ -3392,6 +3402,56 @@ enum nl80211_he_ru_alloc {
|
||||
NL80211_RATE_INFO_HE_RU_ALLOC_2x996,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_eht_gi - EHT guard interval
|
||||
* @NL80211_RATE_INFO_EHT_GI_0_8: 0.8 usec
|
||||
* @NL80211_RATE_INFO_EHT_GI_1_6: 1.6 usec
|
||||
* @NL80211_RATE_INFO_EHT_GI_3_2: 3.2 usec
|
||||
*/
|
||||
enum nl80211_eht_gi {
|
||||
NL80211_RATE_INFO_EHT_GI_0_8,
|
||||
NL80211_RATE_INFO_EHT_GI_1_6,
|
||||
NL80211_RATE_INFO_EHT_GI_3_2,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_eht_ru_alloc - EHT RU allocation values
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_26: 26-tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_52: 52-tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_52P26: 52+26-tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_106: 106-tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_106P26: 106+26 tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_242: 242-tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_484: 484-tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_484P242: 484+242 tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_996: 996-tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_996P484: 996+484 tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_996P484P242: 996+484+242 tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_2x996: 2x996-tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_2x996P484: 2x996+484 tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_3x996: 3x996-tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_3x996P484: 3x996+484 tone RU allocation
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC_4x996: 4x996-tone RU allocation
|
||||
*/
|
||||
enum nl80211_eht_ru_alloc {
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_26,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_52,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_52P26,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_106,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_106P26,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_242,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_484,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_484P242,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_996,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_996P484,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_996P484P242,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_2x996,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_2x996P484,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_3x996,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_3x996P484,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC_4x996,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_rate_info - bitrate information
|
||||
*
|
||||
@@ -3431,6 +3491,13 @@ enum nl80211_he_ru_alloc {
|
||||
* @NL80211_RATE_INFO_HE_DCM: HE DCM value (u8, 0/1)
|
||||
* @NL80211_RATE_INFO_RU_ALLOC: HE RU allocation, if not present then
|
||||
* non-OFDMA was used (u8, see &enum nl80211_he_ru_alloc)
|
||||
* @NL80211_RATE_INFO_320_MHZ_WIDTH: 320 MHz bitrate
|
||||
* @NL80211_RATE_INFO_EHT_MCS: EHT MCS index (u8, 0-15)
|
||||
* @NL80211_RATE_INFO_EHT_NSS: EHT NSS value (u8, 1-8)
|
||||
* @NL80211_RATE_INFO_EHT_GI: EHT guard interval identifier
|
||||
* (u8, see &enum nl80211_eht_gi)
|
||||
* @NL80211_RATE_INFO_EHT_RU_ALLOC: EHT RU allocation, if not present then
|
||||
* non-OFDMA was used (u8, see &enum nl80211_eht_ru_alloc)
|
||||
* @__NL80211_RATE_INFO_AFTER_LAST: internal use
|
||||
*/
|
||||
enum nl80211_rate_info {
|
||||
@@ -3452,6 +3519,11 @@ enum nl80211_rate_info {
|
||||
NL80211_RATE_INFO_HE_GI,
|
||||
NL80211_RATE_INFO_HE_DCM,
|
||||
NL80211_RATE_INFO_HE_RU_ALLOC,
|
||||
NL80211_RATE_INFO_320_MHZ_WIDTH,
|
||||
NL80211_RATE_INFO_EHT_MCS,
|
||||
NL80211_RATE_INFO_EHT_NSS,
|
||||
NL80211_RATE_INFO_EHT_GI,
|
||||
NL80211_RATE_INFO_EHT_RU_ALLOC,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_RATE_INFO_AFTER_LAST,
|
||||
@@ -3766,6 +3838,14 @@ enum nl80211_mpath_info {
|
||||
* given for all 6 GHz band channels
|
||||
* @NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS: vendor element capabilities that are
|
||||
* advertised on this band/for this iftype (binary)
|
||||
* @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC: EHT MAC capabilities as in EHT
|
||||
* capabilities element
|
||||
* @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY: EHT PHY capabilities as in EHT
|
||||
* capabilities element
|
||||
* @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET: EHT supported NSS/MCS as in EHT
|
||||
* capabilities element
|
||||
* @NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE: EHT PPE thresholds information as
|
||||
* defined in EHT capabilities element
|
||||
* @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
|
||||
* @NL80211_BAND_IFTYPE_ATTR_MAX: highest band attribute currently defined
|
||||
*/
|
||||
@@ -3779,6 +3859,10 @@ enum nl80211_band_iftype_attr {
|
||||
NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
|
||||
NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA,
|
||||
NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS,
|
||||
NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC,
|
||||
NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY,
|
||||
NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET,
|
||||
NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
|
||||
@@ -3923,6 +4007,10 @@ enum nl80211_wmm_rule {
|
||||
* on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_16MHZ: 16 MHz operation is allowed
|
||||
* on this channel in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_NO_320MHZ: any 320 MHz channel using this channel
|
||||
* as the primary or any of the secondary channels isn't possible
|
||||
* @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel
|
||||
* in current regulatory domain.
|
||||
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
|
||||
* currently defined
|
||||
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
|
||||
@@ -3959,6 +4047,8 @@ enum nl80211_frequency_attr {
|
||||
NL80211_FREQUENCY_ATTR_4MHZ,
|
||||
NL80211_FREQUENCY_ATTR_8MHZ,
|
||||
NL80211_FREQUENCY_ATTR_16MHZ,
|
||||
NL80211_FREQUENCY_ATTR_NO_320MHZ,
|
||||
NL80211_FREQUENCY_ATTR_NO_EHT,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_FREQUENCY_ATTR_AFTER_LAST,
|
||||
@@ -4157,6 +4247,7 @@ enum nl80211_sched_scan_match_attr {
|
||||
* @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed
|
||||
* @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed
|
||||
* @NL80211_RRF_NO_HE: HE operation not allowed
|
||||
* @NL80211_RRF_NO_320MHZ: 320MHz operation not allowed
|
||||
*/
|
||||
enum nl80211_reg_rule_flags {
|
||||
NL80211_RRF_NO_OFDM = 1<<0,
|
||||
@@ -4175,6 +4266,7 @@ enum nl80211_reg_rule_flags {
|
||||
NL80211_RRF_NO_80MHZ = 1<<15,
|
||||
NL80211_RRF_NO_160MHZ = 1<<16,
|
||||
NL80211_RRF_NO_HE = 1<<17,
|
||||
NL80211_RRF_NO_320MHZ = 1<<18,
|
||||
};
|
||||
|
||||
#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
|
||||
@@ -4672,6 +4764,8 @@ enum nl80211_key_mode {
|
||||
* @NL80211_CHAN_WIDTH_4: 4 MHz OFDM channel
|
||||
* @NL80211_CHAN_WIDTH_8: 8 MHz OFDM channel
|
||||
* @NL80211_CHAN_WIDTH_16: 16 MHz OFDM channel
|
||||
* @NL80211_CHAN_WIDTH_320: 320 MHz channel, the %NL80211_ATTR_CENTER_FREQ1
|
||||
* attribute must be provided as well
|
||||
*/
|
||||
enum nl80211_chan_width {
|
||||
NL80211_CHAN_WIDTH_20_NOHT,
|
||||
@@ -4687,6 +4781,7 @@ enum nl80211_chan_width {
|
||||
NL80211_CHAN_WIDTH_4,
|
||||
NL80211_CHAN_WIDTH_8,
|
||||
NL80211_CHAN_WIDTH_16,
|
||||
NL80211_CHAN_WIDTH_320,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,7 +55,10 @@ struct nvme_passthru_cmd64 {
|
||||
__u64 metadata;
|
||||
__u64 addr;
|
||||
__u32 metadata_len;
|
||||
__u32 data_len;
|
||||
union {
|
||||
__u32 data_len; /* for non-vectored io */
|
||||
__u32 vec_cnt; /* for vectored io */
|
||||
};
|
||||
__u32 cdw10;
|
||||
__u32 cdw11;
|
||||
__u32 cdw12;
|
||||
@@ -67,6 +70,28 @@ struct nvme_passthru_cmd64 {
|
||||
__u64 result;
|
||||
};
|
||||
|
||||
/* same as struct nvme_passthru_cmd64, minus the 8b result field */
|
||||
struct nvme_uring_cmd {
|
||||
__u8 opcode;
|
||||
__u8 flags;
|
||||
__u16 rsvd1;
|
||||
__u32 nsid;
|
||||
__u32 cdw2;
|
||||
__u32 cdw3;
|
||||
__u64 metadata;
|
||||
__u64 addr;
|
||||
__u32 metadata_len;
|
||||
__u32 data_len;
|
||||
__u32 cdw10;
|
||||
__u32 cdw11;
|
||||
__u32 cdw12;
|
||||
__u32 cdw13;
|
||||
__u32 cdw14;
|
||||
__u32 cdw15;
|
||||
__u32 timeout_ms;
|
||||
__u32 rsvd2;
|
||||
};
|
||||
|
||||
#define nvme_admin_cmd nvme_passthru_cmd
|
||||
|
||||
#define NVME_IOCTL_ID _IO('N', 0x40)
|
||||
@@ -78,5 +103,12 @@ struct nvme_passthru_cmd64 {
|
||||
#define NVME_IOCTL_RESCAN _IO('N', 0x46)
|
||||
#define NVME_IOCTL_ADMIN64_CMD _IOWR('N', 0x47, struct nvme_passthru_cmd64)
|
||||
#define NVME_IOCTL_IO64_CMD _IOWR('N', 0x48, struct nvme_passthru_cmd64)
|
||||
#define NVME_IOCTL_IO64_CMD_VEC _IOWR('N', 0x49, struct nvme_passthru_cmd64)
|
||||
|
||||
/* io_uring async commands: */
|
||||
#define NVME_URING_CMD_IO _IOWR('N', 0x80, struct nvme_uring_cmd)
|
||||
#define NVME_URING_CMD_IO_VEC _IOWR('N', 0x81, struct nvme_uring_cmd)
|
||||
#define NVME_URING_CMD_ADMIN _IOWR('N', 0x82, struct nvme_uring_cmd)
|
||||
#define NVME_URING_CMD_ADMIN_VEC _IOWR('N', 0x83, struct nvme_uring_cmd)
|
||||
|
||||
#endif /* _UAPI_LINUX_NVME_IOCTL_H */
|
||||
|
||||
@@ -162,6 +162,7 @@ struct omap3isp_h3a_aewb_config {
|
||||
* struct omap3isp_stat_data - Statistic data sent to or received from user
|
||||
* @ts: Timestamp of returned framestats.
|
||||
* @buf: Pointer to pass to user.
|
||||
* @buf_size: Size of buffer.
|
||||
* @frame_number: Frame number of requested stats.
|
||||
* @cur_frame: Current frame number being processed.
|
||||
* @config_counter: Number of the configuration associated with the data.
|
||||
@@ -176,10 +177,12 @@ struct omap3isp_stat_data {
|
||||
struct timeval ts;
|
||||
#endif
|
||||
void __user *buf;
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
__u16 cur_frame;
|
||||
__u16 config_counter;
|
||||
__struct_group(/* no tag */, frame, /* no attrs */,
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
__u16 cur_frame;
|
||||
__u16 config_counter;
|
||||
);
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
@@ -189,10 +192,12 @@ struct omap3isp_stat_data_time32 {
|
||||
__s32 tv_usec;
|
||||
} ts;
|
||||
__u32 buf;
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
__u16 cur_frame;
|
||||
__u16 config_counter;
|
||||
__struct_group(/* no tag */, frame, /* no attrs */,
|
||||
__u32 buf_size;
|
||||
__u16 frame_number;
|
||||
__u16 cur_frame;
|
||||
__u16 config_counter;
|
||||
);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -352,9 +352,20 @@ enum ovs_key_attr {
|
||||
OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6, /* struct ovs_key_ct_tuple_ipv6 */
|
||||
OVS_KEY_ATTR_NSH, /* Nested set of ovs_nsh_key_* */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
OVS_KEY_ATTR_TUNNEL_INFO, /* struct ip_tunnel_info */
|
||||
#endif
|
||||
/* User space decided to squat on types 29 and 30. They are defined
|
||||
* below, but should not be sent to the kernel.
|
||||
*
|
||||
* WARNING: No new types should be added unless they are defined
|
||||
* for both kernel and user space (no 'ifdef's). It's hard
|
||||
* to keep compatibility otherwise.
|
||||
*/
|
||||
OVS_KEY_ATTR_PACKET_TYPE, /* be32 packet type */
|
||||
OVS_KEY_ATTR_ND_EXTENSIONS, /* IPv6 Neighbor Discovery extensions */
|
||||
|
||||
OVS_KEY_ATTR_TUNNEL_INFO, /* struct ip_tunnel_info.
|
||||
* For in-kernel use only.
|
||||
*/
|
||||
OVS_KEY_ATTR_IPV6_EXTHDRS, /* struct ovs_key_ipv6_exthdr */
|
||||
__OVS_KEY_ATTR_MAX
|
||||
};
|
||||
|
||||
@@ -430,6 +441,11 @@ struct ovs_key_ipv6 {
|
||||
__u8 ipv6_frag; /* One of OVS_FRAG_TYPE_*. */
|
||||
};
|
||||
|
||||
/* separate structure to support backward compatibility with older user space */
|
||||
struct ovs_key_ipv6_exthdrs {
|
||||
__u16 hdrs;
|
||||
};
|
||||
|
||||
struct ovs_key_tcp {
|
||||
__be16 tcp_src;
|
||||
__be16 tcp_dst;
|
||||
|
||||
@@ -616,6 +616,7 @@
|
||||
#define PCI_EXP_SLTCTL_PWR_OFF 0x0400 /* Power Off */
|
||||
#define PCI_EXP_SLTCTL_EIC 0x0800 /* Electromechanical Interlock Control */
|
||||
#define PCI_EXP_SLTCTL_DLLSCE 0x1000 /* Data Link Layer State Changed Enable */
|
||||
#define PCI_EXP_SLTCTL_ASPL_DISABLE 0x2000 /* Auto Slot Power Limit Disable */
|
||||
#define PCI_EXP_SLTCTL_IBPD_DISABLE 0x4000 /* In-band PD disable */
|
||||
#define PCI_EXP_SLTSTA 0x1a /* Slot Status */
|
||||
#define PCI_EXP_SLTSTA_ABP 0x0001 /* Attention Button Pressed */
|
||||
|
||||
@@ -251,6 +251,8 @@ enum {
|
||||
PERF_BR_SYSRET = 8, /* syscall return */
|
||||
PERF_BR_COND_CALL = 9, /* conditional function call */
|
||||
PERF_BR_COND_RET = 10, /* conditional function return */
|
||||
PERF_BR_ERET = 11, /* exception return */
|
||||
PERF_BR_IRQ = 12, /* irq */
|
||||
PERF_BR_MAX,
|
||||
};
|
||||
|
||||
|
||||
@@ -587,6 +587,8 @@ enum {
|
||||
TCA_FLOWER_KEY_HASH, /* u32 */
|
||||
TCA_FLOWER_KEY_HASH_MASK, /* u32 */
|
||||
|
||||
TCA_FLOWER_KEY_NUM_OF_VLANS, /* u8 */
|
||||
|
||||
__TCA_FLOWER_MAX,
|
||||
};
|
||||
|
||||
@@ -616,6 +618,10 @@ enum {
|
||||
* TCA_FLOWER_KEY_ENC_OPT_ERSPAN_
|
||||
* attributes
|
||||
*/
|
||||
TCA_FLOWER_KEY_ENC_OPTS_GTP, /* Nested
|
||||
* TCA_FLOWER_KEY_ENC_OPT_GTP_
|
||||
* attributes
|
||||
*/
|
||||
__TCA_FLOWER_KEY_ENC_OPTS_MAX,
|
||||
};
|
||||
|
||||
@@ -654,6 +660,17 @@ enum {
|
||||
#define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX \
|
||||
(__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1)
|
||||
|
||||
enum {
|
||||
TCA_FLOWER_KEY_ENC_OPT_GTP_UNSPEC,
|
||||
TCA_FLOWER_KEY_ENC_OPT_GTP_PDU_TYPE, /* u8 */
|
||||
TCA_FLOWER_KEY_ENC_OPT_GTP_QFI, /* u8 */
|
||||
|
||||
__TCA_FLOWER_KEY_ENC_OPT_GTP_MAX,
|
||||
};
|
||||
|
||||
#define TCA_FLOWER_KEY_ENC_OPT_GTP_MAX \
|
||||
(__TCA_FLOWER_KEY_ENC_OPT_GTP_MAX - 1)
|
||||
|
||||
enum {
|
||||
TCA_FLOWER_KEY_MPLS_OPTS_UNSPEC,
|
||||
TCA_FLOWER_KEY_MPLS_OPTS_LSE,
|
||||
|
||||
@@ -272,6 +272,15 @@ struct prctl_mm_map {
|
||||
# define PR_SCHED_CORE_SCOPE_THREAD_GROUP 1
|
||||
# define PR_SCHED_CORE_SCOPE_PROCESS_GROUP 2
|
||||
|
||||
/* arm64 Scalable Matrix Extension controls */
|
||||
/* Flag values must be in sync with SVE versions */
|
||||
#define PR_SME_SET_VL 63 /* set task vector length */
|
||||
# define PR_SME_SET_VL_ONEXEC (1 << 18) /* defer effect until exec */
|
||||
#define PR_SME_GET_VL 64 /* get task vector length */
|
||||
/* Bits common to PR_SME_SET_VL and PR_SME_GET_VL */
|
||||
# define PR_SME_VL_LEN_MASK 0xffff
|
||||
# define PR_SME_VL_INHERIT (1 << 17) /* inherit across exec */
|
||||
|
||||
#define PR_SET_VMA 0x53564d41
|
||||
# define PR_SET_VMA_ANON_NAME 0
|
||||
|
||||
|
||||
@@ -82,6 +82,10 @@
|
||||
#define PSCI_0_2_TOS_UP_NO_MIGRATE 1
|
||||
#define PSCI_0_2_TOS_MP 2
|
||||
|
||||
/* PSCI v1.1 reset type encoding for SYSTEM_RESET2 */
|
||||
#define PSCI_1_1_RESET_TYPE_SYSTEM_WARM_RESET 0
|
||||
#define PSCI_1_1_RESET_TYPE_VENDOR_START 0x80000000U
|
||||
|
||||
/* PSCI version decoding (independent of PSCI version) */
|
||||
#define PSCI_VERSION_MAJOR_SHIFT 16
|
||||
#define PSCI_VERSION_MINOR_MASK \
|
||||
|
||||
@@ -114,7 +114,7 @@ struct ptrace_rseq_configuration {
|
||||
|
||||
/*
|
||||
* These values are stored in task->ptrace_message
|
||||
* by tracehook_report_syscall_* to describe the current syscall-stop.
|
||||
* by ptrace_stop to describe the current syscall-stop.
|
||||
*/
|
||||
#define PTRACE_EVENTMSG_SYSCALL_ENTRY 1
|
||||
#define PTRACE_EVENTMSG_SYSCALL_EXIT 2
|
||||
|
||||
@@ -19,7 +19,7 @@ struct reiserfs_xattr_header {
|
||||
struct reiserfs_security_handle {
|
||||
const char *name;
|
||||
void *value;
|
||||
size_t length;
|
||||
__kernel_size_t length;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_REISERFS_XATTR_H */
|
||||
|
||||
@@ -159,8 +159,16 @@ struct rfkill_event_ext {
|
||||
* old behaviour for all userspace, unless it explicitly opts in to the
|
||||
* rules outlined here by using the new &struct rfkill_event_ext.
|
||||
*
|
||||
* Userspace using &struct rfkill_event_ext must adhere to the following
|
||||
* rules
|
||||
* Additionally, some other userspace (bluez, g-s-d) was reading with a
|
||||
* large size but as streaming reads rather than message-based, or with
|
||||
* too strict checks for the returned size. So eventually, we completely
|
||||
* reverted this, and extended messages need to be opted in to by using
|
||||
* an ioctl:
|
||||
*
|
||||
* ioctl(fd, RFKILL_IOCTL_MAX_SIZE, sizeof(struct rfkill_event_ext));
|
||||
*
|
||||
* Userspace using &struct rfkill_event_ext and the ioctl must adhere to
|
||||
* the following rules:
|
||||
*
|
||||
* 1. accept short writes, optionally using them to detect that it's
|
||||
* running on an older kernel;
|
||||
@@ -175,6 +183,8 @@ struct rfkill_event_ext {
|
||||
#define RFKILL_IOC_MAGIC 'R'
|
||||
#define RFKILL_IOC_NOINPUT 1
|
||||
#define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT)
|
||||
#define RFKILL_IOC_MAX_SIZE 2
|
||||
#define RFKILL_IOCTL_MAX_SIZE _IOW(RFKILL_IOC_MAGIC, RFKILL_IOC_MAX_SIZE, __u32)
|
||||
|
||||
/* and that's all userspace gets */
|
||||
|
||||
|
||||
@@ -33,4 +33,14 @@ struct rpmsg_endpoint_info {
|
||||
*/
|
||||
#define RPMSG_DESTROY_EPT_IOCTL _IO(0xb5, 0x2)
|
||||
|
||||
/**
|
||||
* Instantiate a new local rpmsg service device.
|
||||
*/
|
||||
#define RPMSG_CREATE_DEV_IOCTL _IOW(0xb5, 0x3, struct rpmsg_endpoint_info)
|
||||
|
||||
/**
|
||||
* Release a local rpmsg device.
|
||||
*/
|
||||
#define RPMSG_RELEASE_DEV_IOCTL _IOW(0xb5, 0x4, struct rpmsg_endpoint_info)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -105,23 +105,11 @@ struct rseq {
|
||||
* Read and set by the kernel. Set by user-space with single-copy
|
||||
* atomicity semantics. This field should only be updated by the
|
||||
* thread which registered this data structure. Aligned on 64-bit.
|
||||
*
|
||||
* 32-bit architectures should update the low order bits of the
|
||||
* rseq_cs field, leaving the high order bits initialized to 0.
|
||||
*/
|
||||
union {
|
||||
__u64 ptr64;
|
||||
#ifdef __LP64__
|
||||
__u64 ptr;
|
||||
#else
|
||||
struct {
|
||||
#if (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || defined(__BIG_ENDIAN)
|
||||
__u32 padding; /* Initialized to zero. */
|
||||
__u32 ptr32;
|
||||
#else /* LITTLE */
|
||||
__u32 ptr32;
|
||||
__u32 padding; /* Initialized to zero. */
|
||||
#endif /* ENDIAN */
|
||||
} ptr;
|
||||
#endif
|
||||
} rseq_cs;
|
||||
__u64 rseq_cs;
|
||||
|
||||
/*
|
||||
* Restartable sequences flags field.
|
||||
|
||||
@@ -133,7 +133,8 @@ struct rtc_param {
|
||||
#define RTC_FEATURE_UPDATE_INTERRUPT 4
|
||||
#define RTC_FEATURE_CORRECTION 5
|
||||
#define RTC_FEATURE_BACKUP_SWITCH_MODE 6
|
||||
#define RTC_FEATURE_CNT 7
|
||||
#define RTC_FEATURE_ALARM_WAKEUP_ONLY 7
|
||||
#define RTC_FEATURE_CNT 8
|
||||
|
||||
/* parameter list */
|
||||
#define RTC_PARAM_FEATURES 0
|
||||
|
||||
@@ -146,6 +146,8 @@ enum {
|
||||
#define RTM_NEWSTATS RTM_NEWSTATS
|
||||
RTM_GETSTATS = 94,
|
||||
#define RTM_GETSTATS RTM_GETSTATS
|
||||
RTM_SETSTATS,
|
||||
#define RTM_SETSTATS RTM_SETSTATS
|
||||
|
||||
RTM_NEWCACHEREPORT = 96,
|
||||
#define RTM_NEWCACHEREPORT RTM_NEWCACHEREPORT
|
||||
@@ -185,6 +187,13 @@ enum {
|
||||
RTM_GETNEXTHOPBUCKET,
|
||||
#define RTM_GETNEXTHOPBUCKET RTM_GETNEXTHOPBUCKET
|
||||
|
||||
RTM_NEWTUNNEL = 120,
|
||||
#define RTM_NEWTUNNEL RTM_NEWTUNNEL
|
||||
RTM_DELTUNNEL,
|
||||
#define RTM_DELTUNNEL RTM_DELTUNNEL
|
||||
RTM_GETTUNNEL,
|
||||
#define RTM_GETTUNNEL RTM_GETTUNNEL
|
||||
|
||||
__RTM_MAX,
|
||||
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
|
||||
};
|
||||
@@ -756,6 +765,10 @@ enum rtnetlink_groups {
|
||||
#define RTNLGRP_BRVLAN RTNLGRP_BRVLAN
|
||||
RTNLGRP_MCTP_IFADDR,
|
||||
#define RTNLGRP_MCTP_IFADDR RTNLGRP_MCTP_IFADDR
|
||||
RTNLGRP_TUNNEL,
|
||||
#define RTNLGRP_TUNNEL RTNLGRP_TUNNEL
|
||||
RTNLGRP_STATS,
|
||||
#define RTNLGRP_STATS RTNLGRP_STATS
|
||||
__RTNLGRP_MAX
|
||||
};
|
||||
#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
|
||||
@@ -804,6 +817,7 @@ enum {
|
||||
#define RTEXT_FILTER_MRP (1 << 4)
|
||||
#define RTEXT_FILTER_CFM_CONFIG (1 << 5)
|
||||
#define RTEXT_FILTER_CFM_STATUS (1 << 6)
|
||||
#define RTEXT_FILTER_MST (1 << 7)
|
||||
|
||||
/* End of information exported to user level */
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#define SECCOMP_FILTER_FLAG_SPEC_ALLOW (1UL << 2)
|
||||
#define SECCOMP_FILTER_FLAG_NEW_LISTENER (1UL << 3)
|
||||
#define SECCOMP_FILTER_FLAG_TSYNC_ESRCH (1UL << 4)
|
||||
/* Received notifications wait in killable state (only respond to fatal signals) */
|
||||
#define SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV (1UL << 5)
|
||||
|
||||
/*
|
||||
* All BPF programs must return a 32-bit value.
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
/* NVIDIA Tegra Combined UART */
|
||||
#define PORT_TEGRA_TCU 41
|
||||
|
||||
/* ASPEED AST2x00 virtual UART */
|
||||
#define PORT_ASPEED_VUART 42
|
||||
|
||||
/* Intel EG20 */
|
||||
#define PORT_PCH_8LINE 44
|
||||
#define PORT_PCH_2LINE 45
|
||||
@@ -274,4 +277,7 @@
|
||||
/* Freescale LINFlexD UART */
|
||||
#define PORT_LINFLEXUART 122
|
||||
|
||||
/* Sunplus UART */
|
||||
#define PORT_SUNPLUS 123
|
||||
|
||||
#endif /* _UAPILINUX_SERIAL_CORE_H */
|
||||
|
||||
80
include/uapi/linux/sev-guest.h
Normal file
80
include/uapi/linux/sev-guest.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* Userspace interface for AMD SEV and SNP guest driver.
|
||||
*
|
||||
* Copyright (C) 2021 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Author: Brijesh Singh <brijesh.singh@amd.com>
|
||||
*
|
||||
* SEV API specification is available at: https://developer.amd.com/sev/
|
||||
*/
|
||||
|
||||
#ifndef __UAPI_LINUX_SEV_GUEST_H_
|
||||
#define __UAPI_LINUX_SEV_GUEST_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct snp_report_req {
|
||||
/* user data that should be included in the report */
|
||||
__u8 user_data[64];
|
||||
|
||||
/* The vmpl level to be included in the report */
|
||||
__u32 vmpl;
|
||||
|
||||
/* Must be zero filled */
|
||||
__u8 rsvd[28];
|
||||
};
|
||||
|
||||
struct snp_report_resp {
|
||||
/* response data, see SEV-SNP spec for the format */
|
||||
__u8 data[4000];
|
||||
};
|
||||
|
||||
struct snp_derived_key_req {
|
||||
__u32 root_key_select;
|
||||
__u32 rsvd;
|
||||
__u64 guest_field_select;
|
||||
__u32 vmpl;
|
||||
__u32 guest_svn;
|
||||
__u64 tcb_version;
|
||||
};
|
||||
|
||||
struct snp_derived_key_resp {
|
||||
/* response data, see SEV-SNP spec for the format */
|
||||
__u8 data[64];
|
||||
};
|
||||
|
||||
struct snp_guest_request_ioctl {
|
||||
/* message version number (must be non-zero) */
|
||||
__u8 msg_version;
|
||||
|
||||
/* Request and response structure address */
|
||||
__u64 req_data;
|
||||
__u64 resp_data;
|
||||
|
||||
/* firmware error code on failure (see psp-sev.h) */
|
||||
__u64 fw_err;
|
||||
};
|
||||
|
||||
struct snp_ext_report_req {
|
||||
struct snp_report_req data;
|
||||
|
||||
/* where to copy the certificate blob */
|
||||
__u64 certs_address;
|
||||
|
||||
/* length of the certificate blob */
|
||||
__u32 certs_len;
|
||||
};
|
||||
|
||||
#define SNP_GUEST_REQ_IOC_TYPE 'S'
|
||||
|
||||
/* Get SNP attestation report */
|
||||
#define SNP_GET_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x0, struct snp_guest_request_ioctl)
|
||||
|
||||
/* Get a derived key from the root */
|
||||
#define SNP_GET_DERIVED_KEY _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x1, struct snp_guest_request_ioctl)
|
||||
|
||||
/* Get SNP extended report as defined in the GHCB specification version 2. */
|
||||
#define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl)
|
||||
|
||||
#endif /* __UAPI_LINUX_SEV_GUEST_H_ */
|
||||
@@ -59,6 +59,9 @@ enum {
|
||||
SMC_NETLINK_DUMP_SEID,
|
||||
SMC_NETLINK_ENABLE_SEID,
|
||||
SMC_NETLINK_DISABLE_SEID,
|
||||
SMC_NETLINK_DUMP_HS_LIMITATION,
|
||||
SMC_NETLINK_ENABLE_HS_LIMITATION,
|
||||
SMC_NETLINK_DISABLE_HS_LIMITATION,
|
||||
};
|
||||
|
||||
/* SMC_GENL_FAMILY top level attributes */
|
||||
@@ -284,4 +287,16 @@ enum {
|
||||
__SMC_NLA_SEID_TABLE_MAX,
|
||||
SMC_NLA_SEID_TABLE_MAX = __SMC_NLA_SEID_TABLE_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC_NETLINK_HS_LIMITATION attributes */
|
||||
enum {
|
||||
SMC_NLA_HS_LIMITATION_UNSPEC,
|
||||
SMC_NLA_HS_LIMITATION_ENABLED, /* u8 */
|
||||
__SMC_NLA_HS_LIMITATION_MAX,
|
||||
SMC_NLA_HS_LIMITATION_MAX = __SMC_NLA_HS_LIMITATION_MAX - 1
|
||||
};
|
||||
|
||||
/* SMC socket options */
|
||||
#define SMC_LIMIT_HS 1 /* constraint on smc handshake */
|
||||
|
||||
#endif /* _UAPI_LINUX_SMC_H */
|
||||
|
||||
@@ -31,4 +31,8 @@ struct __kernel_sockaddr_storage {
|
||||
|
||||
#define SOCK_BUF_LOCK_MASK (SOCK_SNDBUF_LOCK | SOCK_RCVBUF_LOCK)
|
||||
|
||||
#define SOCK_TXREHASH_DEFAULT 255
|
||||
#define SOCK_TXREHASH_DISABLED 0
|
||||
#define SOCK_TXREHASH_ENABLED 1
|
||||
|
||||
#endif /* _UAPI_LINUX_SOCKET_H */
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#define SPI_TX_OCTAL _BITUL(13) /* transmit with 8 wires */
|
||||
#define SPI_RX_OCTAL _BITUL(14) /* receive with 8 wires */
|
||||
#define SPI_3WIRE_HIZ _BITUL(15) /* high impedance turnaround */
|
||||
#define SPI_RX_CPHA_FLIP _BITUL(16) /* flip CPHA on Rx only xfer */
|
||||
|
||||
/*
|
||||
* All the bits defined above should be covered by SPI_MODE_USER_MASK.
|
||||
@@ -36,6 +37,6 @@
|
||||
* These bits must not overlap. A static assert check should make sure of that.
|
||||
* If adding extra bits, make sure to increase the bit index below as well.
|
||||
*/
|
||||
#define SPI_MODE_USER_MASK (_BITUL(16) - 1)
|
||||
#define SPI_MODE_USER_MASK (_BITUL(17) - 1)
|
||||
|
||||
#endif /* _UAPI_SPI_H */
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _UAPI_LINUX_STDDEF_H
|
||||
#define _UAPI_LINUX_STDDEF_H
|
||||
|
||||
#include <linux/compiler_types.h>
|
||||
|
||||
#ifndef __always_inline
|
||||
@@ -41,3 +44,4 @@
|
||||
struct { } __empty_ ## NAME; \
|
||||
TYPE NAME[]; \
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#define TASKSTATS_VERSION 11
|
||||
#define TASKSTATS_VERSION 13
|
||||
#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
|
||||
* in linux/sched.h */
|
||||
|
||||
@@ -48,7 +48,8 @@ struct taskstats {
|
||||
__u32 ac_exitcode; /* Exit status */
|
||||
|
||||
/* The accounting flags of a task as defined in <linux/acct.h>
|
||||
* Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG.
|
||||
* Defined values are AFORK, ASU, ACOMPAT, ACORE, AXSIG, and AGROUP.
|
||||
* (AGROUP since version 12).
|
||||
*/
|
||||
__u8 ac_flag; /* Record flags */
|
||||
__u8 ac_nice; /* task_nice */
|
||||
@@ -173,9 +174,30 @@ struct taskstats {
|
||||
/* v10: 64-bit btime to avoid overflow */
|
||||
__u64 ac_btime64; /* 64-bit begin time */
|
||||
|
||||
/* Delay waiting for memory compact */
|
||||
/* v11: Delay waiting for memory compact */
|
||||
__u64 compact_count;
|
||||
__u64 compact_delay_total;
|
||||
|
||||
/* v12 begin */
|
||||
__u32 ac_tgid; /* thread group ID */
|
||||
/* Thread group walltime up to now. This is total process walltime if
|
||||
* AGROUP flag is set.
|
||||
*/
|
||||
__u64 ac_tgetime __attribute__((aligned(8)));
|
||||
/* Lightweight information to identify process binary files.
|
||||
* This leaves userspace to match this to a file system path, using
|
||||
* MAJOR() and MINOR() macros to identify a device and mount point,
|
||||
* the inode to identify the executable file. This is /proc/self/exe
|
||||
* at the end, so matching the most recent exec(). Values are zero
|
||||
* for kernel threads.
|
||||
*/
|
||||
__u64 ac_exe_dev; /* program binary device ID */
|
||||
__u64 ac_exe_inode; /* program binary inode number */
|
||||
/* v12 end */
|
||||
|
||||
/* v13: Delay waiting for write-protect copy */
|
||||
__u64 wpcopy_count;
|
||||
__u64 wpcopy_delay_total;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#define SKBEDIT_F_PTYPE 0x8
|
||||
#define SKBEDIT_F_MASK 0x10
|
||||
#define SKBEDIT_F_INHERITDSFIELD 0x20
|
||||
#define SKBEDIT_F_TXQ_SKBHASH 0x40
|
||||
|
||||
struct tc_skbedit {
|
||||
tc_gen;
|
||||
@@ -45,6 +46,7 @@ enum {
|
||||
TCA_SKBEDIT_PTYPE,
|
||||
TCA_SKBEDIT_MASK,
|
||||
TCA_SKBEDIT_FLAGS,
|
||||
TCA_SKBEDIT_QUEUE_MAPPING_MAX,
|
||||
__TCA_SKBEDIT_MAX
|
||||
};
|
||||
#define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user