Retrieving STHYI data

LPAR mode z/VM guest KVM guest

Store Hypervisor Information (STHYI) includes information about the IBM Z® hardware, LPAR and, if applicable, the hypervisor host system on which your Linux® instance runs.

STHYI includes, but is not limited to, the following information:
  • The CPU count, by type (CP or IFL)
  • Limitations for shared CPUs
  • CEC and LPAR identifiers
The methods that you can use to retrieve this information differ between Linux in LPAR mode and Linux as a guest operating system of z/VM® or of KVM.
Table 1. Available methods by environment
Method Linux in LPAR mode Linux as a z/VM or KVM guest
STHYI instruction with the GCC inline assembly

For an example, see arch/s390/kernel/sthyi.c in the Linux source tree.

No Yes
qclib

See the readme file of the qclib package for details.

Yes Yes
s390_sthyi() system call

See the man page for details.

Yes No

The return data for both the STHYI instruction and the s390_sthyi() system call matches the content of the STHYI response buffer as described in z/VM: CP Programming Services, SC24-6272. The qclib library provides an API for querying the information. See the readme file of the qclib package about obtaining the API description.

You can find the qclib package and more information about qclib on developerWorks® at www.ibm.com/developerworks/linux/linux390/qclib.html.