diff options
Diffstat (limited to 'arch/s390/include/uapi')
| -rw-r--r-- | arch/s390/include/uapi/asm/Kbuild | 1 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/hypfs.h | 25 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/kvm.h | 71 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/ptrace.h | 10 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/sie.h | 243 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/sigcontext.h | 1 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/socket.h | 4 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/statfs.h | 10 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/ucontext.h | 8 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/unistd.h | 5 | ||||
| -rw-r--r-- | arch/s390/include/uapi/asm/zcrypt.h | 65 | 
11 files changed, 433 insertions, 10 deletions
diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild index 6a9a9eb645f..736637363d3 100644 --- a/arch/s390/include/uapi/asm/Kbuild +++ b/arch/s390/include/uapi/asm/Kbuild @@ -36,6 +36,7 @@ header-y += signal.h  header-y += socket.h  header-y += sockios.h  header-y += sclp_ctl.h +header-y += sie.h  header-y += stat.h  header-y += statfs.h  header-y += swab.h diff --git a/arch/s390/include/uapi/asm/hypfs.h b/arch/s390/include/uapi/asm/hypfs.h new file mode 100644 index 00000000000..37998b44953 --- /dev/null +++ b/arch/s390/include/uapi/asm/hypfs.h @@ -0,0 +1,25 @@ +/* + * IOCTL interface for hypfs + * + * Copyright IBM Corp. 2013 + * + * Author: Martin Schwidefsky <schwidefsky@de.ibm.com> + */ + +#ifndef _ASM_HYPFS_CTL_H +#define _ASM_HYPFS_CTL_H + +#include <linux/types.h> + +struct hypfs_diag304 { +	__u32	args[2]; +	__u64	data; +	__u64	rc; +} __attribute__((packed)); + +#define HYPFS_IOCTL_MAGIC 0x10 + +#define HYPFS_DIAG304 \ +	_IOWR(HYPFS_IOCTL_MAGIC, 0x20, struct hypfs_diag304) + +#endif diff --git a/arch/s390/include/uapi/asm/kvm.h b/arch/s390/include/uapi/asm/kvm.h index d25da598ec6..0fc26430a1e 100644 --- a/arch/s390/include/uapi/asm/kvm.h +++ b/arch/s390/include/uapi/asm/kvm.h @@ -15,6 +15,52 @@  #include <linux/types.h>  #define __KVM_S390 +#define __KVM_HAVE_GUEST_DEBUG + +/* Device control API: s390-specific devices */ +#define KVM_DEV_FLIC_GET_ALL_IRQS	1 +#define KVM_DEV_FLIC_ENQUEUE		2 +#define KVM_DEV_FLIC_CLEAR_IRQS		3 +#define KVM_DEV_FLIC_APF_ENABLE		4 +#define KVM_DEV_FLIC_APF_DISABLE_WAIT	5 +#define KVM_DEV_FLIC_ADAPTER_REGISTER	6 +#define KVM_DEV_FLIC_ADAPTER_MODIFY	7 +/* + * We can have up to 4*64k pending subchannels + 8 adapter interrupts, + * as well as up  to ASYNC_PF_PER_VCPU*KVM_MAX_VCPUS pfault done interrupts. + * There are also sclp and machine checks. This gives us + * sizeof(kvm_s390_irq)*(4*65536+8+64*64+1+1) = 72 * 266250 = 19170000 + * Lets round up to 8192 pages. + */ +#define KVM_S390_MAX_FLOAT_IRQS	266250 +#define KVM_S390_FLIC_MAX_BUFFER	0x2000000 + +struct kvm_s390_io_adapter { +	__u32 id; +	__u8 isc; +	__u8 maskable; +	__u8 swap; +	__u8 pad; +}; + +#define KVM_S390_IO_ADAPTER_MASK 1 +#define KVM_S390_IO_ADAPTER_MAP 2 +#define KVM_S390_IO_ADAPTER_UNMAP 3 + +struct kvm_s390_io_adapter_req { +	__u32 id; +	__u8 type; +	__u8 mask; +	__u16 pad0; +	__u64 addr; +}; + +/* kvm attr_group  on vm fd */ +#define KVM_S390_VM_MEM_CTRL		0 + +/* kvm attributes for mem_ctrl */ +#define KVM_S390_VM_MEM_ENABLE_CMMA	0 +#define KVM_S390_VM_MEM_CLR_CMMA	1  /* for KVM_GET_REGS and KVM_SET_REGS */  struct kvm_regs { @@ -34,11 +80,31 @@ struct kvm_fpu {  	__u64 fprs[16];  }; +#define KVM_GUESTDBG_USE_HW_BP		0x00010000 + +#define KVM_HW_BP			1 +#define KVM_HW_WP_WRITE			2 +#define KVM_SINGLESTEP			4 +  struct kvm_debug_exit_arch { +	__u64 addr; +	__u8 type; +	__u8 pad[7]; /* Should be set to 0 */ +}; + +struct kvm_hw_breakpoint { +	__u64 addr; +	__u64 phys_addr; +	__u64 len; +	__u8 type; +	__u8 pad[7]; /* Should be set to 0 */  };  /* for KVM_SET_GUEST_DEBUG */  struct kvm_guest_debug_arch { +	__u32 nr_hw_bp; +	__u32 pad; /* Should be set to 0 */ +	struct kvm_hw_breakpoint __user *hw_bp;  };  #define KVM_SYNC_PREFIX (1UL << 0) @@ -57,4 +123,9 @@ struct kvm_sync_regs {  #define KVM_REG_S390_EPOCHDIFF	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x2)  #define KVM_REG_S390_CPU_TIMER  (KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x3)  #define KVM_REG_S390_CLOCK_COMP (KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x4) +#define KVM_REG_S390_PFTOKEN	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x5) +#define KVM_REG_S390_PFCOMPARE	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x6) +#define KVM_REG_S390_PFSELECT	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x7) +#define KVM_REG_S390_PP		(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x8) +#define KVM_REG_S390_GBEA	(KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x9)  #endif diff --git a/arch/s390/include/uapi/asm/ptrace.h b/arch/s390/include/uapi/asm/ptrace.h index 7a84619e315..a150f4fabe4 100644 --- a/arch/s390/include/uapi/asm/ptrace.h +++ b/arch/s390/include/uapi/asm/ptrace.h @@ -199,6 +199,7 @@ typedef union  typedef struct  {  	__u32   fpc; +	__u32	pad;  	freg_t  fprs[NUM_FPRS];                } s390_fp_regs; @@ -206,7 +207,6 @@ typedef struct  #define FPC_FLAGS_MASK          0x00F80000  #define FPC_DXC_MASK            0x0000FF00  #define FPC_RM_MASK             0x00000003 -#define FPC_VALID_MASK          0xF8F8FF03  /* this typedef defines how a Program Status Word looks like */  typedef struct  @@ -263,7 +263,7 @@ typedef struct  #define PSW_MASK_EA		0x0000000100000000UL  #define PSW_MASK_BA		0x0000000080000000UL -#define PSW_MASK_USER		0x0000FF8180000000UL +#define PSW_MASK_USER		0x0000FF0180000000UL  #define PSW_ADDR_AMODE		0x0000000000000000UL  #define PSW_ADDR_INSN		0xFFFFFFFFFFFFFFFFUL @@ -403,6 +403,12 @@ typedef struct  #define PTRACE_TE_ABORT_RAND	      0x5011  /* + * The numbers chosen here are somewhat arbitrary but absolutely MUST + * not overlap with any of the number assigned in <linux/ptrace.h>. + */ +#define PTRACE_SINGLEBLOCK	12	/* resume execution until next branch */ + +/*   * PT_PROT definition is loosely based on hppa bsd definition in   * gdb/hppab-nat.c   */ diff --git a/arch/s390/include/uapi/asm/sie.h b/arch/s390/include/uapi/asm/sie.h new file mode 100644 index 00000000000..5d9cc19462c --- /dev/null +++ b/arch/s390/include/uapi/asm/sie.h @@ -0,0 +1,243 @@ +#ifndef _UAPI_ASM_S390_SIE_H +#define _UAPI_ASM_S390_SIE_H + +#define diagnose_codes						\ +	{ 0x10, "DIAG (0x10) release pages" },			\ +	{ 0x44, "DIAG (0x44) time slice end" },			\ +	{ 0x9c, "DIAG (0x9c) time slice end directed" },	\ +	{ 0x204, "DIAG (0x204) logical-cpu utilization" },	\ +	{ 0x258, "DIAG (0x258) page-reference services" },	\ +	{ 0x308, "DIAG (0x308) ipl functions" },		\ +	{ 0x500, "DIAG (0x500) KVM virtio functions" },		\ +	{ 0x501, "DIAG (0x501) KVM breakpoint" } + +#define sigp_order_codes					\ +	{ 0x01, "SIGP sense" },					\ +	{ 0x02, "SIGP external call" },				\ +	{ 0x03, "SIGP emergency signal" },			\ +	{ 0x05, "SIGP stop" },					\ +	{ 0x06, "SIGP restart" },				\ +	{ 0x09, "SIGP stop and store status" },			\ +	{ 0x0b, "SIGP initial cpu reset" },			\ +	{ 0x0d, "SIGP set prefix" },				\ +	{ 0x0e, "SIGP store status at address" },		\ +	{ 0x12, "SIGP set architecture" },			\ +	{ 0x15, "SIGP sense running" } + +#define icpt_prog_codes						\ +	{ 0x0001, "Prog Operation" },				\ +	{ 0x0002, "Prog Privileged Operation" },		\ +	{ 0x0003, "Prog Execute" },				\ +	{ 0x0004, "Prog Protection" },				\ +	{ 0x0005, "Prog Addressing" },				\ +	{ 0x0006, "Prog Specification" },			\ +	{ 0x0007, "Prog Data" },				\ +	{ 0x0008, "Prog Fixedpoint overflow" },			\ +	{ 0x0009, "Prog Fixedpoint divide" },			\ +	{ 0x000A, "Prog Decimal overflow" },			\ +	{ 0x000B, "Prog Decimal divide" },			\ +	{ 0x000C, "Prog HFP exponent overflow" },		\ +	{ 0x000D, "Prog HFP exponent underflow" },		\ +	{ 0x000E, "Prog HFP significance" },			\ +	{ 0x000F, "Prog HFP divide" },				\ +	{ 0x0010, "Prog Segment translation" },			\ +	{ 0x0011, "Prog Page translation" },			\ +	{ 0x0012, "Prog Translation specification" },		\ +	{ 0x0013, "Prog Special operation" },			\ +	{ 0x0015, "Prog Operand" },				\ +	{ 0x0016, "Prog Trace table" },				\ +	{ 0x0017, "Prog ASNtranslation specification" },	\ +	{ 0x001C, "Prog Spaceswitch event" },			\ +	{ 0x001D, "Prog HFP square root" },			\ +	{ 0x001F, "Prog PCtranslation specification" },		\ +	{ 0x0020, "Prog AFX translation" },			\ +	{ 0x0021, "Prog ASX translation" },			\ +	{ 0x0022, "Prog LX translation" },			\ +	{ 0x0023, "Prog EX translation" },			\ +	{ 0x0024, "Prog Primary authority" },			\ +	{ 0x0025, "Prog Secondary authority" },			\ +	{ 0x0026, "Prog LFXtranslation exception" },		\ +	{ 0x0027, "Prog LSXtranslation exception" },		\ +	{ 0x0028, "Prog ALET specification" },			\ +	{ 0x0029, "Prog ALEN translation" },			\ +	{ 0x002A, "Prog ALE sequence" },			\ +	{ 0x002B, "Prog ASTE validity" },			\ +	{ 0x002C, "Prog ASTE sequence" },			\ +	{ 0x002D, "Prog Extended authority" },			\ +	{ 0x002E, "Prog LSTE sequence" },			\ +	{ 0x002F, "Prog ASTE instance" },			\ +	{ 0x0030, "Prog Stack full" },				\ +	{ 0x0031, "Prog Stack empty" },				\ +	{ 0x0032, "Prog Stack specification" },			\ +	{ 0x0033, "Prog Stack type" },				\ +	{ 0x0034, "Prog Stack operation" },			\ +	{ 0x0039, "Prog Region first translation" },		\ +	{ 0x003A, "Prog Region second translation" },		\ +	{ 0x003B, "Prog Region third translation" },		\ +	{ 0x0040, "Prog Monitor event" },			\ +	{ 0x0080, "Prog PER event" },				\ +	{ 0x0119, "Prog Crypto operation" } + +#define exit_code_ipa0(ipa0, opcode, mnemonic)		\ +	{ (ipa0 << 8 | opcode), #ipa0 " " mnemonic } +#define exit_code(opcode, mnemonic)			\ +	{ opcode, mnemonic } + +#define icpt_insn_codes				\ +	exit_code_ipa0(0x01, 0x01, "PR"),	\ +	exit_code_ipa0(0x01, 0x04, "PTFF"),	\ +	exit_code_ipa0(0x01, 0x07, "SCKPF"),	\ +	exit_code_ipa0(0xAA, 0x00, "RINEXT"),	\ +	exit_code_ipa0(0xAA, 0x01, "RION"),	\ +	exit_code_ipa0(0xAA, 0x02, "TRIC"),	\ +	exit_code_ipa0(0xAA, 0x03, "RIOFF"),	\ +	exit_code_ipa0(0xAA, 0x04, "RIEMIT"),	\ +	exit_code_ipa0(0xB2, 0x02, "STIDP"),	\ +	exit_code_ipa0(0xB2, 0x04, "SCK"),	\ +	exit_code_ipa0(0xB2, 0x05, "STCK"),	\ +	exit_code_ipa0(0xB2, 0x06, "SCKC"),	\ +	exit_code_ipa0(0xB2, 0x07, "STCKC"),	\ +	exit_code_ipa0(0xB2, 0x08, "SPT"),	\ +	exit_code_ipa0(0xB2, 0x09, "STPT"),	\ +	exit_code_ipa0(0xB2, 0x0d, "PTLB"),	\ +	exit_code_ipa0(0xB2, 0x10, "SPX"),	\ +	exit_code_ipa0(0xB2, 0x11, "STPX"),	\ +	exit_code_ipa0(0xB2, 0x12, "STAP"),	\ +	exit_code_ipa0(0xB2, 0x14, "SIE"),	\ +	exit_code_ipa0(0xB2, 0x16, "SETR"),	\ +	exit_code_ipa0(0xB2, 0x17, "STETR"),	\ +	exit_code_ipa0(0xB2, 0x18, "PC"),	\ +	exit_code_ipa0(0xB2, 0x20, "SERVC"),	\ +	exit_code_ipa0(0xB2, 0x28, "PT"),	\ +	exit_code_ipa0(0xB2, 0x29, "ISKE"),	\ +	exit_code_ipa0(0xB2, 0x2a, "RRBE"),	\ +	exit_code_ipa0(0xB2, 0x2b, "SSKE"),	\ +	exit_code_ipa0(0xB2, 0x2c, "TB"),	\ +	exit_code_ipa0(0xB2, 0x2e, "PGIN"),	\ +	exit_code_ipa0(0xB2, 0x2f, "PGOUT"),	\ +	exit_code_ipa0(0xB2, 0x30, "CSCH"),	\ +	exit_code_ipa0(0xB2, 0x31, "HSCH"),	\ +	exit_code_ipa0(0xB2, 0x32, "MSCH"),	\ +	exit_code_ipa0(0xB2, 0x33, "SSCH"),	\ +	exit_code_ipa0(0xB2, 0x34, "STSCH"),	\ +	exit_code_ipa0(0xB2, 0x35, "TSCH"),	\ +	exit_code_ipa0(0xB2, 0x36, "TPI"),	\ +	exit_code_ipa0(0xB2, 0x37, "SAL"),	\ +	exit_code_ipa0(0xB2, 0x38, "RSCH"),	\ +	exit_code_ipa0(0xB2, 0x39, "STCRW"),	\ +	exit_code_ipa0(0xB2, 0x3a, "STCPS"),	\ +	exit_code_ipa0(0xB2, 0x3b, "RCHP"),	\ +	exit_code_ipa0(0xB2, 0x3c, "SCHM"),	\ +	exit_code_ipa0(0xB2, 0x40, "BAKR"),	\ +	exit_code_ipa0(0xB2, 0x48, "PALB"),	\ +	exit_code_ipa0(0xB2, 0x4c, "TAR"),	\ +	exit_code_ipa0(0xB2, 0x50, "CSP"),	\ +	exit_code_ipa0(0xB2, 0x54, "MVPG"),	\ +	exit_code_ipa0(0xB2, 0x58, "BSG"),	\ +	exit_code_ipa0(0xB2, 0x5a, "BSA"),	\ +	exit_code_ipa0(0xB2, 0x5f, "CHSC"),	\ +	exit_code_ipa0(0xB2, 0x74, "SIGA"),	\ +	exit_code_ipa0(0xB2, 0x76, "XSCH"),	\ +	exit_code_ipa0(0xB2, 0x78, "STCKE"),	\ +	exit_code_ipa0(0xB2, 0x7c, "STCKF"),	\ +	exit_code_ipa0(0xB2, 0x7d, "STSI"),	\ +	exit_code_ipa0(0xB2, 0xb0, "STFLE"),	\ +	exit_code_ipa0(0xB2, 0xb1, "STFL"),	\ +	exit_code_ipa0(0xB2, 0xb2, "LPSWE"),	\ +	exit_code_ipa0(0xB2, 0xf8, "TEND"),	\ +	exit_code_ipa0(0xB2, 0xfc, "TABORT"),	\ +	exit_code_ipa0(0xB9, 0x1e, "KMAC"),	\ +	exit_code_ipa0(0xB9, 0x28, "PCKMO"),	\ +	exit_code_ipa0(0xB9, 0x2a, "KMF"),	\ +	exit_code_ipa0(0xB9, 0x2b, "KMO"),	\ +	exit_code_ipa0(0xB9, 0x2d, "KMCTR"),	\ +	exit_code_ipa0(0xB9, 0x2e, "KM"),	\ +	exit_code_ipa0(0xB9, 0x2f, "KMC"),	\ +	exit_code_ipa0(0xB9, 0x3e, "KIMD"),	\ +	exit_code_ipa0(0xB9, 0x3f, "KLMD"),	\ +	exit_code_ipa0(0xB9, 0x8a, "CSPG"),	\ +	exit_code_ipa0(0xB9, 0x8d, "EPSW"),	\ +	exit_code_ipa0(0xB9, 0x8e, "IDTE"),	\ +	exit_code_ipa0(0xB9, 0x8f, "CRDTE"),	\ +	exit_code_ipa0(0xB9, 0x9c, "EQBS"),	\ +	exit_code_ipa0(0xB9, 0xa2, "PTF"),	\ +	exit_code_ipa0(0xB9, 0xab, "ESSA"),	\ +	exit_code_ipa0(0xB9, 0xae, "RRBM"),	\ +	exit_code_ipa0(0xB9, 0xaf, "PFMF"),	\ +	exit_code_ipa0(0xE3, 0x03, "LRAG"),	\ +	exit_code_ipa0(0xE3, 0x13, "LRAY"),	\ +	exit_code_ipa0(0xE3, 0x25, "NTSTG"),	\ +	exit_code_ipa0(0xE5, 0x00, "LASP"),	\ +	exit_code_ipa0(0xE5, 0x01, "TPROT"),	\ +	exit_code_ipa0(0xE5, 0x60, "TBEGIN"),	\ +	exit_code_ipa0(0xE5, 0x61, "TBEGINC"),	\ +	exit_code_ipa0(0xEB, 0x25, "STCTG"),	\ +	exit_code_ipa0(0xEB, 0x2f, "LCTLG"),	\ +	exit_code_ipa0(0xEB, 0x60, "LRIC"),	\ +	exit_code_ipa0(0xEB, 0x61, "STRIC"),	\ +	exit_code_ipa0(0xEB, 0x62, "MRIC"),	\ +	exit_code_ipa0(0xEB, 0x8a, "SQBS"),	\ +	exit_code_ipa0(0xC8, 0x01, "ECTG"),	\ +	exit_code(0x0a, "SVC"),			\ +	exit_code(0x80, "SSM"),			\ +	exit_code(0x82, "LPSW"),		\ +	exit_code(0x83, "DIAG"),		\ +	exit_code(0xae, "SIGP"),		\ +	exit_code(0xac, "STNSM"),		\ +	exit_code(0xad, "STOSM"),		\ +	exit_code(0xb1, "LRA"),			\ +	exit_code(0xb6, "STCTL"),		\ +	exit_code(0xb7, "LCTL"),		\ +	exit_code(0xee, "PLO") + +#define sie_intercept_code					\ +	{ 0x00, "Host interruption" },				\ +	{ 0x04, "Instruction" },				\ +	{ 0x08, "Program interruption" },			\ +	{ 0x0c, "Instruction and program interruption" },	\ +	{ 0x10, "External request" },				\ +	{ 0x14, "External interruption" },			\ +	{ 0x18, "I/O request" },				\ +	{ 0x1c, "Wait state" },					\ +	{ 0x20, "Validity" },					\ +	{ 0x28, "Stop request" },				\ +	{ 0x2c, "Operation exception" },			\ +	{ 0x38, "Partial-execution" },				\ +	{ 0x3c, "I/O interruption" },				\ +	{ 0x40, "I/O instruction" },				\ +	{ 0x48, "Timing subset" } + +/* + * This is the simple interceptable instructions decoder. + * + * It will be used as userspace interface and it can be used in places + * that does not allow to use general decoder functions, + * such as trace events declarations. + * + * Some userspace tools may want to parse this code + * and would be confused by switch(), if() and other statements, + * but they can understand conditional operator. + */ +#define INSN_DECODE_IPA0(ipa0, insn, rshift, mask)		\ +	(insn >> 56) == (ipa0) ?				\ +		((ipa0 << 8) | ((insn >> rshift) & mask)) : + +#define INSN_DECODE(insn) (insn >> 56) + +/* + * The macro icpt_insn_decoder() takes an intercepted instruction + * and returns a key, which can be used to find a mnemonic name + * of the instruction in the icpt_insn_codes table. + */ +#define icpt_insn_decoder(insn)			\ +	INSN_DECODE_IPA0(0x01, insn, 48, 0xff)	\ +	INSN_DECODE_IPA0(0xaa, insn, 48, 0x0f)	\ +	INSN_DECODE_IPA0(0xb2, insn, 48, 0xff)	\ +	INSN_DECODE_IPA0(0xb9, insn, 48, 0xff)	\ +	INSN_DECODE_IPA0(0xe3, insn, 48, 0xff)	\ +	INSN_DECODE_IPA0(0xe5, insn, 48, 0xff)	\ +	INSN_DECODE_IPA0(0xeb, insn, 16, 0xff)	\ +	INSN_DECODE_IPA0(0xc8, insn, 48, 0x0f)	\ +	INSN_DECODE(insn) + +#endif /* _UAPI_ASM_S390_SIE_H */ diff --git a/arch/s390/include/uapi/asm/sigcontext.h b/arch/s390/include/uapi/asm/sigcontext.h index 584787f6ce4..b30de9c01bb 100644 --- a/arch/s390/include/uapi/asm/sigcontext.h +++ b/arch/s390/include/uapi/asm/sigcontext.h @@ -49,6 +49,7 @@ typedef struct  typedef struct  {  	unsigned int fpc; +	unsigned int pad;  	double   fprs[__NUM_FPRS];  } _s390_fp_regs; diff --git a/arch/s390/include/uapi/asm/socket.h b/arch/s390/include/uapi/asm/socket.h index 92494494692..e031332096d 100644 --- a/arch/s390/include/uapi/asm/socket.h +++ b/arch/s390/include/uapi/asm/socket.h @@ -82,4 +82,8 @@  #define SO_BUSY_POLL		46 +#define SO_MAX_PACING_RATE	47 + +#define SO_BPF_EXTENSIONS	48 +  #endif /* _ASM_SOCKET_H */ diff --git a/arch/s390/include/uapi/asm/statfs.h b/arch/s390/include/uapi/asm/statfs.h index a61d538756f..471eb09184d 100644 --- a/arch/s390/include/uapi/asm/statfs.h +++ b/arch/s390/include/uapi/asm/statfs.h @@ -35,11 +35,11 @@ struct statfs {  struct statfs64 {  	unsigned int	f_type;  	unsigned int	f_bsize; -	unsigned long	f_blocks; -	unsigned long	f_bfree; -	unsigned long	f_bavail; -	unsigned long	f_files; -	unsigned long	f_ffree; +	unsigned long long f_blocks; +	unsigned long long f_bfree; +	unsigned long long f_bavail; +	unsigned long long f_files; +	unsigned long long f_ffree;  	__kernel_fsid_t f_fsid;  	unsigned int	f_namelen;  	unsigned int	f_frsize; diff --git a/arch/s390/include/uapi/asm/ucontext.h b/arch/s390/include/uapi/asm/ucontext.h index 200e06325c6..3e077b2a470 100644 --- a/arch/s390/include/uapi/asm/ucontext.h +++ b/arch/s390/include/uapi/asm/ucontext.h @@ -16,7 +16,9 @@ struct ucontext_extended {  	struct ucontext  *uc_link;  	stack_t		  uc_stack;  	_sigregs	  uc_mcontext; -	unsigned long	  uc_sigmask[2]; +	sigset_t	  uc_sigmask; +	/* Allow for uc_sigmask growth.  Glibc uses a 1024-bit sigset_t.  */ +	unsigned char	  __unused[128 - sizeof(sigset_t)];  	unsigned long	  uc_gprs_high[16];  }; @@ -27,7 +29,9 @@ struct ucontext {  	struct ucontext  *uc_link;  	stack_t		  uc_stack;  	_sigregs          uc_mcontext; -	sigset_t	  uc_sigmask;	/* mask last for extensibility */ +	sigset_t	  uc_sigmask; +	/* Allow for uc_sigmask growth.  Glibc uses a 1024-bit sigset_t.  */ +	unsigned char	  __unused[128 - sizeof(sigset_t)];  };  #endif /* !_ASM_S390_UCONTEXT_H */ diff --git a/arch/s390/include/uapi/asm/unistd.h b/arch/s390/include/uapi/asm/unistd.h index 864f693c237..3802d2d3a18 100644 --- a/arch/s390/include/uapi/asm/unistd.h +++ b/arch/s390/include/uapi/asm/unistd.h @@ -280,7 +280,10 @@  #define __NR_s390_runtime_instr 342  #define __NR_kcmp		343  #define __NR_finit_module	344 -#define NR_syscalls 345 +#define __NR_sched_setattr	345 +#define __NR_sched_getattr	346 +#define __NR_renameat2		347 +#define NR_syscalls 348  /*    * There are some system calls that are not present on 64 bit, some diff --git a/arch/s390/include/uapi/asm/zcrypt.h b/arch/s390/include/uapi/asm/zcrypt.h index e83fc116f5b..f2b18eacaca 100644 --- a/arch/s390/include/uapi/asm/zcrypt.h +++ b/arch/s390/include/uapi/asm/zcrypt.h @@ -154,6 +154,67 @@ struct ica_xcRB {  	unsigned short	priority_window;  	unsigned int	status;  } __attribute__((packed)); + +/** + * struct ep11_cprb - EP11 connectivity programming request block + * @cprb_len:		CPRB header length [0x0020] + * @cprb_ver_id:	CPRB version id.   [0x04] + * @pad_000:		Alignment pad bytes + * @flags:		Admin cmd [0x80] or functional cmd [0x00] + * @func_id:		Function id / subtype [0x5434] + * @source_id:		Source id [originator id] + * @target_id:		Target id [usage/ctrl domain id] + * @ret_code:		Return code + * @reserved1:		Reserved + * @reserved2:		Reserved + * @payload_len:	Payload length + */ +struct ep11_cprb { +	uint16_t	cprb_len; +	unsigned char	cprb_ver_id; +	unsigned char	pad_000[2]; +	unsigned char	flags; +	unsigned char	func_id[2]; +	uint32_t	source_id; +	uint32_t	target_id; +	uint32_t	ret_code; +	uint32_t	reserved1; +	uint32_t	reserved2; +	uint32_t	payload_len; +} __attribute__((packed)); + +/** + * struct ep11_target_dev - EP11 target device list + * @ap_id:	AP device id + * @dom_id:	Usage domain id + */ +struct ep11_target_dev { +	uint16_t ap_id; +	uint16_t dom_id; +}; + +/** + * struct ep11_urb - EP11 user request block + * @targets_num:	Number of target adapters + * @targets:		Addr to target adapter list + * @weight:		Level of request priority + * @req_no:		Request id/number + * @req_len:		Request length + * @req:		Addr to request block + * @resp_len:		Response length + * @resp:		Addr to response block + */ +struct ep11_urb { +	uint16_t		targets_num; +	uint64_t		targets; +	uint64_t		weight; +	uint64_t		req_no; +	uint64_t		req_len; +	uint64_t		req; +	uint64_t		resp_len; +	uint64_t		resp; +} __attribute__((packed)); +  #define AUTOSELECT ((unsigned int)0xFFFFFFFF)  #define ZCRYPT_IOCTL_MAGIC 'z' @@ -183,6 +244,9 @@ struct ica_xcRB {   *   ZSECSENDCPRB   *     Send an arbitrary CPRB to a crypto card.   * + *   ZSENDEP11CPRB + *     Send an arbitrary EP11 CPRB to an EP11 coprocessor crypto card. + *   *   Z90STAT_STATUS_MASK   *     Return an 64 element array of unsigned chars for the status of   *     all devices. @@ -256,6 +320,7 @@ struct ica_xcRB {  #define ICARSAMODEXPO	_IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x05, 0)  #define ICARSACRT	_IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x06, 0)  #define ZSECSENDCPRB	_IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x81, 0) +#define ZSENDEP11CPRB	_IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x04, 0)  /* New status calls */  #define Z90STAT_TOTALCOUNT	_IOR(ZCRYPT_IOCTL_MAGIC, 0x40, int)  | 
