2 * s390-specific syscalls decoders.
4 * Copyright (c) 2018-2019 The strace developers.
7 * SPDX-License-Identifier: LGPL-2.1-or-later
12 #if defined S390 || defined S390X
14 # include <sys/user.h>
16 # include "print_fields.h"
18 # include "xlat/s390_guarded_storage_commands.h"
19 # include "xlat/s390_runtime_instr_commands.h"
20 # include "xlat/s390_sthyi_function_codes.h"
23 * Since, for some reason, kernel doesn't expose all these nice constants and
24 * structures in UAPI, we have to re-declare them ourselves.
28 * "The header section is placed at the beginning of the response buffer and
29 * identifies the location and length of all other sections. Valid sections have
30 * nonzero offset values in the header. Each section provides information about
31 * validity of fields within that section."
35 * Header Flag Byte 1 - These flag settings indicate the environment
36 * that the instruction was executed in and may influence the value of
37 * the validity bits. The validity bits, and not these flags, should be
38 * used to determine if a field is valid.
39 * - 0x80 - Global Performance Data unavailable
40 * - 0x40 - One or more hypervisor levels below this level does not
41 * support the STHYI instruction. When this flag is set the
42 * value of INFGPDU is not meaningful because the state of the
43 * Global Performance Data setting cannot be determined.
44 * - 0x20 - Virtualization stack is incomplete. This bit indicates one
46 * - One or more hypervisor levels does not support the STHYI
47 * instruction. For this case, INFSTHYI will also be set.
48 * - There were more than three levels of guest/hypervisor information
50 * - 0x10 - Execution environment is not within a logical partition.
53 uint8_t infhflg2; /**< Header Flag Byte 2 reserved for IBM(R) use */
54 uint8_t infhval1; /**< Header Validity Byte 1 reserved for IBM use */
55 uint8_t infhval2; /**< Header Validity Byte 2 reserved for IBM use */
56 char reserved_1__[3]; /**< Reserved for future IBM use */
57 uint8_t infhygct; /**< Count of Hypervisor and Guest Sections */
58 uint16_t infhtotl; /**< Total length of response buffer */
59 uint16_t infhdln; /**< Length of Header Section mapped by INF0HDR */
60 uint16_t infmoff; /**< Offset to Machine Section mapped by INF0MAC */
61 uint16_t infmlen; /**< Length of Machine Section */
62 uint16_t infpoff; /**< Offset to Partition Section mapped by INF0PAR */
63 uint16_t infplen; /**< Length of Partition Section */
64 uint16_t infhoff1; /**< Offset to Hypervisor Section1 mapped by INF0HYP */
65 uint16_t infhlen1; /**< Length of Hypervisor Section1 */
66 uint16_t infgoff1; /**< Offset to Guest Section1 mapped by INF0GST */
67 uint16_t infglen1; /**< Length of Guest Section1 */
68 uint16_t infhoff2; /**< Offset to Hypervisor Section2 mapped by INF0HYP */
69 uint16_t infhlen2; /**< Length of Hypervisor Section2 */
70 uint16_t infgoff2; /**< Offset to Guest Section2 mapped by INF0GST */
71 uint16_t infglen2; /**< Length of Guest Section2 */
72 uint16_t infhoff3; /**< Offset to Hypervisor Section3 mapped by INF0HYP */
73 uint16_t infhlen3; /**< Length of Hypervisor Section3 */
74 uint16_t infgoff3; /**< Offset to Guest Section3 mapped by INF0GST */
75 uint16_t infglen3; /**< Length of Guest Section3 */
77 static_assert(sizeof(struct sthyi_hdr) == 44,
78 "Unexpected struct sthyi_hdr size");
80 struct sthyi_machine {
81 uint8_t infmflg1; /**< Machine Flag Byte 1 reserved for IBM use */
82 uint8_t infmflg2; /**< Machine Flag Byte 2 reserved for IBM use */
84 * Machine Validity Byte 1.
85 * - 0x80 - INFMPROC, Processor Count Validity. When this bit is on,
86 * it indicates that INFMSCPS, INFMDCPS, INFMSIFL,
87 * and INFMDIFL contain valid counts. The validity bit
89 * - STHYI support is not available on a lower level
91 * - Global Performance Data is not enabled.
92 * - 0x40 - INFMMID, Machine ID Validity. This bit being on indicates
93 * that a SYSIB 1.1.1 was obtained from STSI and information
94 * reported in the following fields is valid: INFMTYPE,
95 * INFMMANU, INFMSEQ, and INFMPMAN.
96 * - 0x20 - INFMMNAM, Machine Name Validity. This bit being on
97 * indicates that the INFMNAME field is valid.
98 * - 0x10 - INFMPLNV, reserved for IBM use.
101 uint8_t infmval2; /**< Machine Validity Byte 2 reserved for IBM use */
103 * Number of shared CPs configured in the machine or in the physical
104 * partition if the system is physically partitioned.
108 * Number of dedicated CPs configured in this machine or in the physical
109 * partition if the system is physically partitioned.
113 * Number of shared IFLs configured in this machine or in the physical
114 * partition if the system is physically partitioned.
118 * Number of dedicated IFLs configured in this machine or in the
119 * physical partition if the system is physically partitioned.
122 char infmname[8]; /**< EBCDIC Machine Name */
123 char infmtype[4]; /**< EBCDIC Type */
124 char infmmanu[16]; /**< EBCDIC Manufacturer */
125 char infmseq[16]; /**< EBCDIC Sequence Code */
126 char infmpman[4]; /**< EBCDIC Plant of Manufacture */
127 char reserved_1__[4]; /**< Reserved for future IBM use */
128 char infmplnm[8]; /**< EBCDIC Reserved for IBM use */
130 static_assert(sizeof(struct sthyi_machine) == 72,
131 "Unexpected struct sthyi_machine size");
133 struct sthyi_partition {
135 * Partition Flag Byte 1.
136 * - 0x80 - INFPMTEN, multithreading (MT) is enabled.
137 * - 0x40 - INFPPOOL, reserved for IBM use.
140 /** Partition Flag Byte 2 reserved for IBM use */
143 * Partition Validity Byte 1.
144 * - 0x80 - INFPPROC, Processor Count Validity. This bit being on
145 * indicates that INFPSCPS, INFPDCPS, INFPSIFL, and INFPDIFL
146 * contain valid counts.
147 * - 0x40 - INFPWBCC, Partition Weight-Based Capped Capacity Validity.
148 * This bit being on indicates that INFPWBCP and INFPWBIF
150 * - 0x20 - INFPACC, Partition Absolute Capped Capacity Validity.
151 * This bit being on indicates that INFPABCP and INFPABIF
153 * - 0x10 - INFPPID, Partition ID Validity. This bit being on indicates
154 * that a SYSIB 2.2.2 was obtained from STSI and information
155 * reported in the following fields is valid: INFPPNUM
157 * - 0x08 - INFPLGVL, LPAR Group Absolute Capacity Capping Information
158 * Validity. This bit being on indicates that INFPLGNM,
159 * INFPLGCP, and INFPLGIF are valid.
160 * - 0x04 - INFPPLNV, reserved for IBM use.
163 /** Partition Validity Byte 2 reserved for IBM use */
165 /** Logical partition number */
168 * Number of shared logical CPs configured for this partition. Count
169 * of cores when MT is enabled.
173 * Number of dedicated logical CPs configured for this partition. Count
174 * of cores when MT is enabled.
178 * Number of shared logical IFLs configured for this partition. Count
179 * of cores when MT is enabled.
183 * Number of dedicated logical IFLs configured for this partition.
184 * Count of cores when MT is enabled.
187 /** Reserved for future IBM use */
188 char reserved_1__[2];
189 /** EBCIDIC Logical partition name */
192 * Partition weight-based capped capacity for CPs, a scaled number where
193 * 0x00010000 represents one core. Zero if not capped.
197 * Partition absolute capped capacity for CPs, a scaled number where
198 * 0x00010000 represents one core. Zero if not capped.
202 * Partition weight-based capped capacity for IFLs, a scaled number
203 * where 0x00010000 represents one core. Zero if not capped.
207 * Partition absolute capped capacity for IFLs, a scaled number where
208 * 0x00010000 represents one core. Zero if not capped.
212 * EBCIDIC LPAR group name. Binary zeros when the partition is not in
213 * an LPAR group. EBCDIC and padded with blanks on the right when in a
214 * group. The group name is reported only when there is a group cap on
215 * CP or IFL CPU types and the partition has the capped CPU type.
219 * LPAR group absolute capacity value for CP CPU type when nonzero. This
220 * field will be nonzero only when INFPLGNM is nonzero and a cap is
221 * defined for the LPAR group for the CP CPU type. When nonzero,
222 * contains a scaled number where 0x00010000 represents one core.
226 * LPAR group absolute capacity value for IFL CPU type when nonzero.
227 * This field will be nonzero only when INFPLGNM is nonzero and a cap
228 * is defined for the LPAR group for the IFL CPU type. When nonzero,
229 * contains a scaled number where 0x00010000 represents one core.
232 char infpplnm[8]; /**< Reserved for future IBM use. */
234 static_assert(sizeof(struct sthyi_partition) == 64,
235 "Unexpected struct sthyi_partition size");
237 struct sthyi_hypervisor {
239 * Hypervisor Flag Byte 1
240 * - 0x80 - INFYLMCN, guest CPU usage hard limiting is using
241 * the consumption method.
242 * - 0x40 - INFYLMPR, if on, LIMITHARD caps use prorated core time
243 * for capping. If off, raw CPU time is used.
244 * - 0x20 - INFYMTEN, hypervisor is MT-enabled.
247 uint8_t infyflg2; /**< Hypervisor Flag Byte 2 reserved for IBM use */
248 uint8_t infyval1; /**< Hypervisor Validity Byte 1 reserved for IBM use */
249 uint8_t infyval2; /**< Hypervisor Validity Byte 2 reserved for IBM use */
252 * - 1 - z/VM is the hypervisor.
255 char reserved_1__[1]; /**< Reserved for future IBM use */
257 * Threads in use per CP core. Only valid when MT enabled
258 * (INFPFLG1 0x80 is ON).
262 * Threads in use per IFL core. Only valid when MT enabled
263 * (INFPFLG1 0x80 is ON).
267 * EBCID System Identifier. Left justified and padded with blanks.
268 * This field will be blanks if non-existent.
272 * EBCID Cluster Name. Left justified and padded with blanks. This is
273 * the name on the SSI statement in the system configuration file. This
274 * field will be blanks if nonexistent.
278 * Total number of CPs shared among guests of this hypervisor.
279 * Number of cores when MT enabled.
283 * Total number of CPs dedicated to guests of this hypervisor.
284 * Number of cores when MT enabled.
288 * Total number of IFLs shared among guests of this hypervisor.
289 * Number of cores when MT enabled.
293 * Total number of IFLs dedicated to guests of this hypervisor.
294 * Number of cores when MT enabled.
298 * Mask of installed function codes. Bit position corresponding
299 * to the function code number is on if the function code is supported
300 * by this hypervisor. Bits may be on even if the guest
303 * Element 0 (INFYINS0) flags:
304 * - 0x80 - INFYFCCP, FC = 0, Obtain CPU Capacity Info.
305 * - 0x40 - INFYFHYP, FC = 1, Hypervisor Environment Info.
306 * - 0x20 - INFYFGLS, FC = 2, Guest List.
307 * - 0x10 - INFYFGST, FC = 3, Designated Guest Info.
308 * - 0x08 - INFYFPLS, FC = 4, Resource Pool List.
309 * - 0x04 - INFYFPDS, FC = 5, Designated Resource Pool Information.
310 * - 0x02 - INFYFPML, FC = 6, Resource Pool Member List.
314 * Mask of authorized functions codes. Bit position corresponding
315 * to the function code number is on if the function code is supported
316 * by this hypervisor and the guest has been authorized
319 * The flags are the same as in infyinsf.
323 static_assert(sizeof(struct sthyi_hypervisor) == 48,
324 "Unexpected struct sthyi_hypervisor size");
329 * - 0x80 - Guest is mobility enabled
330 * - 0x40 - Guest has multiple virtual CPU types
331 * - 0x20 - Guest CP dispatch type has LIMITHARD cap
332 * - 0x10 - Guest IFL dispatch type has LIMITHARD cap
333 * - 0x08 - Virtual CPs are thread dispatched
334 * - 0x04 - Virtual IFLs are thread dispatched
337 uint8_t infgflg2; /**< Guest Flag Byte 2 reserved for IBM use */
338 uint8_t infgval1; /**< Guest Validity Byte 1 reserved for IBM use */
339 uint8_t infgval2; /**< Guest Validity Byte 2 reserved for IBM use */
340 char infgusid[8]; /**< EBCDIC Userid */
341 uint16_t infgscps; /**< Number of guest shared CPs */
342 uint16_t infgdcps; /**< Number of guest dedicated CPs */
344 * Dispatch type for guest CPs. This field is valid if INFGSCPS or
345 * INFGDCPS is greater than zero.
346 * - 0 - General Purpose (CP)
349 char reserved_1__[3]; /**< Reserved for future IBM use */
351 * Guest current capped capacity for shared virtual CPs, a scaled number
352 * where 0x00010000 represents one core. This field is zero to
353 * indicate not capped when:
354 * - There is no CP individual limit (that is, the "Guest CP dispatch
355 * type has LIMITHARD cap" bit in field INFGFLG1 is OFF).
356 * - There are no shared CPs on the system (that is, INFYSCPS = 0).
357 * If there is a CP limit but there are no shared CPs or virtual CPs,
358 * the limit is meaningless and does not apply to anything.
361 uint16_t infgsifl; /**< Number of guest shared IFLs */
362 uint16_t infgdifl; /**< Number of guest dedicated IFLs */
364 * Dispatch type for guest IFLs. This field is valid if INFGSIFL or
365 * INFGDIFL is greater than zero.
366 * - 0 - General Purpose (CP)
367 * - 3 - Integrated Facility for Linux (IFL)
370 char reserved_2__[3]; /**< Reserved for future IBM use */
372 * Guest current capped capacity for shared virtual IFLs, a scaled
373 * number where 0x00010000 represents one core. This field is zero
374 * to indicate not capped with an IFL limit when:
375 * - There is no IFL individual limit (that is, the "Guest IFL dispatch
376 * type has LIMITHARD cap" bit in field INFGFLG1 is OFF).
377 * - The guest's IFLs are dispatched on CPs (that is, INFGIFDT = 00).
378 * When the guest's IFLs are dispatched on CPs, the CP individual
379 * limit (in INFGCPCC) is applied to the guest's virtual IFLs and
384 * CPU Pool Capping Flags
385 * - 0x80 - CPU Pool's CP virtual type has LIMITHARD cap
386 * - 0x40 - CPU Pool's CP virtual type has CAPACITY cap
387 * - 0x20 - CPU Pool's IFL virtual type has LIMITHARD cap
388 * - 0x10 - CPU Pool's IFL virtual type has CAPACITY cap
389 * - 0x08 - CPU Pool uses prorated core time.
392 char reserved_3__[3]; /**< Reserved for future IBM use */
394 * EBCDIC CPU Pool Name. This field will be blanks if the guest is not
399 * CPU Pool capped capacity for shared virtual CPs, a scaled number
400 * where 0x00010000 represents one core. This field will be zero if
405 * CPU Pool capped capacity for shared virtual IFLs, a scaled number
406 * where 0x00010000 represents one core. This field will be zero if
411 static_assert(sizeof(struct sthyi_guest) == 56,
412 "Unexpected struct sthyi_guest size");
416 decode_ebcdic(const char *ebcdic, char *ascii, size_t size)
419 * This is mostly Linux's EBCDIC-ASCII conversion table, except for
420 * various non-representable characters that are converted to spaces for
421 * readability purposes, as it is intended to be a hint for the string
422 * contents and not precise conversion.
424 static char conv_table[] =
425 "\0\1\2\3 \11 \177 \13\14\15\16\17"
426 "\20\21\22\23 \n\10 \30\31 \34\35\36\37"
427 " \34 \n\27\33 \5\6\7"
443 *ascii++ = conv_table[(unsigned char) *ebcdic++];
446 # define DECODE_EBCDIC(ebcdic_, ascii_) \
447 decode_ebcdic((ebcdic_), (ascii_), \
448 sizeof(ebcdic_) + MUST_BE_ARRAY(ebcdic_))
449 # define PRINT_EBCDIC(ebcdic_) \
451 char ascii_str[sizeof(ebcdic_) + MUST_BE_ARRAY(ebcdic_)]; \
453 DECODE_EBCDIC(ebcdic_, ascii_str); \
454 print_quoted_string(ascii_str, sizeof(ascii_str), \
455 QUOTE_EMIT_COMMENT); \
458 # define PRINT_FIELD_EBCDIC(prefix_, where_, field_) \
460 PRINT_FIELD_HEX_ARRAY(prefix_, where_, field_); \
461 PRINT_EBCDIC((where_).field_); \
464 # define PRINT_FIELD_WEIGHT(prefix_, where_, field_) \
466 PRINT_FIELD_X(prefix_, where_, field_); \
467 if ((where_).field_) \
468 tprintf_comment("%u %u/65536 cores", \
469 (where_).field_ >> 16, \
470 (where_).field_ & 0xFFFF); \
472 tprints_comment("unlimited"); \
476 # define IS_BLANK(arr_) /* 0x40 is space in EBCDIC */ \
477 is_filled(arr_, '\x40', sizeof(arr_) + MUST_BE_ARRAY(arr_))
479 # define CHECK_SIZE_EX(hdr_, min_size_, size_, name_, ...) \
481 if ((size_) < (min_size_)) { \
482 tprintf_comment("Invalid " name_ " with size " \
483 "%hu < %zu expected", \
485 (size_), (min_size_)); \
486 print_quoted_string((char *) (hdr_), (size_), \
493 # define CHECK_SIZE(hdr_, size_, name_, ...) \
494 CHECK_SIZE_EX((hdr_), sizeof(*(hdr_)), (size_), name_, ##__VA_ARGS__)
496 # define PRINT_UNKNOWN_TAIL_EX(hdr_, hdr_size_, size_) \
498 if ((size_) > (hdr_size_) && \
499 !is_filled(((char *) hdr_) + (hdr_size_), '\0', \
500 (size_) - (hdr_size_))) { \
502 print_quoted_string(((char *) hdr_) + (hdr_size_), \
503 (size_) - (hdr_size_), \
508 # define PRINT_UNKNOWN_TAIL(hdr_, size_) \
509 PRINT_UNKNOWN_TAIL_EX((hdr_), sizeof(*(hdr_)), (size_))
512 print_sthyi_machine(struct tcb *tcp, struct sthyi_machine *hdr, uint16_t size,
515 size_t last_decoded = offsetofend(typeof(*hdr), infmpman);
516 int cnt_val, name_val, id_val;
518 CHECK_SIZE_EX(hdr, last_decoded, size, "machine structure");
520 tprints("/* machine */ {");
522 if (hdr->infmflg1) { /* Reserved */
523 PRINT_FIELD_0X("", *hdr, infmflg1);
526 if (hdr->infmflg2) { /* Reserved */
527 PRINT_FIELD_0X(", ", *hdr, infmflg2);
532 PRINT_FIELD_0X("", *hdr, infmval1);
533 cnt_val = !!(hdr->infmval1 & 0x80);
534 id_val = !!(hdr->infmval1 & 0x40);
535 name_val = !!(hdr->infmval1 & 0x20);
539 tprintf_comment("processor count validity: %d, "
540 "machine ID validity: %d, "
541 "machine name validity: %d%s%#.0x%s",
542 cnt_val, id_val, name_val,
543 hdr->infmval1 & 0x1F ? ", " : "",
544 hdr->infmval1 & 0x1F,
545 hdr->infmval1 & 0x1F ? " - ???" : "");
547 PRINT_FIELD_0X(", ", *hdr, infmval2);
550 if (cnt_val || hdr->infmscps)
551 PRINT_FIELD_U(", ", *hdr, infmscps);
552 if (cnt_val || hdr->infmdcps)
553 PRINT_FIELD_U(", ", *hdr, infmdcps);
554 if (cnt_val || hdr->infmsifl)
555 PRINT_FIELD_U(", ", *hdr, infmsifl);
556 if (cnt_val || hdr->infmdifl)
557 PRINT_FIELD_U(", ", *hdr, infmdifl);
560 if (name_val || hdr->infmname)
561 PRINT_FIELD_EBCDIC(", ", *hdr, infmname);
563 if (id_val || !IS_ARRAY_ZERO(hdr->infmtype))
564 PRINT_FIELD_EBCDIC(", ", *hdr, infmtype);
565 if (id_val || !IS_ARRAY_ZERO(hdr->infmmanu))
566 PRINT_FIELD_EBCDIC(", ", *hdr, infmmanu);
567 if (id_val || !IS_ARRAY_ZERO(hdr->infmseq))
568 PRINT_FIELD_EBCDIC(", ", *hdr, infmseq);
569 if (id_val || !IS_ARRAY_ZERO(hdr->infmpman))
570 PRINT_FIELD_EBCDIC(", ", *hdr, infmpman);
572 if (size >= offsetofend(struct sthyi_machine, infmplnm)) {
573 last_decoded = offsetofend(struct sthyi_machine,
576 if (!IS_ARRAY_ZERO(hdr->reserved_1__))
577 PRINT_FIELD_HEX_ARRAY(", ", *hdr, reserved_1__);
579 if (!IS_ARRAY_ZERO(hdr->infmplnm))
580 PRINT_FIELD_EBCDIC(", ", *hdr, infmplnm);
583 PRINT_UNKNOWN_TAIL_EX(hdr, last_decoded, size);
592 print_sthyi_partition(struct tcb *tcp, struct sthyi_partition *hdr,
593 uint16_t size, bool *mt)
595 size_t last_decoded = offsetofend(typeof(*hdr), infplgif);
596 int cnt_val, wcap_val, acap_val, id_val, lpar_val;
600 CHECK_SIZE_EX(hdr, last_decoded, size, "partition structure");
602 *mt = !!(hdr->infpflg1 & 0x80);
604 PRINT_FIELD_0X("/* partition */ {", *hdr, infpflg1);
605 if (!abbrev(tcp) && hdr->infpflg1)
606 tprintf_comment("%s%s%#.0x%s",
607 hdr->infpflg1 & 0x80 ?
608 "0x80 - multithreading is enabled" : "",
609 (hdr->infpflg1 & 0x80) && (hdr->infpflg1 & 0x7F) ?
611 hdr->infpflg1 & 0x7F,
612 hdr->infpflg1 & 0x7F ? " - ???" : "");
613 if (!abbrev(tcp) && hdr->infpflg2) /* Reserved */
614 PRINT_FIELD_0X(", ", *hdr, infpflg2);
616 PRINT_FIELD_0X(", ", *hdr, infpval1);
617 cnt_val = !!(hdr->infpval1 & 0x80);
618 wcap_val = !!(hdr->infpval1 & 0x40);
619 acap_val = !!(hdr->infpval1 & 0x20);
620 id_val = !!(hdr->infpval1 & 0x10);
621 lpar_val = !!(hdr->infpval1 & 0x08);
623 if (!abbrev(tcp) && hdr->infpval1)
624 tprintf_comment("processor count validity: %d, "
625 "partition weight-based capacity validity: %d, "
626 "partition absolute capacity validity: %d, "
627 "partition ID validity: %d, "
628 "LPAR group absolute capacity capping "
629 "information validity: %d%s%#.0x%s",
630 cnt_val, wcap_val, acap_val, id_val, lpar_val,
631 hdr->infpval1 & 0x07 ? ", " : "",
632 hdr->infpval1 & 0x07,
633 hdr->infpval1 & 0x07 ? " - ???" : "");
634 if (!abbrev(tcp) && hdr->infpval2) /* Reserved */
635 PRINT_FIELD_0X(", ", *hdr, infpval2);
637 if (id_val || hdr->infppnum)
638 PRINT_FIELD_U(", ", *hdr, infppnum);
640 if (cnt_val || hdr->infpscps)
641 PRINT_FIELD_U(", ", *hdr, infpscps);
642 if (cnt_val || hdr->infpdcps)
643 PRINT_FIELD_U(", ", *hdr, infpdcps);
644 if (cnt_val || hdr->infpsifl)
645 PRINT_FIELD_U(", ", *hdr, infpsifl);
646 if (cnt_val || hdr->infpdifl)
647 PRINT_FIELD_U(", ", *hdr, infpdifl);
649 if (!abbrev(tcp) && !IS_ARRAY_ZERO(hdr->reserved_1__))
650 PRINT_FIELD_HEX_ARRAY(", ", *hdr, reserved_1__);
652 if (id_val || !IS_ARRAY_ZERO(hdr->infppnam))
653 PRINT_FIELD_EBCDIC(", ", *hdr, infppnam);
656 if (wcap_val || hdr->infpwbcp)
657 PRINT_FIELD_WEIGHT(", ", *hdr, infpwbcp);
658 if (acap_val || hdr->infpabcp)
659 PRINT_FIELD_WEIGHT(", ", *hdr, infpabcp);
660 if (wcap_val || hdr->infpwbif)
661 PRINT_FIELD_WEIGHT(", ", *hdr, infpwbif);
662 if (acap_val || hdr->infpabif)
663 PRINT_FIELD_WEIGHT(", ", *hdr, infpabif);
665 if (!IS_ARRAY_ZERO(hdr->infplgnm)) {
666 PRINT_FIELD_EBCDIC(", ", *hdr, infplgnm);
668 PRINT_FIELD_WEIGHT(", ", *hdr, infplgcp);
669 PRINT_FIELD_WEIGHT(", ", *hdr, infplgif);
672 PRINT_FIELD_HEX_ARRAY(", ", *hdr, infplgnm);
674 PRINT_FIELD_X(", ", *hdr, infplgcp);
676 PRINT_FIELD_X(", ", *hdr, infplgif);
679 if (size >= offsetofend(struct sthyi_partition, infpplnm)) {
680 last_decoded = offsetofend(struct sthyi_partition,
683 if (!IS_ARRAY_ZERO(hdr->infpplnm))
684 PRINT_FIELD_EBCDIC(", ", *hdr, infpplnm);
687 PRINT_UNKNOWN_TAIL_EX(hdr, last_decoded, size);
696 print_funcs(const uint8_t funcs[8])
698 static const char *func_descs[] = {
699 [0] = "Obtain CPU Capacity Info",
700 [1] = "Hypervisor Environment Info",
702 [3] = "Designated Guest Info",
703 [4] = "Resource Pool List",
704 [5] = "Designated Resource Pool Information",
705 [6] = "Resource Pool Member List",
708 static_assert(ARRAY_SIZE(func_descs) <= 64,
709 "func_descs is too big");
711 if (is_filled((const char *) funcs, 0, 8))
716 for (size_t i = 0; i < ARRAY_SIZE(func_descs); i++) {
721 size_t f = 1 << (7 - (i & 7));
726 tprintf("%s%zu: %s", cont ? ", " : " /* ", i, func_descs[i]);
735 print_sthyi_hypervisor(struct tcb *tcp, struct sthyi_hypervisor *hdr,
736 uint16_t size, int num, bool mt)
738 size_t last_decoded = offsetofend(typeof(*hdr), infydifl);
740 CHECK_SIZE_EX(hdr, last_decoded, size, "hypervisor %d structure", num);
742 tprintf("/* hypervisor %d */ ", num);
743 PRINT_FIELD_0X("{", *hdr, infyflg1);
744 if (!abbrev(tcp) && hdr->infyflg1)
745 tprintf_comment("%s%s%s%s%s%s%#.0x%s",
746 hdr->infyflg1 & 0x80 ?
747 "0x80 - guest CPU usage had limiting is using "
748 "the consumption method" : "",
749 (hdr->infyflg1 & 0x80) && (hdr->infyflg1 & 0x40) ?
751 hdr->infyflg1 & 0x40 ?
752 "0x40 - LIMITHARD caps use prorated core time "
754 (hdr->infyflg1 & 0xC0) && (hdr->infyflg1 & 0x20) ?
756 hdr->infyflg1 & 0x20 ?
757 "0x20 - hypervisor is MT-enabled" :"",
758 (hdr->infyflg1 & 0xE0) && (hdr->infyflg1 & 0x1F) ?
760 hdr->infyflg1 & 0x1F,
761 hdr->infyflg1 & 0x1F ? " - ???" : "");
764 if (hdr->infyflg2) /* Reserved */
765 PRINT_FIELD_0X(", ", *hdr, infyflg2);
766 if (hdr->infyval1) /* Reserved */
767 PRINT_FIELD_0X(", ", *hdr, infyval1);
768 if (hdr->infyval2) /* Reserved */
769 PRINT_FIELD_0X(", ", *hdr, infyval2);
771 PRINT_FIELD_U(", ", *hdr, infytype);
772 switch (hdr->infytype) {
774 tprints_comment("z/VM is the hypervisor");
777 tprints_comment("unknown hypervisor type");
780 if (!IS_ARRAY_ZERO(hdr->reserved_1__))
781 PRINT_FIELD_HEX_ARRAY(", ", *hdr, reserved_1__);
783 if (mt || hdr->infycpt)
784 PRINT_FIELD_U(", ", *hdr, infycpt);
785 if (mt || hdr->infyiflt)
786 PRINT_FIELD_U(", ", *hdr, infyiflt);
789 if (!abbrev(tcp) || !IS_BLANK(hdr->infysyid))
790 PRINT_FIELD_EBCDIC(", ", *hdr, infysyid);
791 if (!abbrev(tcp) || !IS_BLANK(hdr->infyclnm))
792 PRINT_FIELD_EBCDIC(", ", *hdr, infyclnm);
794 if (!abbrev(tcp) || hdr->infyscps)
795 PRINT_FIELD_U(", ", *hdr, infyscps);
796 if (!abbrev(tcp) || hdr->infydcps)
797 PRINT_FIELD_U(", ", *hdr, infydcps);
798 if (!abbrev(tcp) || hdr->infysifl)
799 PRINT_FIELD_U(", ", *hdr, infysifl);
800 if (!abbrev(tcp) || hdr->infydifl)
801 PRINT_FIELD_U(", ", *hdr, infydifl);
804 if (size >= offsetofend(struct sthyi_hypervisor, infyautf)) {
805 last_decoded = offsetofend(struct sthyi_hypervisor,
808 PRINT_FIELD_HEX_ARRAY(", ", *hdr, infyinsf);
809 print_funcs(hdr->infyinsf);
811 PRINT_FIELD_HEX_ARRAY(", ", *hdr, infyautf);
812 print_funcs(hdr->infyautf);
815 PRINT_UNKNOWN_TAIL_EX(hdr, last_decoded, size);
824 print_sthyi_guest(struct tcb *tcp, struct sthyi_guest *hdr, uint16_t size,
827 CHECK_SIZE(hdr, size, "guest %d structure", num);
829 tprintf("/* guest %d */ ", num);
830 PRINT_FIELD_0X("{", *hdr, infgflg1);
831 if (!abbrev(tcp) && hdr->infgflg1)
832 tprintf_comment("%s%s%s%s%s%s%s%s%s%s%s%s%#.0x%s",
833 hdr->infgflg1 & 0x80 ?
834 "0x80 - guest is mobility enabled" : "",
835 (hdr->infgflg1 & 0x80) && (hdr->infgflg1 & 0x40) ?
837 hdr->infgflg1 & 0x40 ?
838 "0x40 - guest has multiple virtual CPU types" :
840 (hdr->infgflg1 & 0xC0) && (hdr->infgflg1 & 0x20) ?
842 hdr->infgflg1 & 0x20 ?
843 "0x20 - guest CP dispatch type has LIMITHARD "
845 (hdr->infgflg1 & 0xE0) && (hdr->infgflg1 & 0x10) ?
847 hdr->infgflg1 & 0x10 ?
848 "0x10 - guest IFL dispatch type has LIMITHARD "
850 (hdr->infgflg1 & 0xF0) && (hdr->infgflg1 & 0x08) ?
852 hdr->infgflg1 & 0x08 ?
853 "0x08 - virtual CPs are thread dispatched" :
855 (hdr->infgflg1 & 0xF8) && (hdr->infgflg1 & 0x04) ?
857 hdr->infgflg1 & 0x04 ?
858 "0x04 - virtual IFLs are thread dispatched" :
860 (hdr->infgflg1 & 0xFC) && (hdr->infgflg1 & 0x03) ?
862 hdr->infgflg1 & 0x03,
863 hdr->infgflg1 & 0x03 ? " - ???" : "");
865 if (hdr->infgflg2) /* Reserved */
866 PRINT_FIELD_0X(", ", *hdr, infgflg2);
867 if (hdr->infgval1) /* Reserved */
868 PRINT_FIELD_0X(", ", *hdr, infgval1);
869 if (hdr->infgval2) /* Reserved */
870 PRINT_FIELD_0X(", ", *hdr, infgval2);
873 PRINT_FIELD_EBCDIC(", ", *hdr, infgusid);
875 if (!abbrev(tcp) || hdr->infgscps)
876 PRINT_FIELD_U(", ", *hdr, infgscps);
877 if (!abbrev(tcp) || hdr->infgdcps)
878 PRINT_FIELD_U(", ", *hdr, infgdcps);
881 PRINT_FIELD_U(", ", *hdr, infgcpdt);
882 switch (hdr->infgcpdt) {
884 tprints_comment("General Purpose (CP)");
887 tprints_comment("unknown");
890 if (!IS_ARRAY_ZERO(hdr->reserved_1__))
891 PRINT_FIELD_HEX_ARRAY(", ", *hdr, reserved_1__);
894 if (!abbrev(tcp) || hdr->infgcpcc)
895 PRINT_FIELD_WEIGHT(", ", *hdr, infgcpcc);
897 if (!abbrev(tcp) || hdr->infgsifl)
898 PRINT_FIELD_U(", ", *hdr, infgsifl);
899 if (!abbrev(tcp) || hdr->infgdifl)
900 PRINT_FIELD_U(", ", *hdr, infgdifl);
903 PRINT_FIELD_U(", ", *hdr, infgifdt);
904 switch (hdr->infgifdt) {
906 tprints_comment("General Purpose (CP)");
909 tprints_comment("Integrated Facility for Linux (IFL)");
912 tprints_comment("unknown");
915 if (!IS_ARRAY_ZERO(hdr->reserved_2__))
916 PRINT_FIELD_HEX_ARRAY(", ", *hdr, reserved_2__);
919 if (!abbrev(tcp) || hdr->infgifcc)
920 PRINT_FIELD_WEIGHT(", ", *hdr, infgifcc);
922 PRINT_FIELD_0X(", ", *hdr, infgpflg);
923 if (!abbrev(tcp) && hdr->infgpflg)
924 tprintf_comment("%s%s%s%s%s%s%s%s%s%s%#.0x%s",
925 hdr->infgpflg & 0x80 ?
926 "0x80 - CPU pool's CP virtual type has "
927 "LIMITHARD cap" : "",
928 (hdr->infgpflg & 0x80) && (hdr->infgpflg & 0x40) ?
930 hdr->infgpflg & 0x40 ?
931 "0x40 - CPU pool's CP virtual type has "
933 (hdr->infgpflg & 0xC0) && (hdr->infgpflg & 0x20) ?
935 hdr->infgpflg & 0x20 ?
936 "0x20 - CPU pool's IFL virtual type has "
937 "LIMITHARD cap" : "",
938 (hdr->infgpflg & 0xE0) && (hdr->infgpflg & 0x10) ?
940 hdr->infgpflg & 0x10 ?
941 "0x10 - CPU pool's IFL virtual type has "
943 (hdr->infgpflg & 0xF0) && (hdr->infgpflg & 0x08) ?
945 hdr->infgpflg & 0x08 ?
946 "0x08 - CPU pool uses prorated core time" : "",
947 (hdr->infgpflg & 0xF8) && (hdr->infgpflg & 0x07) ?
949 hdr->infgpflg & 0x07,
950 hdr->infgpflg & 0x07 ? " - ???" : "");
953 if (!IS_ARRAY_ZERO(hdr->reserved_3__))
954 PRINT_FIELD_HEX_ARRAY(", ", *hdr, reserved_3__);
956 if (!IS_BLANK(hdr->infgpnam))
957 PRINT_FIELD_EBCDIC(", ", *hdr, infgpnam);
959 PRINT_FIELD_WEIGHT(", ", *hdr, infgpccc);
960 PRINT_FIELD_WEIGHT(", ", *hdr, infgpicc);
962 PRINT_UNKNOWN_TAIL(hdr, size);
970 # define STHYI_PRINT_STRUCT(l_, name_) \
972 if (hdr->inf ##l_## off && hdr->inf ##l_## off + \
973 hdr->inf ##l_## len <= sizeof(data)) { \
975 print_sthyi_ ##name_(tcp, (struct sthyi_ ##name_ *) \
976 (data + hdr->inf ##l_## off), \
977 hdr->inf ##l_## len, &mt); \
981 # define STHYI_PRINT_HV_STRUCT(l_, n_, name_) \
983 if (hdr->inf ##l_## off ##n_ && hdr->inf ##l_## off ##n_ + \
984 hdr->inf ##l_## len ##n_ <= sizeof(data)) { \
986 print_sthyi_ ##name_(tcp, (struct sthyi_ ##name_ *) \
987 (data + hdr->inf ##l_## off ##n_), \
988 hdr->inf ##l_## len ##n_, n_, mt); \
993 print_sthyi_buf(struct tcb *tcp, kernel_ulong_t ptr)
995 char data[PAGE_SIZE];
996 struct sthyi_hdr *hdr = (struct sthyi_hdr *) data;
999 if (umove_or_printaddr(tcp, ptr, &data))
1005 PRINT_FIELD_0X("/* header */ {", *hdr, infhflg1);
1009 goto sthyi_sections;
1013 tprintf_comment("%s%s%s%s%s%s%s%s%#.0x%s",
1014 hdr->infhflg1 & 0x80 ?
1015 "0x80 - Global Performance Data unavailable" :
1017 (hdr->infhflg1 & 0x80) && (hdr->infhflg1 & 0x40) ?
1019 hdr->infhflg1 & 0x40 ?
1020 "0x40 - One or more hypervisor levels below "
1021 "this level does not support the STHYI "
1023 (hdr->infhflg1 & 0xC0) && (hdr->infhflg1 & 0x20) ?
1025 hdr->infhflg1 & 0x20 ?
1026 "0x20 - Virtualization stack is incomplete" :
1028 (hdr->infhflg1 & 0xE0) && (hdr->infhflg1 & 0x10) ?
1030 hdr->infhflg1 & 0x10 ?
1031 "0x10 - Execution environment is not within "
1032 "a logical partition" : "",
1033 (hdr->infhflg1 & 0xF0) && (hdr->infhflg1 & 0x0F) ?
1035 hdr->infhflg1 & 0x0F,
1036 hdr->infhflg1 & 0x0F ? " - ???" : "");
1037 if (hdr->infhflg2) /* Reserved */
1038 PRINT_FIELD_0X(", ", *hdr, infhflg2);
1039 if (hdr->infhval1) /* Reserved */
1040 PRINT_FIELD_0X(", ", *hdr, infhval1);
1041 if (hdr->infhval2) /* Reserved */
1042 PRINT_FIELD_0X(", ", *hdr, infhval2);
1044 if (!IS_ARRAY_ZERO(hdr->reserved_1__))
1045 PRINT_FIELD_HEX_ARRAY(", ", *hdr, reserved_1__);
1047 PRINT_FIELD_U(", ", *hdr, infhygct);
1048 PRINT_FIELD_U(", ", *hdr, infhtotl);
1050 PRINT_FIELD_U(", ", *hdr, infhdln);
1051 PRINT_FIELD_U(", ", *hdr, infmoff);
1052 PRINT_FIELD_U(", ", *hdr, infmlen);
1053 PRINT_FIELD_U(", ", *hdr, infpoff);
1054 PRINT_FIELD_U(", ", *hdr, infplen);
1056 PRINT_FIELD_U(", ", *hdr, infhoff1);
1057 PRINT_FIELD_U(", ", *hdr, infhlen1);
1058 PRINT_FIELD_U(", ", *hdr, infgoff1);
1059 PRINT_FIELD_U(", ", *hdr, infglen1);
1060 PRINT_FIELD_U(", ", *hdr, infhoff2);
1061 PRINT_FIELD_U(", ", *hdr, infhlen2);
1062 PRINT_FIELD_U(", ", *hdr, infgoff2);
1063 PRINT_FIELD_U(", ", *hdr, infglen2);
1064 PRINT_FIELD_U(", ", *hdr, infhoff3);
1065 PRINT_FIELD_U(", ", *hdr, infhlen3);
1066 PRINT_FIELD_U(", ", *hdr, infgoff3);
1067 PRINT_FIELD_U(", ", *hdr, infglen3);
1069 PRINT_UNKNOWN_TAIL(hdr, hdr->infhdln);
1074 STHYI_PRINT_STRUCT(m, machine);
1075 STHYI_PRINT_STRUCT(p, partition);
1077 STHYI_PRINT_HV_STRUCT(h, 1, hypervisor);
1078 STHYI_PRINT_HV_STRUCT(g, 1, guest);
1079 STHYI_PRINT_HV_STRUCT(h, 2, hypervisor);
1080 STHYI_PRINT_HV_STRUCT(g, 2, guest);
1081 STHYI_PRINT_HV_STRUCT(h, 3, hypervisor);
1082 STHYI_PRINT_HV_STRUCT(g, 3, guest);
1088 * Wrapper for the s390 STHYI instruction that provides hypervisor information.
1091 * https://www.ibm.com/support/knowledgecenter/SSB27U_6.4.0/com.ibm.zvm.v640.hcpb4/hcpb4sth.htm
1092 * https://web.archive.org/web/20170306000915/https://www.ibm.com/support/knowledgecenter/SSB27U_6.3.0/com.ibm.zvm.v630.hcpb4/hcpb4sth.htm
1093 * for the instruction documentation.
1095 * The difference in the kernel wrapper is that it doesn't require the 4K
1096 * alignment for the resp_buffer page (as it just copies from the internal
1099 SYS_FUNC(s390_sthyi)
1101 /* in, function ID from s390_sthyi_function_codes */
1102 kernel_ulong_t function_code = tcp->u_arg[0];
1103 /* out, pointer to page-sized buffer */
1104 kernel_ulong_t resp_buffer_ptr = tcp->u_arg[1];
1105 /* out, pointer to u64 containing function result */
1106 kernel_ulong_t return_code_ptr = tcp->u_arg[2];
1107 /* in, should be 0, at the moment */
1108 kernel_ulong_t flags = tcp->u_arg[3];
1110 if (entering(tcp)) {
1111 printxval64(s390_sthyi_function_codes, function_code,
1115 switch (function_code) {
1116 case STHYI_FC_CP_IFL_CAP:
1117 print_sthyi_buf(tcp, resp_buffer_ptr);
1121 printaddr(resp_buffer_ptr);
1125 printnum_int64(tcp, return_code_ptr, "%" PRIu64);
1126 tprintf(", %#" PRI_klx, flags);
1134 * Structures are written based on
1135 * https://www-304.ibm.com/support/docview.wss?uid=isg29c69415c1e82603c852576700058075a&aid=1#page=85
1138 struct guard_storage_control_block {
1141 * Guard Storage Designation
1142 * - Bits 0..J, J == 64-GSC - Guard Storage Origin (GSO)
1143 * - Bits 53..55 - Guard Load Shift (GLS)
1144 * - Bits 58..63 - Guard Storage Characteristic (GSC), this is J from
1145 * the first item, valud values are 25..56.
1148 uint64_t gssm; /**< Guard Storage Section Mask */
1149 uint64_t gs_epl_a; /**< Guard Storage Event Parameter List Address */
1152 struct guard_storage_event_parameter_list {
1155 * Guard Storage Event Addressing Mode
1156 * - 0x40 - Extended addressing mode (E)
1157 * - 0x80 - Basic addressing mode (B)
1161 * Guard Storage Event Cause indication
1162 * - 0x01 - CPU was in transaction execution mode (TX)
1163 * - 0x02 - CPU was in constrained transaction execution mode (CX)
1164 * - 0x80 - Instruction causing the event: 0 - LGG, 1 - LLGFGS
1168 * Guard Storage Event Access Information
1170 * - Bits 1..2 - Address space indication
1171 * - Bits 4..7 - AR number
1175 uint64_t gs_eha; /**< Guard Storage Event Handler Address */
1176 uint64_t gs_eia; /**< Guard Storage Event Instruction Address */
1177 uint64_t gs_eoa; /**< Guard Storage Event Operation Address */
1178 uint64_t gs_eir; /**< Guard Storage Event Intermediate Result */
1179 uint64_t gs_era; /**< Guard Storage Event Return Address */
1183 guard_storage_print_gsepl(struct tcb *tcp, uint64_t addr)
1185 struct guard_storage_event_parameter_list gsepl;
1187 /* Since it is 64-bit even on 31-bit s390... */
1188 if (sizeof(addr) > current_klongsize &&
1189 addr >= (1ULL << (current_klongsize * 8))) {
1190 tprintf("%#" PRIx64, addr);
1195 if (umove_or_printaddr(tcp, addr, &gsepl))
1202 PRINT_FIELD_0X("", gsepl, pad1);
1206 PRINT_FIELD_0X("", gsepl, gs_eam);
1207 tprintf_comment("extended addressing mode: %u, "
1208 "basic addressing mode: %u",
1209 !!(gsepl.gs_eam & 0x2), !!(gsepl.gs_eam & 0x1));
1211 PRINT_FIELD_0X(", ", gsepl, gs_eci);
1212 tprintf_comment("CPU in TX: %u, CPU in CX: %u, instruction: %s",
1213 !!(gsepl.gs_eci & 0x80),
1214 !!(gsepl.gs_eci & 0x40),
1215 gsepl.gs_eci & 0x01 ? "LLGFGS" : "LGG");
1217 PRINT_FIELD_0X(", ", gsepl, gs_eai);
1218 tprintf_comment("DAT: %u, address space indication: %u, "
1220 !!(gsepl.gs_eai & 0x40),
1221 (gsepl.gs_eai >> 4) & 0x3,
1222 gsepl.gs_eai & 0xF);
1225 PRINT_FIELD_0X(", ", gsepl, pad2);
1230 PRINT_FIELD_X("", gsepl, gs_eha);
1233 PRINT_FIELD_X(", ", gsepl, gs_eia);
1234 PRINT_FIELD_X(", ", gsepl, gs_eoa);
1235 PRINT_FIELD_X(", ", gsepl, gs_eir);
1236 PRINT_FIELD_X(", ", gsepl, gs_era);
1244 # define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y))
1247 guard_storage_print_gscb(struct tcb *tcp, kernel_ulong_t addr)
1249 struct guard_storage_control_block gscb;
1251 if (umove_or_printaddr(tcp, addr, &gscb))
1256 if (gscb.reserved) {
1257 PRINT_FIELD_0X("", gscb, reserved);
1261 PRINT_FIELD_0X("", gscb, gsd);
1264 unsigned int gsc = gscb.gsd & 0x3F;
1265 bool gsc_valid = gsc >= 25 && gsc <= 56;
1266 tprintf_comment("GS origin: %#*.*" PRIx64 "%s, "
1267 "guard load shift: %" PRIu64 ", "
1268 "GS characteristic: %u",
1269 gsc_valid ? 2 + DIV_ROUND_UP(64 - gsc, 4) : 0,
1270 gsc_valid ? DIV_ROUND_UP(64 - gsc, 4) : 0,
1271 gsc_valid ? gscb.gsd >> gsc : 0,
1272 gsc_valid ? "" : "[invalid]",
1273 (gscb.gsd >> 8) & 0x7, gsc);
1276 PRINT_FIELD_0X(", ", gscb, gssm);
1278 tprints(", gs_epl_a=");
1279 guard_storage_print_gsepl(tcp, gscb.gs_epl_a);
1284 SYS_FUNC(s390_guarded_storage)
1286 int command = (int) tcp->u_arg[0];
1287 kernel_ulong_t gs_cb = tcp->u_arg[1];
1289 printxval(s390_guarded_storage_commands, command, "GS_???");
1294 case GS_CLEAR_BC_CB:
1300 guard_storage_print_gscb(tcp, gs_cb);
1308 return RVAL_DECODED;
1311 SYS_FUNC(s390_runtime_instr)
1313 int command = (int) tcp->u_arg[0];
1314 int signum = (int) tcp->u_arg[1];
1317 printxval_d(s390_runtime_instr_commands, command,
1318 "S390_RUNTIME_INSTR_???");
1321 * signum is ignored since Linux 4.4, but let's print it for start
1325 case S390_RUNTIME_INSTR_START:
1327 printsignal(signum);
1330 case S390_RUNTIME_INSTR_STOP:
1335 return RVAL_DECODED;
1338 SYS_FUNC(s390_pci_mmio_write)
1340 kernel_ulong_t mmio_addr = tcp->u_arg[0];
1341 kernel_ulong_t user_buf = tcp->u_arg[1];
1342 kernel_ulong_t length = tcp->u_arg[2];
1344 tprintf("%#" PRI_klx ", ", mmio_addr);
1345 printstr_ex(tcp, user_buf, length, QUOTE_FORCE_HEX);
1346 tprintf(", %" PRI_klu, length);
1348 return RVAL_DECODED;
1351 SYS_FUNC(s390_pci_mmio_read)
1353 kernel_ulong_t mmio_addr = tcp->u_arg[0];
1354 kernel_ulong_t user_buf = tcp->u_arg[1];
1355 kernel_ulong_t length = tcp->u_arg[2];
1357 if (entering(tcp)) {
1358 tprintf("%#" PRI_klx ", ", mmio_addr);
1361 printstr_ex(tcp, user_buf, length, QUOTE_FORCE_HEX);
1363 printaddr(user_buf);
1365 tprintf(", %" PRI_klu, length);
1371 #endif /* defined S390 || defined S390X */