.BR "#include <asm/sthyi.h>" " /* Definition of " STHYI_* " constants */"
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
-.PP
+.P
.BI "int syscall(SYS_s390_sthyi, unsigned long " function_code ,
.BI " void *" resp_buffer ", uint64_t *" return_code ,
.BI " unsigned long " flags );
.fi
-.PP
+.P
.IR Note :
glibc provides no wrapper for
.BR s390_sthyi (),
virtualization levels.
This includes CPU type and capacity, as well as the machine model and
other metrics.
-.PP
+.P
The
.I function_code
argument indicates which function to perform.
.B STHYI_FC_CP_IFL_CAP
Return CP (Central Processor) and IFL (Integrated Facility for Linux)
capacity information.
-.PP
+.P
The
.I resp_buffer
argument specifies the address of a response buffer.
If the system call returns 0,
the response buffer will be filled with CPU capacity information.
Otherwise, the response buffer's content is unchanged.
-.PP
+.P
The
.I return_code
argument stores the return code of the STHYI instruction,
.TP
4
Unsupported function code.
-.PP
+.P
For further details about
.IR return_code ,
.IR function_code ,
and
.IR resp_buffer ,
see the reference given in NOTES.
-.PP
+.P
The
.I flags
argument is provided to allow for future extensions and currently
.I *resp_buffer
is unchanged.
The return values 1 and 2 are reserved.
-.PP
+.P
On error, \-1 is returned, and
.I errno
is set to indicate the error.
.UR https://www.ibm.com\:/support\:/knowledgecenter\:/SSB27U_6.3.0\:/com.ibm.zvm.v630.hcpb4\:/hcpb4sth.htm
the documentation page
.UE .
-.PP
+.P
When the system call interface is used, the response buffer doesn't
have to fulfill alignment requirements described in the STHYI
instruction definition.
-.PP
+.P
The kernel caches the response (for up to one second, as of Linux 4.16).
Subsequent system call invocations may return the cached response.
.SH SEE ALSO