2017-11-23 13:45:27 +00:00
|
|
|
.\" Copyright IBM Corp. 2017
|
|
|
|
.\" Author: QingFeng Hao <haoqf@linux.vnet.ibm.com>
|
|
|
|
.\"
|
|
|
|
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
|
|
|
|
.\" This is free documentation; you can redistribute it and/or
|
|
|
|
.\" modify it under the terms of the GNU General Public License as
|
|
|
|
.\" published by the Free Software Foundation; either version 2 of
|
|
|
|
.\" the License, or (at your option) any later version.
|
|
|
|
.\"
|
|
|
|
.\" The GNU General Public License's references to "object code"
|
|
|
|
.\" and "executables" are to be interpreted as the output of any
|
|
|
|
.\" document formatting or typesetting system, including
|
|
|
|
.\" intermediate and printed output.
|
|
|
|
.\"
|
|
|
|
.\" This manual is distributed in the hope that it will be useful,
|
|
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
.\" GNU General Public License for more details.
|
|
|
|
.\"
|
|
|
|
.\" You should have received a copy of the GNU General Public
|
|
|
|
.\" License along with this manual; if not, see
|
|
|
|
.\" <http://www.gnu.org/licenses/>.
|
|
|
|
.\" %%%LICENSE_END
|
|
|
|
.\"
|
getent.1, localedef.1, accept.2, arch_prctl.2, clock_getres.2, clock_nanosleep.2, connect.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, execve.2, getitimer.2, getsockopt.2, gettid.2, inotify_add_watch.2, inotify_init.2, io_submit.2, ioctl.2, lseek.2, madvise.2, mlock.2, mmap.2, mprotect.2, msgctl.2, msgop.2, open_by_handle_at.2, openat2.2, pidfd_open.2, poll.2, prctl.2, quotactl.2, s390_sthyi.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, setns.2, shmctl.2, shmget.2, shmop.2, sigaction.2, stat.2, statx.2, syscalls.2, timer_create.2, timerfd_create.2, unshare.2, wait.2, CPU_SET.3, aio_init.3, atoi.3, des_crypt.3, dirfd.3, fmemopen.3, fopencookie.3, ftok.3, fts.3, getaddrinfo.3, getifaddrs.3, getrpcent.3, gsignal.3, lio_listio.3, nl_langinfo.3, posix_memalign.3, posix_openpt.3, posix_spawn.3, scanf.3, sem_init.3, sem_post.3, shm_open.3, strcmp.3, strftime.3, st.4, elf.5, group.5, proc.5, services.5, aio.7, cgroups.7, feature_test_macros.7, keyrings.7, man-pages.7, namespaces.7, path_resolution.7, sigevent.7, signal.7, socket.7, sysvipc.7, time.7, udp.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 20:07:24 +00:00
|
|
|
.TH S390_STHYI 2 2020-04-11 "Linux Programmer's Manual"
|
2017-11-23 13:45:27 +00:00
|
|
|
.SH NAME
|
|
|
|
s390_sthyi \- emulate STHYI instruction
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
|
|
|
.B #include <asm/unistd.h>
|
|
|
|
.PP
|
dup.2, fallocate.2, futex.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, madvise.2, membarrier.2, mprotect.2, open.2, openat2.2, perf_event_open.2, perfmonctl.2, pipe.2, process_vm_readv.2, s390_pci_mmio_write.2, s390_runtime_instr.2, s390_sthyi.2, set_thread_area.2, sigprocmask.2, subpage_prot.2, unshare.2, cmsg.3, newlocale.3, pthread_setname_np.3, strfmon.3, strfromd.3, tsearch.3, tcp.7, ld.so.8: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-11 05:45:09 +00:00
|
|
|
.BI "int s390_sthyi(unsigned long " function_code ", void *" resp_buffer ","
|
|
|
|
.BI " uint64_t *" return_code ", unsigned long " flags ");"
|
2017-11-23 13:45:27 +00:00
|
|
|
.fi
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The
|
|
|
|
.BR s390_sthyi ()
|
|
|
|
system call emulates the STHYI (Store Hypervisor Information) instruction.
|
2017-12-11 18:43:59 +00:00
|
|
|
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
|
2017-11-23 13:45:27 +00:00
|
|
|
other metrics.
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.I function_code
|
|
|
|
argument indicates which function to perform.
|
|
|
|
The following code(s) are supported:
|
2017-12-11 18:05:18 +00:00
|
|
|
.TP
|
|
|
|
0
|
2017-11-23 13:45:27 +00:00
|
|
|
Return CP (Central Processor) and IFL (Integrated Facility for Linux)
|
|
|
|
capacity information.
|
|
|
|
.PP
|
|
|
|
The
|
2018-02-02 06:40:31 +00:00
|
|
|
.I resp_buffer
|
2017-12-11 18:43:59 +00:00
|
|
|
argument specifies the address of a response buffer.
|
2018-04-14 16:43:46 +00:00
|
|
|
When the
|
|
|
|
.I function_code
|
2018-05-02 11:54:06 +00:00
|
|
|
is 0, the buffer must be one page (4K) in size.
|
2017-12-11 18:43:59 +00:00
|
|
|
If the system call returns 0,
|
|
|
|
the response buffer will be filled with CPU capacity information.
|
|
|
|
Otherwise, the response buffer's content is unchanged.
|
2017-11-23 13:45:27 +00:00
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.I return_code
|
2017-12-11 18:43:59 +00:00
|
|
|
argument stores the return code of the STHYI instruction,
|
|
|
|
using one of the following values:
|
getent.1, localedef.1, clock_nanosleep.2, fcntl.2, getitimer.2, getsockopt.2, inotify_init.2, ioctl.2, mlock.2, mprotect.2, quotactl.2, s390_sthyi.2, semctl.2, shmctl.2, shmget.2, wait.2, CPU_SET.3, aio_init.3, des_crypt.3, fmemopen.3, fopencookie.3, fts.3, getaddrinfo.3, getrpcent.3, lio_listio.3, posix_spawn.3, shm_open.3, st.4, elf.5, group.5, proc.5, services.5, aio.7, feature_test_macros.7, keyrings.7, man-pages.7, sigevent.7, tcp.7, udp.7: Global formatting fix: disfavor nonstandard .TP indents
In many cases, these don't improve readability, and (when stacked)
they sometimes have the side effect of sometimes forcing text
to be justified within a narrow column range.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 13:22:55 +00:00
|
|
|
.TP
|
2017-12-11 18:41:49 +00:00
|
|
|
0
|
2017-12-11 18:05:18 +00:00
|
|
|
Success.
|
|
|
|
.TP
|
2017-12-11 18:41:49 +00:00
|
|
|
4
|
2017-12-11 18:05:18 +00:00
|
|
|
Unsupported function code.
|
|
|
|
.PP
|
|
|
|
For further details about
|
|
|
|
.IR return_code ,
|
|
|
|
.IR function_code ,
|
|
|
|
and
|
2017-12-12 06:33:08 +00:00
|
|
|
.IR resp_buffer ,
|
2017-12-11 18:56:14 +00:00
|
|
|
see the reference given in NOTES.
|
2017-11-23 13:45:27 +00:00
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.I flags
|
|
|
|
argument is provided to allow for future extensions and currently
|
2017-12-11 18:41:49 +00:00
|
|
|
must be set to 0.
|
2017-11-23 13:45:27 +00:00
|
|
|
.SH RETURN VALUE
|
2017-12-11 18:49:27 +00:00
|
|
|
On success (that is: emulation succeeded), the return value of
|
2017-11-23 13:45:27 +00:00
|
|
|
.BR s390_sthyi ()
|
|
|
|
matches the condition code of the STHYI instructions, which is a value
|
2017-12-11 18:49:27 +00:00
|
|
|
in the range [0..3].
|
|
|
|
A return value of 0 indicates that CPU capacity information is stored in
|
2017-12-12 06:33:08 +00:00
|
|
|
.IR *resp_buffer .
|
2017-12-11 18:49:27 +00:00
|
|
|
A return value of 3 indicates "unsupported function code" and the content of
|
2017-12-12 06:33:08 +00:00
|
|
|
.IR *resp_buffer
|
2017-12-11 18:49:27 +00:00
|
|
|
is unchanged.
|
|
|
|
The return values 1 and 2 are reserved.
|
2017-11-23 13:45:27 +00:00
|
|
|
.PP
|
2017-12-11 18:41:49 +00:00
|
|
|
On error, \-1 is returned, and
|
2017-11-23 13:45:27 +00:00
|
|
|
.IR errno
|
|
|
|
is set appropriately.
|
|
|
|
.SH ERRORS
|
|
|
|
.TP
|
|
|
|
.B EFAULT
|
|
|
|
The value specified in
|
2018-02-02 06:40:31 +00:00
|
|
|
.I resp_buffer
|
2017-11-23 13:45:27 +00:00
|
|
|
or
|
|
|
|
.I return_code
|
|
|
|
is not a valid address.
|
|
|
|
.TP
|
2017-12-11 18:51:26 +00:00
|
|
|
.B EINVAL
|
|
|
|
The value specified in
|
|
|
|
.I flags
|
|
|
|
is nonzero.
|
|
|
|
.TP
|
2017-11-23 13:45:27 +00:00
|
|
|
.B ENOMEM
|
|
|
|
Allocating memory for handling the CPU capacity information failed.
|
2017-12-11 18:51:26 +00:00
|
|
|
.TP
|
|
|
|
.B EOPNOTSUPP
|
|
|
|
The value specified in
|
2018-02-02 06:40:31 +00:00
|
|
|
.I function_code
|
2017-12-11 18:51:26 +00:00
|
|
|
is not valid.
|
2017-11-23 13:45:27 +00:00
|
|
|
.SH VERSIONS
|
|
|
|
This system call is available since Linux 4.15.
|
|
|
|
.SH CONFORMING TO
|
|
|
|
This Linux-specific system call is available only on the s390 architecture.
|
|
|
|
.SH NOTES
|
|
|
|
Glibc does not provide a wrapper for this system call, use
|
|
|
|
.BR syscall (2)
|
|
|
|
to call it.
|
2017-12-11 18:56:14 +00:00
|
|
|
.PP
|
|
|
|
For details of the STHYI instruction, see
|
|
|
|
.UR https://www.ibm.com\:/support\:/knowledgecenter\:/SSB27U_6.3.0\:/com.ibm.zvm.v630.hcpb4\:/hcpb4sth.htm
|
2018-04-14 16:43:46 +00:00
|
|
|
the documentation page
|
2017-12-11 18:56:14 +00:00
|
|
|
.UE .
|
2018-04-14 16:43:46 +00:00
|
|
|
.PP
|
|
|
|
When the system call interface is used, the response buffer doesn't
|
|
|
|
have to fulfill alignment requirements described in the STHYI
|
|
|
|
instruction definition.
|
|
|
|
.PP
|
|
|
|
The kernel caches the response (for up to one second, as of Linux 4.16).
|
|
|
|
Subsequent system call invocations may return the cached response.
|
2017-11-23 13:45:27 +00:00
|
|
|
.SH SEE ALSO
|
|
|
|
.BR syscall (2)
|