Path: blob/master/tools/arch/s390/include/uapi/asm/sie.h
29274 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef _UAPI_ASM_S390_SIE_H2#define _UAPI_ASM_S390_SIE_H34#define diagnose_codes \5{ 0x10, "DIAG (0x10) release pages" }, \6{ 0x44, "DIAG (0x44) time slice end" }, \7{ 0x9c, "DIAG (0x9c) time slice end directed" }, \8{ 0x204, "DIAG (0x204) logical-cpu utilization" }, \9{ 0x258, "DIAG (0x258) page-reference services" }, \10{ 0x288, "DIAG (0x288) watchdog functions" }, \11{ 0x308, "DIAG (0x308) ipl functions" }, \12{ 0x500, "DIAG (0x500) KVM virtio functions" }, \13{ 0x501, "DIAG (0x501) KVM breakpoint" }1415#define sigp_order_codes \16{ 0x01, "SIGP sense" }, \17{ 0x02, "SIGP external call" }, \18{ 0x03, "SIGP emergency signal" }, \19{ 0x04, "SIGP start" }, \20{ 0x05, "SIGP stop" }, \21{ 0x06, "SIGP restart" }, \22{ 0x09, "SIGP stop and store status" }, \23{ 0x0b, "SIGP initial cpu reset" }, \24{ 0x0c, "SIGP cpu reset" }, \25{ 0x0d, "SIGP set prefix" }, \26{ 0x0e, "SIGP store status at address" }, \27{ 0x12, "SIGP set architecture" }, \28{ 0x13, "SIGP conditional emergency signal" }, \29{ 0x15, "SIGP sense running" }, \30{ 0x16, "SIGP set multithreading"}, \31{ 0x17, "SIGP store additional status at address"}3233#define icpt_prog_codes \34{ 0x0001, "Prog Operation" }, \35{ 0x0002, "Prog Privileged Operation" }, \36{ 0x0003, "Prog Execute" }, \37{ 0x0004, "Prog Protection" }, \38{ 0x0005, "Prog Addressing" }, \39{ 0x0006, "Prog Specification" }, \40{ 0x0007, "Prog Data" }, \41{ 0x0008, "Prog Fixedpoint overflow" }, \42{ 0x0009, "Prog Fixedpoint divide" }, \43{ 0x000A, "Prog Decimal overflow" }, \44{ 0x000B, "Prog Decimal divide" }, \45{ 0x000C, "Prog HFP exponent overflow" }, \46{ 0x000D, "Prog HFP exponent underflow" }, \47{ 0x000E, "Prog HFP significance" }, \48{ 0x000F, "Prog HFP divide" }, \49{ 0x0010, "Prog Segment translation" }, \50{ 0x0011, "Prog Page translation" }, \51{ 0x0012, "Prog Translation specification" }, \52{ 0x0013, "Prog Special operation" }, \53{ 0x0015, "Prog Operand" }, \54{ 0x0016, "Prog Trace table" }, \55{ 0x0017, "Prog ASNtranslation specification" }, \56{ 0x001C, "Prog Spaceswitch event" }, \57{ 0x001D, "Prog HFP square root" }, \58{ 0x001F, "Prog PCtranslation specification" }, \59{ 0x0020, "Prog AFX translation" }, \60{ 0x0021, "Prog ASX translation" }, \61{ 0x0022, "Prog LX translation" }, \62{ 0x0023, "Prog EX translation" }, \63{ 0x0024, "Prog Primary authority" }, \64{ 0x0025, "Prog Secondary authority" }, \65{ 0x0026, "Prog LFXtranslation exception" }, \66{ 0x0027, "Prog LSXtranslation exception" }, \67{ 0x0028, "Prog ALET specification" }, \68{ 0x0029, "Prog ALEN translation" }, \69{ 0x002A, "Prog ALE sequence" }, \70{ 0x002B, "Prog ASTE validity" }, \71{ 0x002C, "Prog ASTE sequence" }, \72{ 0x002D, "Prog Extended authority" }, \73{ 0x002E, "Prog LSTE sequence" }, \74{ 0x002F, "Prog ASTE instance" }, \75{ 0x0030, "Prog Stack full" }, \76{ 0x0031, "Prog Stack empty" }, \77{ 0x0032, "Prog Stack specification" }, \78{ 0x0033, "Prog Stack type" }, \79{ 0x0034, "Prog Stack operation" }, \80{ 0x0039, "Prog Region first translation" }, \81{ 0x003A, "Prog Region second translation" }, \82{ 0x003B, "Prog Region third translation" }, \83{ 0x0040, "Prog Monitor event" }, \84{ 0x0080, "Prog PER event" }, \85{ 0x0119, "Prog Crypto operation" }8687#define exit_code_ipa0(ipa0, opcode, mnemonic) \88{ (ipa0 << 8 | opcode), #ipa0 " " mnemonic }89#define exit_code(opcode, mnemonic) \90{ opcode, mnemonic }9192#define icpt_insn_codes \93exit_code_ipa0(0x01, 0x01, "PR"), \94exit_code_ipa0(0x01, 0x04, "PTFF"), \95exit_code_ipa0(0x01, 0x07, "SCKPF"), \96exit_code_ipa0(0xAA, 0x00, "RINEXT"), \97exit_code_ipa0(0xAA, 0x01, "RION"), \98exit_code_ipa0(0xAA, 0x02, "TRIC"), \99exit_code_ipa0(0xAA, 0x03, "RIOFF"), \100exit_code_ipa0(0xAA, 0x04, "RIEMIT"), \101exit_code_ipa0(0xB2, 0x02, "STIDP"), \102exit_code_ipa0(0xB2, 0x04, "SCK"), \103exit_code_ipa0(0xB2, 0x05, "STCK"), \104exit_code_ipa0(0xB2, 0x06, "SCKC"), \105exit_code_ipa0(0xB2, 0x07, "STCKC"), \106exit_code_ipa0(0xB2, 0x08, "SPT"), \107exit_code_ipa0(0xB2, 0x09, "STPT"), \108exit_code_ipa0(0xB2, 0x0d, "PTLB"), \109exit_code_ipa0(0xB2, 0x10, "SPX"), \110exit_code_ipa0(0xB2, 0x11, "STPX"), \111exit_code_ipa0(0xB2, 0x12, "STAP"), \112exit_code_ipa0(0xB2, 0x14, "SIE"), \113exit_code_ipa0(0xB2, 0x16, "SETR"), \114exit_code_ipa0(0xB2, 0x17, "STETR"), \115exit_code_ipa0(0xB2, 0x18, "PC"), \116exit_code_ipa0(0xB2, 0x20, "SERVC"), \117exit_code_ipa0(0xB2, 0x21, "IPTE"), \118exit_code_ipa0(0xB2, 0x28, "PT"), \119exit_code_ipa0(0xB2, 0x29, "ISKE"), \120exit_code_ipa0(0xB2, 0x2a, "RRBE"), \121exit_code_ipa0(0xB2, 0x2b, "SSKE"), \122exit_code_ipa0(0xB2, 0x2c, "TB"), \123exit_code_ipa0(0xB2, 0x2e, "PGIN"), \124exit_code_ipa0(0xB2, 0x2f, "PGOUT"), \125exit_code_ipa0(0xB2, 0x30, "CSCH"), \126exit_code_ipa0(0xB2, 0x31, "HSCH"), \127exit_code_ipa0(0xB2, 0x32, "MSCH"), \128exit_code_ipa0(0xB2, 0x33, "SSCH"), \129exit_code_ipa0(0xB2, 0x34, "STSCH"), \130exit_code_ipa0(0xB2, 0x35, "TSCH"), \131exit_code_ipa0(0xB2, 0x36, "TPI"), \132exit_code_ipa0(0xB2, 0x37, "SAL"), \133exit_code_ipa0(0xB2, 0x38, "RSCH"), \134exit_code_ipa0(0xB2, 0x39, "STCRW"), \135exit_code_ipa0(0xB2, 0x3a, "STCPS"), \136exit_code_ipa0(0xB2, 0x3b, "RCHP"), \137exit_code_ipa0(0xB2, 0x3c, "SCHM"), \138exit_code_ipa0(0xB2, 0x40, "BAKR"), \139exit_code_ipa0(0xB2, 0x48, "PALB"), \140exit_code_ipa0(0xB2, 0x4c, "TAR"), \141exit_code_ipa0(0xB2, 0x50, "CSP"), \142exit_code_ipa0(0xB2, 0x54, "MVPG"), \143exit_code_ipa0(0xB2, 0x56, "STHYI"), \144exit_code_ipa0(0xB2, 0x58, "BSG"), \145exit_code_ipa0(0xB2, 0x5a, "BSA"), \146exit_code_ipa0(0xB2, 0x5f, "CHSC"), \147exit_code_ipa0(0xB2, 0x74, "SIGA"), \148exit_code_ipa0(0xB2, 0x76, "XSCH"), \149exit_code_ipa0(0xB2, 0x78, "STCKE"), \150exit_code_ipa0(0xB2, 0x7c, "STCKF"), \151exit_code_ipa0(0xB2, 0x7d, "STSI"), \152exit_code_ipa0(0xB2, 0xb0, "STFLE"), \153exit_code_ipa0(0xB2, 0xb1, "STFL"), \154exit_code_ipa0(0xB2, 0xb2, "LPSWE"), \155exit_code_ipa0(0xB2, 0xf8, "TEND"), \156exit_code_ipa0(0xB2, 0xfc, "TABORT"), \157exit_code_ipa0(0xB9, 0x1e, "KMAC"), \158exit_code_ipa0(0xB9, 0x28, "PCKMO"), \159exit_code_ipa0(0xB9, 0x2a, "KMF"), \160exit_code_ipa0(0xB9, 0x2b, "KMO"), \161exit_code_ipa0(0xB9, 0x2d, "KMCTR"), \162exit_code_ipa0(0xB9, 0x2e, "KM"), \163exit_code_ipa0(0xB9, 0x2f, "KMC"), \164exit_code_ipa0(0xB9, 0x3e, "KIMD"), \165exit_code_ipa0(0xB9, 0x3f, "KLMD"), \166exit_code_ipa0(0xB9, 0x8a, "CSPG"), \167exit_code_ipa0(0xB9, 0x8d, "EPSW"), \168exit_code_ipa0(0xB9, 0x8e, "IDTE"), \169exit_code_ipa0(0xB9, 0x8f, "CRDTE"), \170exit_code_ipa0(0xB9, 0x9c, "EQBS"), \171exit_code_ipa0(0xB9, 0xa2, "PTF"), \172exit_code_ipa0(0xB9, 0xab, "ESSA"), \173exit_code_ipa0(0xB9, 0xae, "RRBM"), \174exit_code_ipa0(0xB9, 0xaf, "PFMF"), \175exit_code_ipa0(0xE3, 0x03, "LRAG"), \176exit_code_ipa0(0xE3, 0x13, "LRAY"), \177exit_code_ipa0(0xE3, 0x25, "NTSTG"), \178exit_code_ipa0(0xE5, 0x00, "LASP"), \179exit_code_ipa0(0xE5, 0x01, "TPROT"), \180exit_code_ipa0(0xE5, 0x60, "TBEGIN"), \181exit_code_ipa0(0xE5, 0x61, "TBEGINC"), \182exit_code_ipa0(0xEB, 0x25, "STCTG"), \183exit_code_ipa0(0xEB, 0x2f, "LCTLG"), \184exit_code_ipa0(0xEB, 0x60, "LRIC"), \185exit_code_ipa0(0xEB, 0x61, "STRIC"), \186exit_code_ipa0(0xEB, 0x62, "MRIC"), \187exit_code_ipa0(0xEB, 0x8a, "SQBS"), \188exit_code_ipa0(0xC8, 0x01, "ECTG"), \189exit_code(0x0a, "SVC"), \190exit_code(0x80, "SSM"), \191exit_code(0x82, "LPSW"), \192exit_code(0x83, "DIAG"), \193exit_code(0xae, "SIGP"), \194exit_code(0xac, "STNSM"), \195exit_code(0xad, "STOSM"), \196exit_code(0xb1, "LRA"), \197exit_code(0xb6, "STCTL"), \198exit_code(0xb7, "LCTL"), \199exit_code(0xee, "PLO")200201#define sie_intercept_code \202{ 0x00, "Host interruption" }, \203{ 0x04, "Instruction" }, \204{ 0x08, "Program interruption" }, \205{ 0x0c, "Instruction and program interruption" }, \206{ 0x10, "External request" }, \207{ 0x14, "External interruption" }, \208{ 0x18, "I/O request" }, \209{ 0x1c, "Wait state" }, \210{ 0x20, "Validity" }, \211{ 0x28, "Stop request" }, \212{ 0x2c, "Operation exception" }, \213{ 0x38, "Partial-execution" }, \214{ 0x3c, "I/O interruption" }, \215{ 0x40, "I/O instruction" }, \216{ 0x48, "Timing subset" }217218/*219* This is the simple interceptable instructions decoder.220*221* It will be used as userspace interface and it can be used in places222* that does not allow to use general decoder functions,223* such as trace events declarations.224*225* Some userspace tools may want to parse this code226* and would be confused by switch(), if() and other statements,227* but they can understand conditional operator.228*/229#define INSN_DECODE_IPA0(ipa0, insn, rshift, mask) \230(insn >> 56) == (ipa0) ? \231((ipa0 << 8) | ((insn >> rshift) & mask)) :232233#define INSN_DECODE(insn) (insn >> 56)234235/*236* The macro icpt_insn_decoder() takes an intercepted instruction237* and returns a key, which can be used to find a mnemonic name238* of the instruction in the icpt_insn_codes table.239*/240#define icpt_insn_decoder(insn) ( \241INSN_DECODE_IPA0(0x01, insn, 48, 0xff) \242INSN_DECODE_IPA0(0xaa, insn, 48, 0x0f) \243INSN_DECODE_IPA0(0xb2, insn, 48, 0xff) \244INSN_DECODE_IPA0(0xb9, insn, 48, 0xff) \245INSN_DECODE_IPA0(0xe3, insn, 48, 0xff) \246INSN_DECODE_IPA0(0xe5, insn, 48, 0xff) \247INSN_DECODE_IPA0(0xeb, insn, 16, 0xff) \248INSN_DECODE_IPA0(0xc8, insn, 48, 0x0f) \249INSN_DECODE(insn))250251#endif /* _UAPI_ASM_S390_SIE_H */252253254