---
name: "s390_sthyi"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/s390_sthyi"
---

# s390\_sthyi(2)

emulate STHYI instruction

## NAME

s390\_sthyi - emulate STHYI instruction

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <asm/sthyi.h>        /* Definition of STHYI_* constants */
#include <sys/syscall.h>      /* Definition of SYS_* constants */
#include <unistd.h>
```

**int syscall(SYS\_s390\_sthyi, unsigned long** *function\_code***,**             **void \****resp\_buffer***, uint64\_t \****return\_code***,**             **unsigned long** *flags***);**

*Note*: glibc provides no wrapper for **s390\_sthyi**(), necessitating the use of [**syscall**(2)](/syscall/2.md).

## DESCRIPTION

The **s390\_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.

The *function\_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.

The *resp\_buffer* argument specifies the address of a response buffer. When the *function\_code* is **STHYI\_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.

The *return\_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 about *return\_code*, *function\_code*, and *resp\_buffer*, see the reference given in NOTES.

The *flags* argument is provided to allow for future extensions and currently must be set to 0.

## RETURN VALUE

On success (that is: emulation succeeded), the return value of **s390\_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, and *errno* is set to indicate the error.

## ERRORS

- **EFAULT**

  The value specified in *resp\_buffer* or *return\_code* is not a valid address.

- **EINVAL**

  The value specified in *flags* is nonzero.

- **ENOMEM**

  Allocating memory for handling the CPU capacity information failed.

- **EOPNOTSUPP**

  The value specified in *function\_code* is not valid.

## STANDARDS

Linux on s390.

## HISTORY

Linux 4.15.

## NOTES

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.

## SEE ALSO

[**syscall**(2)](/syscall/2.md)
