Movatterモバイル変換


[0]ホーム

URL:


man7.org > Linux >man-pages

Linux/UNIX system programming training


s390_guarded_storage(2) — Linux manual page

NAME |LIBRARY |SYNOPSIS |DESCRIPTION |RETURN VALUE |ERRORS |STANDARDS |HISTORY |NOTES |SEE ALSO |COLOPHON

s390_guarded_storage(2)    System Calls Manuals390_guarded_storage(2)

NAME        top

       s390_guarded_storage - operations with z/Architecture guarded       storage facility

LIBRARY        top

       Standard C library (libc,-lc)

SYNOPSIS        top

#include <asm/guarded_storage.h>/* Definition ofGS_*constants */#include <sys/syscall.h>/* Definition ofSYS_*constants */#include <unistd.h>int syscall(SYS_s390_guarded_storage, intcommand,struct gs_cb *gs_cb);Note: glibc provides no wrapper fors390_guarded_storage(),       necessitating the use ofsyscall(2).

DESCRIPTION        top

       Thes390_guarded_storage() system call enables the use of the       Guarded Storage Facility (a z/Architecture-specific feature) for       user-space processes.       The guarded storage facility is a hardware feature that allows       marking up to 64 memory regions (as of z14) as guarded; reading a       pointer with a newly introduced "Load Guarded" (LGG) or "Load       Logical and Shift Guarded" (LLGFSG) instructions will cause a       range check on the loaded value and invoke a (previously set up)       user-space handler if one of the guarded regions is affected.       Thecommand argument indicates which function to perform.  The       following commands are supported:GS_ENABLE              Enable the guarded storage facility for the calling task.              The initial content of the guarded storage control block              will be all zeros.  After enablement, user-space code can              use the "Load Guarded Storage Controls" (LGSC) instruction              (or theload_gs_cb() function wrapper provided in theasm/guarded_storage.h header) to load an arbitrary control              block.  While a task is enabled, the kernel will save and              restore the calling content of the guarded storage              registers on context switch.GS_DISABLE              Disables the use of the guarded storage facility for the              calling task.  The kernel will cease to save and restore              the content of the guarded storage registers, the task-              specific content of these registers is lost.GS_SET_BC_CB              Set a broadcast guarded storage control block to the one              provided in thegs_cb argument.  This is called per thread              and associates a specific guarded storage control block              with the calling task.  This control block will be used in              the broadcast commandGS_BROADCAST.GS_CLEAR_BC_CB              Clears the broadcast guarded storage control block.  The              guarded storage control block will no longer have the              association established by theGS_SET_BC_CBcommand.GS_BROADCAST              Sends a broadcast to all thread siblings of the calling              task.  Every sibling that has established a broadcast              guarded storage control block will load this control block              and will be enabled for guarded storage.  The broadcast              guarded storage control block is consumed; a second              broadcast without a refresh of the stored control block              withGS_SET_BC_CBwill not have any effect.       Thegs_cb argument specifies the address of a guarded storage       control block structure and is currently used only by theGS_SET_BC_CBcommand; all other aforementioned commands ignore       this argument.

RETURN VALUE        top

       On success, the return value ofs390_guarded_storage() is 0.       On error, -1 is returned, anderrno is set to indicate the error.

ERRORS        top

EFAULTcommand wasGS_SET_BC_CBand the copying of the guarded              storage control block structure pointed by thegs_cb              argument has failed.EINVALThe value provided in thecommand argument was not valid.ENOMEMcommand was one ofGS_ENABLEorGS_SET_BC_CB, and the              allocation of a new guarded storage control block has              failed.EOPNOTSUPP              The guarded storage facility is not supported by the              hardware.

STANDARDS        top

       Linux on s390.

HISTORY        top

       Linux 4.12.  System z14.

NOTES        top

       The description of the guarded storage facility along with related       instructions and Guarded Storage Control Block and Guarded Storage       Event Parameter List structure layouts is available in       "z/Architecture Principles of Operations" beginning from the       twelfth edition.       Thegs_cb structure has a fieldgsepla (Guarded Storage Event       Parameter List Address), which is a user-space pointer to a       Guarded Storage Event Parameter List structure (that contains the       address of the aforementioned event handler in thegseha field),       and its layout is available as ags_eplstructure type definition       in theasm/guarded_storage.h header.

SEE ALSO        top

syscall(2)

COLOPHON        top

       This page is part of theman-pages (Linux kernel and C library       user-space interface documentation) project.  Information about       the project can be found at        ⟨https://www.kernel.org/doc/man-pages/⟩.  If you have a bug report       for this manual page, see       ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.       This page was obtained from the tarball man-pages-6.15.tar.gz       fetched from       ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on       2025-08-11.  If you discover any rendering problems in this HTML       version of the page, or you believe there is a better or more up-       to-date source for the page, or you have corrections or       improvements to the information in this COLOPHON (which isnot       part of the original manual page), send a mail to       man-pages@man7.orgLinux man-pages 6.15            2025-05-17s390_guarded_storage(2)

Pages that refer to this page:syscalls(2)



HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface.

For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere.

Hosting byjambit GmbH.

Cover of TLPI


[8]ページ先頭

©2009-2025 Movatter.jp