Movatterモバイル変換


[0]ホーム

URL:


man7.org > Linux >man-pages

Linux/UNIX system programming training


PR_SVE_SET_VL(2const) — Linux manual page

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

PR_SVE_SET_VL(2const)PR_SVE_SET_VL(2const)

NAME        top

       PR_SVE_SET_VL - set the thread's SVE vector length

LIBRARY        top

       Standard C library (libc,-lc)

SYNOPSIS        top

#include <linux/prctl.h>/* Definition ofPR_*constants */#include <sys/prctl.h>int prctl(PR_SVE_SET_VL, unsigned longval);

DESCRIPTION        top

       Configure the thread's SVE vector length, as specified byval.       The bits ofval corresponding toPR_SVE_VL_LEN_MASKmust be set to       the desired vector length in bytes.  This is interpreted as an       upper bound: the kernel will select the greatest available vector       length that does not exceed the value specified.  In particular,       specifyingSVE_VL_MAX(defined in<asm/sigcontext.h>) for thePR_SVE_VL_LEN_MASKbits requests the maximum supported vector       length.       In addition, the other bits ofval must be set to one of the       following combinations of flags:0LPerform the change immediately.  At the nextexecve(2) in              the thread, the vector length will be reset to the value              configured in/proc/sys/abi/sve_default_vector_length.PR_SVE_VL_INHERIT              Perform the change immediately.  Subsequentexecve(2) calls              will preserve the new vector length.PR_SVE_SET_VL_ONEXEC              Defer the change, so that it is performed at the nextexecve(2) in the thread.  Furtherexecve(2) calls will              reset the vector length to the value configured in/proc/sys/abi/sve_default_vector_length.PR_SVE_SET_VL_ONEXEC | PR_SVE_VL_INHERIT              Defer the change, so that it is performed at the nextexecve(2) in the thread.  Furtherexecve(2) calls will              preserve the new vector length.       In all cases, any previously pending deferred change is canceled.       On success, a nonnegative value is returned that describes theselected configuration.  IfPR_SVE_SET_VL_ONEXECwas included inval, then the configuration described by the return value will       take effect at the nextexecve(2).  Otherwise, the configuration       is already in effect when thePR_SVE_SET_VLcall returns.  In       either case, the value is encoded in the same way as the return       value ofPR_SVE_GET_VL.  Note that there is no explicit flag in       the return value corresponding toPR_SVE_SET_VL_ONEXEC.       The configuration (including any pending deferred change) is       inherited acrossfork(2) andclone(2).

RETURN VALUE        top

       On success,PR_SVE_SET_VLreturns the nonnegative value described       above.  On error, -1 is returned, anderrno is set to indicate the       error.

ERRORS        top

EINVALSVE is not available on this platform.EINVALThe value in the bits ofval corresponding toPR_SVE_VL_LEN_MASKis outside the range [SVE_VL_MIN,SVE_VL_MAX] or is not a multiple of 16.EINVALThe other bits ofval are invalid or unsupported.

FILES        top

/proc/sys/abi/sve_default_vector_length

STANDARDS        top

       Linux.  arm64 only.

HISTORY        top

       Linux 4.15 (arm64).

CAVEATS        top

       Because the compiler or run-time environment may be using SVE,       using this call without thePR_SVE_SET_VL_ONEXECflag may crash       the calling process.  The conditions for using it safely are       complex and system-dependent.  Don't use it unless you really know       what you are doing.

SEE ALSO        top

prctl(2),PR_SVE_GET_VL(2const)       For more information, see the kernel source fileDocumentation/arm64/sve.rst (orDocumentation/arm64/sve.txt before       Linux 5.3).

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-17PR_SVE_SET_VL(2const)

Pages that refer to this page:prctl(2)PR_SVE_GET_VL(2const)



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