NAME |LIBRARY |SYNOPSIS |DESCRIPTION |RETURN VALUE |ERRORS |STANDARDS |HISTORY |NOTES |SEE ALSO |COLOPHON | |
s390_sthyi(2) System Calls Manuals390_sthyi(2)s390_sthyi - emulate STHYI instruction
Standard C library (libc,-lc)
#include <asm/sthyi.h>/* Definition ofSTHYI_*constants */#include <sys/syscall.h>/* Definition ofSYS_*constants */#include <unistd.h>int syscall(SYS_s390_sthyi, unsigned longfunction_code,void *resp_buffer, uint64_t *return_code,unsigned longflags);Note: glibc provides no wrapper fors390_sthyi(), necessitating the use ofsyscall(2).
Thes390_sthyi() system call emulates the STHYI (Store Hypervisor Information) instruction. It provides hardware resource information for the machine and its virtualization levels. This includes CPU type and capacity, as well as the machine model and other metrics. Thefunction_code argument indicates which function to perform. The following code(s) are supported:STHYI_FC_CP_IFL_CAP Return CP (Central Processor) and IFL (Integrated Facility for Linux) capacity information. Theresp_buffer argument specifies the address of a response buffer. When thefunction_code isSTHYI_FC_CP_IFL_CAP, the buffer must be one page (4K) in size. If the system call returns 0, the response buffer will be filled with CPU capacity information. Otherwise, the response buffer's content is unchanged. Thereturn_code argument stores the return code of the STHYI instruction, using one of the following values: 0 Success. 4 Unsupported function code. For further details aboutreturn_code,function_code, andresp_buffer, see the reference given in NOTES. Theflags argument is provided to allow for future extensions and currently must be set to 0.
On success (that is: emulation succeeded), the return value ofs390_sthyi() matches the condition code of the STHYI instructions, which is a value in the range [0..3]. A return value of 0 indicates that CPU capacity information is stored in*resp_buffer. A return value of 3 indicates "unsupported function code" and the content of*resp_buffer is unchanged. The return values 1 and 2 are reserved. On error, -1 is returned, anderrno is set to indicate the error.
EFAULTThe value specified inresp_buffer orreturn_code is not a valid address.EINVALThe value specified inflags is nonzero.ENOMEMAllocating memory for handling the CPU capacity information failed.EOPNOTSUPP The value specified infunction_code is not valid.
Linux on s390.
Linux 4.15.
For details of the STHYI instruction, see the documentation page ⟨https://www.ibm.com/support/knowledgecenter/SSB27U_6.3.0/com.ibm.zvm.v630.hcpb4/hcpb4sth.htm⟩. When the system call interface is used, the response buffer doesn't have to fulfill alignment requirements described in the STHYI instruction definition. The kernel caches the response (for up to one second, as of Linux 4.16). Subsequent system call invocations may return the cached response.
syscall(2)
This page is part of theman-pages (Linux kernel and C library user-space interface documentation) project. Information about the project can be found at ⟨https://www.kernel.org/doc/man-pages/⟩. If you have a bug report for this manual page, see ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩. This page was obtained from the tarball man-pages-6.15.tar.gz fetched from ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on 2025-08-11. If you discover any rendering problems in this HTML version of the page, or you believe there is a better or more up- to-date source for the page, or you have corrections or improvements to the information in this COLOPHON (which isnot part of the original manual page), send a mail to man-pages@man7.orgLinux man-pages 6.15 2025-05-17s390_sthyi(2)Pages that refer to this page:syscalls(2)
HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface. For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere. Hosting byjambit GmbH. | ![]() |