Hypervisor information for the virtual server user

The virtual server user can use the emulated Store Hypervisor Information (STHYI) instruction to retrieve information about the IBM Z® hardware and the LPAR on which the KVM host runs.

The information includes:
  • The CPU count, by type (CP or IFL)
  • Limitations for shared CPUs
  • CEC and LPAR identifiers

KVM guests use the qclib and the GCC inline assembly to run the emulated instruction. For an example, see arch/s390/kvm/sthyi.c in the Linux® source tree.

The emulated STHYI instruction provides information through a response buffer with three data sections:
  • The header section, at the beginning of the response buffer, which identifies the locations and length of the sections that follow.
  • The machine section.
  • The partition section.

Header section

Length Data Type Offset (dec) Name Contents
1 Bitstring 0 INFHFLG1 Header Flag Byte 1
These flag settings indicate the environment that the instruction was executed in and may influence the value of the validity bits. The validity bits, and not these flags, should be used to determine if a field is valid.
0x80
Global Performance Data unavailable.
0x40
One or more hypervisor levels below this level does not support the STHYI instruction. When this flag is set the value of INFGPDU is not meaningful because the state of the Global Performance Data setting cannot be determined.
0x20
Virtualization stack is incomplete. This bit indicates one of two cases:
  • One or more hypervisor levels does not support the STHYI instruction. For this case, INFSTHYI will also be set.
  • There were more than three levels of guest/hypervisor information to report.
0x10
Execution environment is not within a logical partition.
1 Bitstring 1 INFHFLG2 Header Flag Byte 2 reserved for IBM® use
1 Bitstring 2 INFHVAL1 Header Validity Byte 1 reserved for IBM use
1 Bitstring 3 INFHVAL2 Header Validity Byte 2 reserved for IBM use
3 4 Reserved for future IBM use
1 Unsigned Binary Integer 7 INFHYGCT Count of Hypervisor and Guest Sections
2 Unsigned Binary Integer 8 INFHTOTL Total length of response buffer
2 Unsigned Binary Integer 10 INFHDLN Length of Header Section mapped by INF0HDR
2 Unsigned Binary Integer 12 INFMOFF Offset to Machine Section mapped by INF0MAC
2 Unsigned Binary Integer 14 INFMLEN Length of Machine Section
2 Unsigned Binary Integer 16 INFPOFF Offset to Partition Section mapped by INF0PAR
2 Unsigned Binary Integer 18 INFPLEN Length of Partition Section
2 Unsigned Binary Integer 20 INFHOFF1 Offset to Hypervisor Section1 mapped by INF0HYP
2 Unsigned Binary Integer 22 INFHLEN1 Length of Hypervisor Section1
2 Unsigned Binary Integer 24 INFGOFF1 Offset to Guest Section1 mapped by INF0GST
2 Unsigned Binary Integer 26 INFGLEN1 Length of Guest Section1
2 Unsigned Binary Integer 28 INFHOFF2 Offset to Hypervisor Section2 mapped by INF0HYP
2 Unsigned Binary Integer 30 INFHLEN2 Length of Hypervisor Section2
2 Unsigned Binary Integer 32 INFGOFF2 Offset to Guest Section2 mapped by INF0GST
2 Unsigned Binary Integer 34 INFGLEN2 Length of Guest Section2
2 Unsigned Binary Integer 36 INFHOFF3 Offset to Hypervisor Section3 mapped by INF0HYP
2 Unsigned Binary Integer 38 INFHLEN3 Length of Hypervisor Section3
2 Unsigned Binary Integer 40 INFGOFF3 Offset to Guest Section3 mapped by INF0GST
2 Unsigned Binary Integer 42 INFGLEN3 Length of Guest Section3
4   44   Reserved for future IBM use

Format machine section

Length Data Type Offset (dec) Name Contents
1 Bitstring 0 INFMFLG1 Machine Flag Byte 1 reserved for IBM use
1 Bitstring 1 INFMFLG2 Machine Flag Byte 2 reserved for IBM use
1 Bitstring 2 INFMVAL1 Machine Validity Byte 1
0x80
Processor Count Validity. When this bit is on, it indicates that INFMSCPS, INFMDCPS, INFMSIFL, and INFMDIFL contain valid counts. The validity bit may be off when:
  • STHYI support is not available on a lower level hypervisor, or
  • Global Performance Data is not enabled.
