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, iconv.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, pldd.1, sprof.1, time.1, _syscall.2, accept.2, add_key.2, adjtimex.2, bind.2, bpf.2, capget.2, chown.2, chroot.2, clock_getres.2, clone.2, connect.2, copy_file_range.2, epoll_ctl.2, epoll_wait.2, eventfd.2, fanotify_init.2, fanotify_mark.2, fcntl.2, fsync.2, futex.2, getcpu.2, getdents.2, getgid.2, getgroups.2, getpid.2, gettid.2, gettimeofday.2, getuid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, ioctl_fat.2, ioctl_ns.2, ioctl_userfaultfd.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, listxattr.2, lseek.2, madvise.2, memfd_create.2, migrate_pages.2, mount.2, mprotect.2, mremap.2, msgctl.2, msgop.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, pipe.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, readahead.2, readdir.2, readlink.2, reboot.2, recvmmsg.2, removexattr.2, rename.2, request_key.2, s390_guarded_storage.2, s390_runtime_instr.2, s390_sthyi.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, seccomp.2, select.2, select_tut.2, semctl.2, sendmmsg.2, set_thread_area.2, setgid.2, setns.2, setuid.2, setxattr.2, shmctl.2, sigaction.2, signalfd.2, sigsuspend.2, socket.2, socketpair.2, spu_run.2, stat.2, statx.2, subpage_prot.2, syscalls.2, sysctl.2, tee.2, timer_create.2, timerfd_create.2, truncate.2, uname.2, unshare.2, userfaultfd.2, ustat.2, vmsplice.2, write.2, CPU_SET.3, __ppc_get_timebase.3, alloca.3, argz_add.3, asprintf.3, backtrace.3, basename.3, bsd_signal.3, bstring.3, bswap.3, bzero.3, cacos.3, cacosh.3, catan.3, catanh.3, catgets.3, clock_getcpuclockid.3, cmsg.3, confstr.3, ctermid.3, ctime.3, des_crypt.3, dl_iterate_phdr.3, dlinfo.3, dlsym.3, duplocale.3, end.3, endian.3, errno.3, exec.3, exit.3, ferror.3, fgetws.3, fmemopen.3, fnmatch.3, fopencookie.3, fputws.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrouplist.3, getifaddrs.3, getline.3, getlogin.3, getmntent.3, getnameinfo.3, getopt.3, getpass.3, getprotoent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, index.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, isatty.3, iswblank.3, iswspace.3, lockf.3, makecontext.3, mallinfo.3, malloc.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbrtowc.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memchr.3, mq_getattr.3, mq_notify.3, newlocale.3, nl_langinfo.3, offsetof.3, perror.3, posix_spawn.3, printf.3, pthread_attr_init.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_mutexattr_setrobust.3, pthread_rwlockattr_setkind_np.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, putenv.3, qsort.3, rand.3, random.3, readdir.3, regex.3, resolver.3, rpmatch.3, rtime.3, scanf.3, sem_wait.3, setaliasent.3, setbuf.3, stpcpy.3, stpncpy.3, strcat.3, strchr.3, strcmp.3, strcpy.3, strdup.3, strerror.3, strfromd.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strsep.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, system.3, termios.3, trunc.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscat.3, wcscpy.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wcsstr.3, wcstok.3, wcstombs.3, wcwidth.3, wprintf.3, xcrypt.3, console_codes.4, dsp56k.4, full.4, initrd.4, lirc.4, loop.4, st.4, tty.4, vcs.4, charmap.5, core.5, host.conf.5, locale.5, proc.5, repertoiremap.5, resolv.conf.5, termcap.5, tmpfs.5, tzfile.5, aio.7, capabilities.7, cgroup_namespaces.7, cgroups.7, charsets.7, complex.7, epoll.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, locale.7, man-pages.7, man.7, namespaces.7, pid_namespaces.7, pkeys.7, pthreads.7, rtld-audit.7, sched.7, signal.7, sock_diag.7, socket.7, tcp.7, udp.7, unicode.7, user_namespaces.7, utf-8.7, zdump.8, zic.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-03-06 14:11:03 +00:00
|
|
|
.TH S390_STHYI 2 2019-03-06 "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
|
2017-12-12 06:33:08 +00:00
|
|
|
.BI "int s390_sthyi(unsigned long " function_code ", void *" resp_buffer ",
|
2017-11-23 13:45:27 +00:00
|
|
|
.BI " uint64_t *" return_code ", unsigned long " flags ");
|
|
|
|
.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:
|
2017-12-11 18:05:18 +00:00
|
|
|
.TP 8
|
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)
|