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.
|
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
|
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
|
1 | Bitstring | 1 | INFPFLG2 | Partition Flag Byte 2 reserved for IBM use |
1 | Bitstring | 2 | INFPVAL1 | Partition Validity Byte 1
|
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. |