0x40
Machine ID Validity. This bit being on indicates that a SYSIB 1.1.1 was obtained from STSI and information reported in the following fields is valid: INFMTYPE, INFMMANU, INFMSEQ, and INFMPMAN.
0x20
Machine Name Validity. This bit being on indicates that the INFMNAME field is valid.
1 Bitstring 3 INFMVAL2 Machine Validity Byte 2 reserved for IBM use
2 Unsigned Binary Integer 4 INFMSCPS Number of shared CPs configured in the machine or in the physical partition if the system is physically partitioned
2 Unsigned Binary Integer 6 INFMDCPS Number of dedicated CPs configured in this machine or in the physical partition if the system is physically partitioned
2 Unsigned Binary Integer 8 INFMSIFL Number of shared IFLs configured in this machine or in the physical partition if the system is physically partitioned.
2 Unsigned Binary Integer 10 INFMDIFL Number of dedicated IFLs configured in this machine or in the physical partition if the system is physically partitioned.
8 EBCDIC 12 INFMNAME Machine Name
4 EBCDIC 20 INFMTYPE Type
16 EBCDIC 24 INFMMANU Manufacturer
16 EBCDIC 40 INFMSEQ Sequence Code
4 EBCDIC 56 INFMPMAN Plant of Manufacture
4   60   Reserved for future IBM use

Format partition section

Length Data Type Offset (dec) Name Contents
1 Bitstring 0 INFPFLG1 Partition Flag Byte 1
0x80
Multithreading (MT) is enabled.
1 Bitstring 1 INFPFLG2 Partition Flag Byte 2 reserved for IBM use
1 Bitstring 2 INFPVAL1 Partition Validity Byte 1
0x80
This bit being on indicates that INFPSCPS, INFPDCPS, INFPSIFL, and INFPDIFL contain valid counts.
0x40
This bit being on indicates that INFPWBCP and INFPWBIF are valid
0x20
This bit being on indicates that INFPABCP and INFPABIF are valid.
0x10
This bit being on indicates that a SYSIB 2.2.2 was obtained from STSI and information reported in the following fields is valid: INFPPNUM and INFPPNAM.
0x08
This bit being on indicates that INFPLGNM, INFPLGCP, and INFPLGIF are valid.
1 Bitstring 3 INFPVAL2 Partition Validity Byte 2 reserved for IBM use
2 Unsigned Binary Integer 4 INFPPNUM Logical partition number
2 Unsigned Binary Integer 6 INFPSCPS Number of shared logical CPs configured for this partition. Count of cores when MT is enabled.
2 Unsigned Binary Integer 8 INFPDCPS Number of dedicated logical CPs configured for this partition. Count of cores when MT is enabled.
2 Unsigned Binary Integer 10 INFPSIFL Number of shared logical IFLs configured for this partition. Count of cores when MT is enabled.
2 Unsigned Binary Integer 12 INFPDIFL Number of dedicated logical IFLs configured for this partition. Count of cores when MT is enabled.
2 14 Reserved for future IBM use
8 EBCIDIC 16 INFPPNAM Logical partition name
4 Unsigned Binary Integer 24 INFPWBCP Partition weight-based capped capacity for CPs, a scaled number where X'00010000' represents one core. Zero if not capped.
4 Unsigned Binary Integer 28 INFPABCP Partition absolute capped capacity for CPs, a scaled number where X'00010000' represents one core. Zero if not capped.
4 Unsigned Binary Integer 32 INFPWBIF Partition weight-based capped capacity for IFLs, a scaled number where X'00010000' represents one core. Zero if not capped.
4 Unsigned Binary Integer 36 INFPABIF Partition absolute capped capacity for IFLs, a scaled number where X'00010000' represents one core. Zero if not capped.
8 EBCIDIC 40 INFPLGNM LPAR group name. Binary zeros when the partition is not in an LPAR group. EBCDIC and padded with blanks on the right when in a group. The group name is reported only when there is a group cap on CP or IFL CPU types and the partition has the capped CPU type.
4 Unsigned Binary Integer 48 INFPLGCP LPAR group absolute capacity value for CP CPU type when nonzero. This field will be nonzero only when INFPLGNM is nonzero and a cap is defined for the LPAR group for the CP CPU type. When nonzero, contains a scaled number where X'00010000' represents one core.
4 Unsigned Binary Integer 52 INFPLGIF LPAR group absolute capacity value for IFL CPU type when nonzero. This field will be nonzero only when INFPLGNM is nonzero and a cap is defined for the LPAR group for the IFL CPU type. When nonzero, contains a scaled number where X'00010000' represents one core.