sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/arch/arm64/svemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/arch/arm64/svemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/arch/arm64/svemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/arch/arm64/svemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/arch/arm64/svemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/sp_SP/arch/arm64/svemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h3Scalable Vector Extension support for AArch64 Linuxh]h3Scalable Vector Extension support for AArch64 Linux}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhh](hAuthor: Dave Martin <}(hhhhhNhNubh reference)}(hDave.Martin@arm.comh]hDave.Martin@arm.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:Dave.Martin@arm.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hDate: 4 August 2017h]hDate: 4 August 2017}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThis document outlines briefly the interface provided to userspace by Linux in order to support use of the ARM Scalable Vector Extension (SVE), including interactions with Streaming SVE mode added by the Scalable Matrix Extension (SME).h]hThis document outlines briefly the interface provided to userspace by Linux in order to support use of the ARM Scalable Vector Extension (SVE), including interactions with Streaming SVE mode added by the Scalable Matrix Extension (SME).}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hdThis is an outline of the most important features and issues only and not intended to be exhaustive.h]hdThis is an outline of the most important features and issues only and not intended to be exhaustive.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThis document does not aim to describe the SVE architecture or programmer's model. To aid understanding, a minimal description of relevant programmer's model features for SVE is included in Appendix A.h]hThis document does not aim to describe the SVE architecture or programmer’s model. To aid understanding, a minimal description of relevant programmer’s model features for SVE is included in Appendix A.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h 1. Generalh]h 1. General}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh bullet_list)}(hhh](h list_item)}(haSVE registers Z0..Z31, P0..P15 and FFR and the current vector length VL, are tracked per-thread. h]h)}(h`SVE registers Z0..Z31, P0..P15 and FFR and the current vector length VL, are tracked per-thread.h]h`SVE registers Z0..Z31, P0..P15 and FFR and the current vector length VL, are tracked per-thread.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj-ubah}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(hIn streaming mode FFR is not accessible unless HWCAP2_SME_FA64 is present in the system, when it is not supported and these interfaces are used to access streaming mode FFR is read and written as zero. h]h)}(hIn streaming mode FFR is not accessible unless HWCAP2_SME_FA64 is present in the system, when it is not supported and these interfaces are used to access streaming mode FFR is read and written as zero.h]hIn streaming mode FFR is not accessible unless HWCAP2_SME_FA64 is present in the system, when it is not supported and these interfaces are used to access streaming mode FFR is read and written as zero.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEubah}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(hX!The presence of SVE is reported to userspace via HWCAP_SVE in the aux vector AT_HWCAP entry. Presence of this flag implies the presence of the SVE instructions and registers, and the Linux-specific system interfaces described in this document. SVE is reported in /proc/cpuinfo as "sve". h]h)}(hX The presence of SVE is reported to userspace via HWCAP_SVE in the aux vector AT_HWCAP entry. Presence of this flag implies the presence of the SVE instructions and registers, and the Linux-specific system interfaces described in this document. SVE is reported in /proc/cpuinfo as "sve".h]hX$The presence of SVE is reported to userspace via HWCAP_SVE in the aux vector AT_HWCAP entry. Presence of this flag implies the presence of the SVE instructions and registers, and the Linux-specific system interfaces described in this document. SVE is reported in /proc/cpuinfo as “sve”.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hj]ubah}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(hXSupport for the execution of SVE instructions in userspace can also be detected by reading the CPU ID register ID_AA64PFR0_EL1 using an MRS instruction, and checking that the value of the SVE field is nonzero. [3] It does not guarantee the presence of the system interfaces described in the following sections: software that needs to verify that those interfaces are present must check for HWCAP_SVE instead. h](h)}(hSupport for the execution of SVE instructions in userspace can also be detected by reading the CPU ID register ID_AA64PFR0_EL1 using an MRS instruction, and checking that the value of the SVE field is nonzero. [3]h]hSupport for the execution of SVE instructions in userspace can also be detected by reading the CPU ID register ID_AA64PFR0_EL1 using an MRS instruction, and checking that the value of the SVE field is nonzero. [3]}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjuubh)}(hIt does not guarantee the presence of the system interfaces described in the following sections: software that needs to verify that those interfaces are present must check for HWCAP_SVE instead.h]hIt does not guarantee the presence of the system interfaces described in the following sections: software that needs to verify that those interfaces are present must check for HWCAP_SVE instead.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjuubeh}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(hXaOn hardware that supports the SVE2 extensions, HWCAP2_SVE2 will also be reported in the AT_HWCAP2 aux vector entry. In addition to this, optional extensions to SVE2 may be reported by the presence of: HWCAP2_SVE2 HWCAP2_SVEAES HWCAP2_SVEPMULL HWCAP2_SVEBITPERM HWCAP2_SVESHA3 HWCAP2_SVESM4 HWCAP2_SVE2P1 This list may be extended over time as the SVE architecture evolves. These extensions are also reported via the CPU ID register ID_AA64ZFR0_EL1, which userspace can read using an MRS instruction. See elf_hwcaps.txt and cpu-feature-registers.txt for details. h](h)}(hOn hardware that supports the SVE2 extensions, HWCAP2_SVE2 will also be reported in the AT_HWCAP2 aux vector entry. In addition to this, optional extensions to SVE2 may be reported by the presence of:h]hOn hardware that supports the SVE2 extensions, HWCAP2_SVE2 will also be reported in the AT_HWCAP2 aux vector entry. In addition to this, optional extensions to SVE2 may be reported by the presence of:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubh block_quote)}(hgHWCAP2_SVE2 HWCAP2_SVEAES HWCAP2_SVEPMULL HWCAP2_SVEBITPERM HWCAP2_SVESHA3 HWCAP2_SVESM4 HWCAP2_SVE2P1 h]h)}(hfHWCAP2_SVE2 HWCAP2_SVEAES HWCAP2_SVEPMULL HWCAP2_SVEBITPERM HWCAP2_SVESHA3 HWCAP2_SVESM4 HWCAP2_SVE2P1h]hfHWCAP2_SVE2 HWCAP2_SVEAES HWCAP2_SVEPMULL HWCAP2_SVEBITPERM HWCAP2_SVESHA3 HWCAP2_SVESM4 HWCAP2_SVE2P1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhhhK1hjubh)}(hDThis list may be extended over time as the SVE architecture evolves.h]hDThis list may be extended over time as the SVE architecture evolves.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjubh)}(hThese extensions are also reported via the CPU ID register ID_AA64ZFR0_EL1, which userspace can read using an MRS instruction. See elf_hwcaps.txt and cpu-feature-registers.txt for details.h]hThese extensions are also reported via the CPU ID register ID_AA64ZFR0_EL1, which userspace can read using an MRS instruction. See elf_hwcaps.txt and cpu-feature-registers.txt for details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubeh}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(hX+On hardware that supports the SME extensions, HWCAP2_SME will also be reported in the AT_HWCAP2 aux vector entry. Among other things SME adds streaming mode which provides a subset of the SVE feature set using a separate SME vector length and the same Z/V registers. See sme.rst for more details. h]h)}(hX*On hardware that supports the SME extensions, HWCAP2_SME will also be reported in the AT_HWCAP2 aux vector entry. Among other things SME adds streaming mode which provides a subset of the SVE feature set using a separate SME vector length and the same Z/V registers. See sme.rst for more details.h]hX*On hardware that supports the SME extensions, HWCAP2_SME will also be reported in the AT_HWCAP2 aux vector entry. Among other things SME adds streaming mode which provides a subset of the SVE feature set using a separate SME vector length and the same Z/V registers. See sme.rst for more details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjubah}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(hXDebuggers should restrict themselves to interacting with the target via the NT_ARM_SVE regset. The recommended way of detecting support for this regset is to connect to a target process first and then attempt a ptrace(PTRACE_GETREGSET, pid, NT_ARM_SVE, &iov). Note that when SME is present and streaming SVE mode is in use the FPSIMD subset of registers will be read via NT_ARM_SVE and NT_ARM_SVE writes will exit streaming mode in the target. h]h)}(hXDebuggers should restrict themselves to interacting with the target via the NT_ARM_SVE regset. The recommended way of detecting support for this regset is to connect to a target process first and then attempt a ptrace(PTRACE_GETREGSET, pid, NT_ARM_SVE, &iov). Note that when SME is present and streaming SVE mode is in use the FPSIMD subset of registers will be read via NT_ARM_SVE and NT_ARM_SVE writes will exit streaming mode in the target.h]hXDebuggers should restrict themselves to interacting with the target via the NT_ARM_SVE regset. The recommended way of detecting support for this regset is to connect to a target process first and then attempt a ptrace(PTRACE_GETREGSET, pid, NT_ARM_SVE, &iov). Note that when SME is present and streaming SVE mode is in use the FPSIMD subset of registers will be read via NT_ARM_SVE and NT_ARM_SVE writes will exit streaming mode in the target.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhjubah}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubj,)}(hXWhenever SVE scalable register values (Zn, Pn, FFR) are exchanged in memory between userspace and the kernel, the register value is encoded in memory in an endianness-invariant layout, with bits [(8 * i + 7) : (8 * i)] encoded at byte offset i from the start of the memory representation. This affects for example the signal frame (struct sve_context) and ptrace interface (struct user_sve_header) and associated data. Beware that on big-endian systems this results in a different byte order than for the FPSIMD V-registers, which are stored as single host-endian 128-bit values, with bits [(127 - 8 * i) : (120 - 8 * i)] of the register encoded at byte offset i. (struct fpsimd_context, struct user_fpsimd_state). h](h)}(hXWhenever SVE scalable register values (Zn, Pn, FFR) are exchanged in memory between userspace and the kernel, the register value is encoded in memory in an endianness-invariant layout, with bits [(8 * i + 7) : (8 * i)] encoded at byte offset i from the start of the memory representation. This affects for example the signal frame (struct sve_context) and ptrace interface (struct user_sve_header) and associated data.h]hXWhenever SVE scalable register values (Zn, Pn, FFR) are exchanged in memory between userspace and the kernel, the register value is encoded in memory in an endianness-invariant layout, with bits [(8 * i + 7) : (8 * i)] encoded at byte offset i from the start of the memory representation. This affects for example the signal frame (struct sve_context) and ptrace interface (struct user_sve_header) and associated data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjubh)}(hX(Beware that on big-endian systems this results in a different byte order than for the FPSIMD V-registers, which are stored as single host-endian 128-bit values, with bits [(127 - 8 * i) : (120 - 8 * i)] of the register encoded at byte offset i. (struct fpsimd_context, struct user_fpsimd_state).h]hX(Beware that on big-endian systems this results in a different byte order than for the FPSIMD V-registers, which are stored as single host-endian 128-bit values, with bits [(127 - 8 * i) : (120 - 8 * i)] of the register encoded at byte offset i. (struct fpsimd_context, struct user_fpsimd_state).}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjubeh}(h]h ]h"]h$]h&]uh1j+hj(hhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1j&hhhKhjhhubeh}(h]generalah ]h"] 1. generalah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h2. Vector length terminologyh]h2. Vector length terminology}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhhhhhK[ubh)}(hMThe size of an SVE vector (Z) register is referred to as the "vector length".h]hQThe size of an SVE vector (Z) register is referred to as the “vector length”.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjOhhubh)}(hnTo avoid confusion about the units used to express vector length, the kernel adopts the following conventions:h]hnTo avoid confusion about the units used to express vector length, the kernel adopts the following conventions:}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjOhhubj')}(hhh](j,)}(h3Vector length (VL) = size of a Z-register in bytes h]h)}(h2Vector length (VL) = size of a Z-register in bytesh]h2Vector length (VL) = size of a Z-register in bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjubah}(h]h ]h"]h$]h&]uh1j+hj|hhhhhNubj,)}(hBVector quadwords (VQ) = size of a Z-register in units of 128 bits h]h)}(hAVector quadwords (VQ) = size of a Z-register in units of 128 bitsh]hAVector quadwords (VQ) = size of a Z-register in units of 128 bits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1j+hj|hhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhKbhjOhhubh)}(h(So, VL = 16 * VQ.)h]h(So, VL = 16 * VQ.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjOhhubh)}(hXThe VQ convention is used where the underlying granularity is important, such as in data structure definitions. In most other situations, the VL convention is used. This is consistent with the meaning of the "VL" pseudo-register in the SVE instruction set architecture.h]hXThe VQ convention is used where the underlying granularity is important, such as in data structure definitions. In most other situations, the VL convention is used. This is consistent with the meaning of the “VL” pseudo-register in the SVE instruction set architecture.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjOhhubeh}(h]vector-length-terminologyah ]h"]2. vector length terminologyah$]h&]uh1hhhhhhhhK[ubh)}(hhh](h)}(h3. System call behaviourh]h3. System call behaviour}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKoubj')}(hhh](j,)}(hOn syscall, V0..V31 are preserved (as without SVE). Thus, bits [127:0] of Z0..Z31 are preserved. All other bits of Z0..Z31, and all of P0..P15 and FFR become zero on return from a syscall. h]h)}(hOn syscall, V0..V31 are preserved (as without SVE). Thus, bits [127:0] of Z0..Z31 are preserved. All other bits of Z0..Z31, and all of P0..P15 and FFR become zero on return from a syscall.h]hOn syscall, V0..V31 are preserved (as without SVE). Thus, bits [127:0] of Z0..Z31 are preserved. All other bits of Z0..Z31, and all of P0..P15 and FFR become zero on return from a syscall.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hYThe SVE registers are not used to pass arguments to or receive results from any syscall. h]h)}(hXThe SVE registers are not used to pass arguments to or receive results from any syscall.h]hXThe SVE registers are not used to pass arguments to or receive results from any syscall.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hXAll other SVE state of a thread, including the currently configured vector length, the state of the PR_SVE_VL_INHERIT flag, and the deferred vector length (if any), is preserved across all syscalls, subject to the specific exceptions for execve() described in section 6. In particular, on return from a fork() or clone(), the parent and new child process or thread share identical SVE configuration, matching that of the parent before the call. h](h)}(hXAll other SVE state of a thread, including the currently configured vector length, the state of the PR_SVE_VL_INHERIT flag, and the deferred vector length (if any), is preserved across all syscalls, subject to the specific exceptions for execve() described in section 6.h]hXAll other SVE state of a thread, including the currently configured vector length, the state of the PR_SVE_VL_INHERIT flag, and the deferred vector length (if any), is preserved across all syscalls, subject to the specific exceptions for execve() described in section 6.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjubh)}(hIn particular, on return from a fork() or clone(), the parent and new child process or thread share identical SVE configuration, matching that of the parent before the call.h]hIn particular, on return from a fork() or clone(), the parent and new child process or thread share identical SVE configuration, matching that of the parent before the call.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hjubeh}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhKqhjhhubeh}(h]system-call-behaviourah ]h"]3. system call behaviourah$]h&]uh1hhhhhhhhKoubh)}(hhh](h)}(h4. Signal handlingh]h4. Signal handling}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhhhhhKubj')}(hhh](j,)}(hXA new signal frame record sve_context encodes the SVE registers on signal delivery. [1] h]h)}(hWA new signal frame record sve_context encodes the SVE registers on signal delivery. [1]h]hWA new signal frame record sve_context encodes the SVE registers on signal delivery. [1]}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjeubah}(h]h ]h"]h$]h&]uh1j+hjbhhhhhNubj,)}(hThis record is supplementary to fpsimd_context. The FPSR and FPCR registers are only present in fpsimd_context. For convenience, the content of V0..V31 is duplicated between sve_context and fpsimd_context. h]h)}(hThis record is supplementary to fpsimd_context. The FPSR and FPCR registers are only present in fpsimd_context. For convenience, the content of V0..V31 is duplicated between sve_context and fpsimd_context.h]hThis record is supplementary to fpsimd_context. The FPSR and FPCR registers are only present in fpsimd_context. For convenience, the content of V0..V31 is duplicated between sve_context and fpsimd_context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj}ubah}(h]h ]h"]h$]h&]uh1j+hjbhhhhhNubj,)}(hThe record contains a flag field which includes a flag SVE_SIG_FLAG_SM which if set indicates that the thread is in streaming mode and the vector length and register data (if present) describe the streaming SVE data and vector length. h]h)}(hThe record contains a flag field which includes a flag SVE_SIG_FLAG_SM which if set indicates that the thread is in streaming mode and the vector length and register data (if present) describe the streaming SVE data and vector length.h]hThe record contains a flag field which includes a flag SVE_SIG_FLAG_SM which if set indicates that the thread is in streaming mode and the vector length and register data (if present) describe the streaming SVE data and vector length.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjbhhhhhNubj,)}(h~The signal frame record for SVE always contains basic metadata, in particular the thread's vector length (in sve_context.vl). h]h)}(h}The signal frame record for SVE always contains basic metadata, in particular the thread's vector length (in sve_context.vl).h]hThe signal frame record for SVE always contains basic metadata, in particular the thread’s vector length (in sve_context.vl).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjbhhhhhNubj,)}(hThe SVE registers may or may not be included in the record, depending on whether the registers are live for the thread. The registers are present if and only if: sve_context.head.size >= SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)). h]h)}(hThe SVE registers may or may not be included in the record, depending on whether the registers are live for the thread. The registers are present if and only if: sve_context.head.size >= SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)).h]hThe SVE registers may or may not be included in the record, depending on whether the registers are live for the thread. The registers are present if and only if: sve_context.head.size >= SVE_SIG_CONTEXT_SIZE(sve_vq_from_vl(sve_context.vl)).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjbhhhhhNubj,)}(hIf the registers are present, the remainder of the record has a vl-dependent size and layout. Macros SVE_SIG_* are defined [1] to facilitate access to the members. h]h)}(hIf the registers are present, the remainder of the record has a vl-dependent size and layout. Macros SVE_SIG_* are defined [1] to facilitate access to the members.h]hIf the registers are present, the remainder of the record has a vl-dependent size and layout. Macros SVE_SIG_* are defined [1] to facilitate access to the members.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjbhhhhhNubj,)}(hEach scalable register (Zn, Pn, FFR) is stored in an endianness-invariant layout, with bits [(8 * i + 7) : (8 * i)] stored at byte offset i from the start of the register's representation in memory. h]h)}(hEach scalable register (Zn, Pn, FFR) is stored in an endianness-invariant layout, with bits [(8 * i + 7) : (8 * i)] stored at byte offset i from the start of the register's representation in memory.h]hEach scalable register (Zn, Pn, FFR) is stored in an endianness-invariant layout, with bits [(8 * i + 7) : (8 * i)] stored at byte offset i from the start of the register’s representation in memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjbhhhhhNubj,)}(hX"If the SVE context is too big to fit in sigcontext.__reserved[], then extra space is allocated on the stack, an extra_context record is written in __reserved[] referencing this space. sve_context is then written in the extra space. Refer to [1] for further details about this mechanism. h]h)}(hX If the SVE context is too big to fit in sigcontext.__reserved[], then extra space is allocated on the stack, an extra_context record is written in __reserved[] referencing this space. sve_context is then written in the extra space. Refer to [1] for further details about this mechanism.h]hX If the SVE context is too big to fit in sigcontext.__reserved[], then extra space is allocated on the stack, an extra_context record is written in __reserved[] referencing this space. sve_context is then written in the extra space. Refer to [1] for further details about this mechanism.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j+hjbhhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhKhjQhhubeh}(h]signal-handlingah ]h"]4. signal handlingah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h5. Signal returnh]h5. Signal return}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhKubh)}(h%When returning from a signal handler:h]h%When returning from a signal handler:}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3hhubj')}(hhh](j,)}(hIf there is no sve_context record in the signal frame, or if the record is present but contains no register data as described in the previous section, then the SVE registers/bits become non-live and take unspecified values. h]h)}(hIf there is no sve_context record in the signal frame, or if the record is present but contains no register data as described in the previous section, then the SVE registers/bits become non-live and take unspecified values.h]hIf there is no sve_context record in the signal frame, or if the record is present but contains no register data as described in the previous section, then the SVE registers/bits become non-live and take unspecified values.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjUubah}(h]h ]h"]h$]h&]uh1j+hjRhhhhhNubj,)}(hXxIf sve_context is present in the signal frame and contains full register data, the SVE registers become live and are populated with the specified data. However, for backward compatibility reasons, bits [127:0] of Z0..Z31 are always restored from the corresponding members of fpsimd_context.vregs[] and not from sve_context. The remaining bits are restored from sve_context. h]h)}(hXwIf sve_context is present in the signal frame and contains full register data, the SVE registers become live and are populated with the specified data. However, for backward compatibility reasons, bits [127:0] of Z0..Z31 are always restored from the corresponding members of fpsimd_context.vregs[] and not from sve_context. The remaining bits are restored from sve_context.h]hXwIf sve_context is present in the signal frame and contains full register data, the SVE registers become live and are populated with the specified data. However, for backward compatibility reasons, bits [127:0] of Z0..Z31 are always restored from the corresponding members of fpsimd_context.vregs[] and not from sve_context. The remaining bits are restored from sve_context.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjmubah}(h]h ]h"]h$]h&]uh1j+hjRhhhhhNubj,)}(hzInclusion of fpsimd_context in the signal frame remains mandatory, irrespective of whether sve_context is present or not. h]h)}(hyInclusion of fpsimd_context in the signal frame remains mandatory, irrespective of whether sve_context is present or not.h]hyInclusion of fpsimd_context in the signal frame remains mandatory, irrespective of whether sve_context is present or not.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjRhhhhhNubj,)}(hThe vector length cannot be changed via signal return. If sve_context.vl in the signal frame does not match the current vector length, the signal return attempt is treated as illegal, resulting in a forced SIGSEGV. h]h)}(hThe vector length cannot be changed via signal return. If sve_context.vl in the signal frame does not match the current vector length, the signal return attempt is treated as illegal, resulting in a forced SIGSEGV.h]hThe vector length cannot be changed via signal return. If sve_context.vl in the signal frame does not match the current vector length, the signal return attempt is treated as illegal, resulting in a forced SIGSEGV.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjRhhhhhNubj,)}(hIt is permitted to enter or leave streaming mode by setting or clearing the SVE_SIG_FLAG_SM flag but applications should take care to ensure that when doing so sve_context.vl and any register data are appropriate for the vector length in the new mode. h]h)}(hIt is permitted to enter or leave streaming mode by setting or clearing the SVE_SIG_FLAG_SM flag but applications should take care to ensure that when doing so sve_context.vl and any register data are appropriate for the vector length in the new mode.h]hIt is permitted to enter or leave streaming mode by setting or clearing the SVE_SIG_FLAG_SM flag but applications should take care to ensure that when doing so sve_context.vl and any register data are appropriate for the vector length in the new mode.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j+hjRhhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhKhj3hhubeh}(h] signal-returnah ]h"]5. signal returnah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h6. prctl extensionsh]h6. prctl extensions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hSSome new prctl() calls are added to allow programs to manage the SVE vector length:h]hSSome new prctl() calls are added to allow programs to manage the SVE vector length:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h'prctl(PR_SVE_SET_VL, unsigned long arg)h]h'prctl(PR_SVE_SET_VL, unsigned long arg)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hXD Sets the vector length of the calling thread and related flags, where arg == vl | flags. Other threads of the calling process are unaffected. vl is the desired vector length, where sve_vl_valid(vl) must be true. flags: PR_SVE_VL_INHERIT Inherit the current vector length across execve(). Otherwise, the vector length is reset to the system default at execve(). (See Section 9.) PR_SVE_SET_VL_ONEXEC Defer the requested vector length change until the next execve() performed by this thread. The effect is equivalent to implicit execution of the following call immediately after the next execve() (if any) by the thread: prctl(PR_SVE_SET_VL, arg & ~PR_SVE_SET_VL_ONEXEC) This allows launching of a new program with a different vector length, while avoiding runtime side effects in the caller. Without PR_SVE_SET_VL_ONEXEC, the requested change takes effect immediately. Return value: a nonnegative on success, or a negative value on error: EINVAL: SVE not supported, invalid vector length requested, or invalid flags. On success: * Either the calling thread's vector length or the deferred vector length to be applied at the next execve() by the thread (dependent on whether PR_SVE_SET_VL_ONEXEC is present in arg), is set to the largest value supported by the system that is less than or equal to vl. If vl == SVE_VL_MAX, the value set will be the largest value supported by the system. * Any previously outstanding deferred vector length change in the calling thread is cancelled. * The returned value describes the resulting configuration, encoded as for PR_SVE_GET_VL. The vector length reported in this value is the new current vector length for this thread if PR_SVE_SET_VL_ONEXEC was not present in arg; otherwise, the reported vector length is the deferred vector length that will be applied at the next execve() by the calling thread. * Changing the vector length causes all of P0..P15, FFR and all bits of Z0..Z31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become unspecified. Calling PR_SVE_SET_VL with vl equal to the thread's current vector length, or calling PR_SVE_SET_VL with the PR_SVE_SET_VL_ONEXEC flag, does not constitute a change to the vector length for this purpose. h](h)}(hSets the vector length of the calling thread and related flags, where arg == vl | flags. Other threads of the calling process are unaffected.h]hSets the vector length of the calling thread and related flags, where arg == vl | flags. Other threads of the calling process are unaffected.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hEvl is the desired vector length, where sve_vl_valid(vl) must be true.h]hEvl is the desired vector length, where sve_vl_valid(vl) must be true.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hflags:h]hflags:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hXPR_SVE_VL_INHERIT Inherit the current vector length across execve(). Otherwise, the vector length is reset to the system default at execve(). (See Section 9.) PR_SVE_SET_VL_ONEXEC Defer the requested vector length change until the next execve() performed by this thread. The effect is equivalent to implicit execution of the following call immediately after the next execve() (if any) by the thread: prctl(PR_SVE_SET_VL, arg & ~PR_SVE_SET_VL_ONEXEC) This allows launching of a new program with a different vector length, while avoiding runtime side effects in the caller. Without PR_SVE_SET_VL_ONEXEC, the requested change takes effect immediately. h](h)}(hPR_SVE_VL_INHERITh]hPR_SVE_VL_INHERIT}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6ubj)}(hInherit the current vector length across execve(). Otherwise, the vector length is reset to the system default at execve(). (See Section 9.) h]h)}(hInherit the current vector length across execve(). Otherwise, the vector length is reset to the system default at execve(). (See Section 9.)h]hInherit the current vector length across execve(). Otherwise, the vector length is reset to the system default at execve(). (See Section 9.)}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjHubah}(h]h ]h"]h$]h&]uh1jhhhKhj6ubh)}(hPR_SVE_SET_VL_ONEXECh]hPR_SVE_SET_VL_ONEXEC}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj6ubj)}(hXDefer the requested vector length change until the next execve() performed by this thread. The effect is equivalent to implicit execution of the following call immediately after the next execve() (if any) by the thread: prctl(PR_SVE_SET_VL, arg & ~PR_SVE_SET_VL_ONEXEC) This allows launching of a new program with a different vector length, while avoiding runtime side effects in the caller. Without PR_SVE_SET_VL_ONEXEC, the requested change takes effect immediately. h](h)}(hZDefer the requested vector length change until the next execve() performed by this thread.h]hZDefer the requested vector length change until the next execve() performed by this thread.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjnubh)}(hThe effect is equivalent to implicit execution of the following call immediately after the next execve() (if any) by the thread:h]hThe effect is equivalent to implicit execution of the following call immediately after the next execve() (if any) by the thread:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjnubj)}(h2prctl(PR_SVE_SET_VL, arg & ~PR_SVE_SET_VL_ONEXEC) h]h)}(h1prctl(PR_SVE_SET_VL, arg & ~PR_SVE_SET_VL_ONEXEC)h]h1prctl(PR_SVE_SET_VL, arg & ~PR_SVE_SET_VL_ONEXEC)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjnubh)}(hyThis allows launching of a new program with a different vector length, while avoiding runtime side effects in the caller.h]hyThis allows launching of a new program with a different vector length, while avoiding runtime side effects in the caller.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjnubh)}(hLWithout PR_SVE_SET_VL_ONEXEC, the requested change takes effect immediately.h]hLWithout PR_SVE_SET_VL_ONEXEC, the requested change takes effect immediately.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjnubeh}(h]h ]h"]h$]h&]uh1jhhhKhj6ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubhdefinition_list)}(hhh]hdefinition_list_item)}(hReturn value: a nonnegative on success, or a negative value on error: EINVAL: SVE not supported, invalid vector length requested, or invalid flags. h](hterm)}(hEReturn value: a nonnegative on success, or a negative value on error:h]hEReturn value: a nonnegative on success, or a negative value on error:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]j)}(hhh]j)}(hOEINVAL: SVE not supported, invalid vector length requested, or invalid flags. h](j)}(h>EINVAL: SVE not supported, invalid vector length requested, orh]h>EINVAL: SVE not supported, invalid vector length requested, or}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(hinvalid flags.h]hinvalid flags.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h On success:h]h On success:}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj')}(hhh](j,)}(hXeEither the calling thread's vector length or the deferred vector length to be applied at the next execve() by the thread (dependent on whether PR_SVE_SET_VL_ONEXEC is present in arg), is set to the largest value supported by the system that is less than or equal to vl. If vl == SVE_VL_MAX, the value set will be the largest value supported by the system. h]h)}(hXdEither the calling thread's vector length or the deferred vector length to be applied at the next execve() by the thread (dependent on whether PR_SVE_SET_VL_ONEXEC is present in arg), is set to the largest value supported by the system that is less than or equal to vl. If vl == SVE_VL_MAX, the value set will be the largest value supported by the system.h]hXfEither the calling thread’s vector length or the deferred vector length to be applied at the next execve() by the thread (dependent on whether PR_SVE_SET_VL_ONEXEC is present in arg), is set to the largest value supported by the system that is less than or equal to vl. If vl == SVE_VL_MAX, the value set will be the largest value supported by the system.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIubah}(h]h ]h"]h$]h&]uh1j+hjFubj,)}(h]Any previously outstanding deferred vector length change in the calling thread is cancelled. h]h)}(h\Any previously outstanding deferred vector length change in the calling thread is cancelled.h]h\Any previously outstanding deferred vector length change in the calling thread is cancelled.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjaubah}(h]h ]h"]h$]h&]uh1j+hjFubj,)}(hXhThe returned value describes the resulting configuration, encoded as for PR_SVE_GET_VL. The vector length reported in this value is the new current vector length for this thread if PR_SVE_SET_VL_ONEXEC was not present in arg; otherwise, the reported vector length is the deferred vector length that will be applied at the next execve() by the calling thread. h]h)}(hXgThe returned value describes the resulting configuration, encoded as for PR_SVE_GET_VL. The vector length reported in this value is the new current vector length for this thread if PR_SVE_SET_VL_ONEXEC was not present in arg; otherwise, the reported vector length is the deferred vector length that will be applied at the next execve() by the calling thread.h]hXgThe returned value describes the resulting configuration, encoded as for PR_SVE_GET_VL. The vector length reported in this value is the new current vector length for this thread if PR_SVE_SET_VL_ONEXEC was not present in arg; otherwise, the reported vector length is the deferred vector length that will be applied at the next execve() by the calling thread.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjyubah}(h]h ]h"]h$]h&]uh1j+hjFubj,)}(hXbChanging the vector length causes all of P0..P15, FFR and all bits of Z0..Z31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become unspecified. Calling PR_SVE_SET_VL with vl equal to the thread's current vector length, or calling PR_SVE_SET_VL with the PR_SVE_SET_VL_ONEXEC flag, does not constitute a change to the vector length for this purpose. h]h)}(hX`Changing the vector length causes all of P0..P15, FFR and all bits of Z0..Z31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become unspecified. Calling PR_SVE_SET_VL with vl equal to the thread's current vector length, or calling PR_SVE_SET_VL with the PR_SVE_SET_VL_ONEXEC flag, does not constitute a change to the vector length for this purpose.h]hXbChanging the vector length causes all of P0..P15, FFR and all bits of Z0..Z31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become unspecified. Calling PR_SVE_SET_VL with vl equal to the thread’s current vector length, or calling PR_SVE_SET_VL with the PR_SVE_SET_VL_ONEXEC flag, does not constitute a change to the vector length for this purpose.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j+hjFubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhKhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh)}(hprctl(PR_SVE_GET_VL)h]hprctl(PR_SVE_GET_VL)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj)}(hXDGets the vector length of the calling thread. The following flag may be OR-ed into the result: PR_SVE_VL_INHERIT Vector length will be inherited across execve(). There is no way to determine whether there is an outstanding deferred vector length change (which would only normally be the case between a fork() or vfork() and the corresponding execve() in typical use). To extract the vector length from the result, bitwise and it with PR_SVE_VL_LEN_MASK. Return value: a nonnegative value on success, or a negative value on error: EINVAL: SVE not supported. h](h)}(h-Gets the vector length of the calling thread.h]h-Gets the vector length of the calling thread.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubh)}(h0The following flag may be OR-ed into the result:h]h0The following flag may be OR-ed into the result:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubj)}(hHPR_SVE_VL_INHERIT Vector length will be inherited across execve(). h](h)}(hPR_SVE_VL_INHERITh]hPR_SVE_VL_INHERIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(h1Vector length will be inherited across execve(). h]h)}(h0Vector length will be inherited across execve().h]h0Vector length will be inherited across execve().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubh)}(hThere is no way to determine whether there is an outstanding deferred vector length change (which would only normally be the case between a fork() or vfork() and the corresponding execve() in typical use).h]hThere is no way to determine whether there is an outstanding deferred vector length change (which would only normally be the case between a fork() or vfork() and the corresponding execve() in typical use).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hUTo extract the vector length from the result, bitwise and it with PR_SVE_VL_LEN_MASK.h]hUTo extract the vector length from the result, bitwise and it with PR_SVE_VL_LEN_MASK.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh]j)}(hhReturn value: a nonnegative value on success, or a negative value on error: EINVAL: SVE not supported. h](j)}(hKReturn value: a nonnegative value on success, or a negative value on error:h]hKReturn value: a nonnegative value on success, or a negative value on error:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj2ubj)}(hhh]h)}(hEINVAL: SVE not supported.h]hEINVAL: SVE not supported.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM hjhhubeh}(h]prctl-extensionsah ]h"]6. prctl extensionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h7. ptrace extensionsh]h7. ptrace extensions}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhhhhhMubj')}(hhh]j,)}(hXNew regsets NT_ARM_SVE and NT_ARM_SSVE are defined for use with PTRACE_GETREGSET and PTRACE_SETREGSET. NT_ARM_SSVE describes the streaming mode SVE registers and NT_ARM_SVE describes the non-streaming mode SVE registers. In this description a register set is referred to as being "live" when the target is in the appropriate streaming or non-streaming mode and is using data beyond the subset shared with the FPSIMD Vn registers. Refer to [2] for definitions. h](h)}(hNew regsets NT_ARM_SVE and NT_ARM_SSVE are defined for use with PTRACE_GETREGSET and PTRACE_SETREGSET. NT_ARM_SSVE describes the streaming mode SVE registers and NT_ARM_SVE describes the non-streaming mode SVE registers.h]hNew regsets NT_ARM_SVE and NT_ARM_SSVE are defined for use with PTRACE_GETREGSET and PTRACE_SETREGSET. NT_ARM_SSVE describes the streaming mode SVE registers and NT_ARM_SVE describes the non-streaming mode SVE registers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubh)}(hIn this description a register set is referred to as being "live" when the target is in the appropriate streaming or non-streaming mode and is using data beyond the subset shared with the FPSIMD Vn registers.h]hIn this description a register set is referred to as being “live” when the target is in the appropriate streaming or non-streaming mode and is using data beyond the subset shared with the FPSIMD Vn registers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjubh)}(hRefer to [2] for definitions.h]hRefer to [2] for definitions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjubeh}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubah}(h]h ]h"]h$]h&]jEjFuh1j&hhhM!hjuhhubh)}(h?The regset data starts with struct user_sve_header, containing:h]h?The regset data starts with struct user_sve_header, containing:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjuhhubj)}(hXJsize Size of the complete regset, in bytes. This depends on vl and possibly on other things in the future. If a call to PTRACE_GETREGSET requests less data than the value of size, the caller can allocate a larger buffer and retry in order to read the complete regset. max_size Maximum size in bytes that the regset can grow to for the target thread. The regset won't grow bigger than this even if the target thread changes its vector length etc. vl Target thread's current vector length, in bytes. max_vl Maximum possible vector length for the target thread. flags at most one of SVE_PT_REGS_FPSIMD SVE registers are not live (GETREGSET) or are to be made non-live (SETREGSET). The payload is of type struct user_fpsimd_state, with the same meaning as for NT_PRFPREG, starting at offset SVE_PT_FPSIMD_OFFSET from the start of user_sve_header. Extra data might be appended in the future: the size of the payload should be obtained using SVE_PT_FPSIMD_SIZE(vq, flags). vq should be obtained using sve_vq_from_vl(vl). or SVE_PT_REGS_SVE SVE registers are live (GETREGSET) or are to be made live (SETREGSET). The payload contains the SVE register data, starting at offset SVE_PT_SVE_OFFSET from the start of user_sve_header, and with size SVE_PT_SVE_SIZE(vq, flags); ... OR-ed with zero or more of the following flags, which have the same meaning and behaviour as the corresponding PR_SET_VL_* flags: SVE_PT_VL_INHERIT SVE_PT_VL_ONEXEC (SETREGSET only). If neither FPSIMD nor SVE flags are provided then no register payload is available, this is only possible when SME is implemented. h](h)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hjubj)}(hXSize of the complete regset, in bytes. This depends on vl and possibly on other things in the future. If a call to PTRACE_GETREGSET requests less data than the value of size, the caller can allocate a larger buffer and retry in order to read the complete regset. h](h)}(heSize of the complete regset, in bytes. This depends on vl and possibly on other things in the future.h]heSize of the complete regset, in bytes. This depends on vl and possibly on other things in the future.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hjubh)}(hIf a call to PTRACE_GETREGSET requests less data than the value of size, the caller can allocate a larger buffer and retry in order to read the complete regset.h]hIf a call to PTRACE_GETREGSET requests less data than the value of size, the caller can allocate a larger buffer and retry in order to read the complete regset.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjubeh}(h]h ]h"]h$]h&]uh1jhhhM0hjubh)}(hmax_sizeh]hmax_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hjubj)}(hMaximum size in bytes that the regset can grow to for the target thread. The regset won't grow bigger than this even if the target thread changes its vector length etc. h]h)}(hMaximum size in bytes that the regset can grow to for the target thread. The regset won't grow bigger than this even if the target thread changes its vector length etc.h]hMaximum size in bytes that the regset can grow to for the target thread. The regset won’t grow bigger than this even if the target thread changes its vector length etc.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjubah}(h]h ]h"]h$]h&]uh1jhhhM9hjubh)}(hvlh]hvl}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubj)}(h1Target thread's current vector length, in bytes. h]h)}(h0Target thread's current vector length, in bytes.h]h2Target thread’s current vector length, in bytes.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj=ubah}(h]h ]h"]h$]h&]uh1jhhhM?hjubh)}(hmax_vlh]hmax_vl}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjubj)}(h6Maximum possible vector length for the target thread. h]h)}(h5Maximum possible vector length for the target thread.h]h5Maximum possible vector length for the target thread.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjcubah}(h]h ]h"]h$]h&]uh1jhhhMChjubh)}(hflagsh]hflags}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjubj)}(hXat most one of SVE_PT_REGS_FPSIMD SVE registers are not live (GETREGSET) or are to be made non-live (SETREGSET). The payload is of type struct user_fpsimd_state, with the same meaning as for NT_PRFPREG, starting at offset SVE_PT_FPSIMD_OFFSET from the start of user_sve_header. Extra data might be appended in the future: the size of the payload should be obtained using SVE_PT_FPSIMD_SIZE(vq, flags). vq should be obtained using sve_vq_from_vl(vl). or SVE_PT_REGS_SVE SVE registers are live (GETREGSET) or are to be made live (SETREGSET). The payload contains the SVE register data, starting at offset SVE_PT_SVE_OFFSET from the start of user_sve_header, and with size SVE_PT_SVE_SIZE(vq, flags); ... OR-ed with zero or more of the following flags, which have the same meaning and behaviour as the corresponding PR_SET_VL_* flags: SVE_PT_VL_INHERIT SVE_PT_VL_ONEXEC (SETREGSET only). If neither FPSIMD nor SVE flags are provided then no register payload is available, this is only possible when SME is implemented. h](h)}(hat most one ofh]hat most one of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhjubj)}(hXSVE_PT_REGS_FPSIMD SVE registers are not live (GETREGSET) or are to be made non-live (SETREGSET). The payload is of type struct user_fpsimd_state, with the same meaning as for NT_PRFPREG, starting at offset SVE_PT_FPSIMD_OFFSET from the start of user_sve_header. Extra data might be appended in the future: the size of the payload should be obtained using SVE_PT_FPSIMD_SIZE(vq, flags). vq should be obtained using sve_vq_from_vl(vl). or SVE_PT_REGS_SVE SVE registers are live (GETREGSET) or are to be made live (SETREGSET). The payload contains the SVE register data, starting at offset SVE_PT_SVE_OFFSET from the start of user_sve_header, and with size SVE_PT_SVE_SIZE(vq, flags); h](h)}(hSVE_PT_REGS_FPSIMDh]hSVE_PT_REGS_FPSIMD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjubj)}(hXSVE registers are not live (GETREGSET) or are to be made non-live (SETREGSET). The payload is of type struct user_fpsimd_state, with the same meaning as for NT_PRFPREG, starting at offset SVE_PT_FPSIMD_OFFSET from the start of user_sve_header. Extra data might be appended in the future: the size of the payload should be obtained using SVE_PT_FPSIMD_SIZE(vq, flags). vq should be obtained using sve_vq_from_vl(vl). or h](h)}(hNSVE registers are not live (GETREGSET) or are to be made non-live (SETREGSET).h]hNSVE registers are not live (GETREGSET) or are to be made non-live (SETREGSET).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubh)}(hThe payload is of type struct user_fpsimd_state, with the same meaning as for NT_PRFPREG, starting at offset SVE_PT_FPSIMD_OFFSET from the start of user_sve_header.h]hThe payload is of type struct user_fpsimd_state, with the same meaning as for NT_PRFPREG, starting at offset SVE_PT_FPSIMD_OFFSET from the start of user_sve_header.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjubh)}(h{Extra data might be appended in the future: the size of the payload should be obtained using SVE_PT_FPSIMD_SIZE(vq, flags).h]h{Extra data might be appended in the future: the size of the payload should be obtained using SVE_PT_FPSIMD_SIZE(vq, flags).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubh)}(h/vq should be obtained using sve_vq_from_vl(vl).h]h/vq should be obtained using sve_vq_from_vl(vl).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjubh)}(horh]hor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubeh}(h]h ]h"]h$]h&]uh1jhhhMKhjubh)}(hSVE_PT_REGS_SVEh]hSVE_PT_REGS_SVE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjubj)}(hSVE registers are live (GETREGSET) or are to be made live (SETREGSET). The payload contains the SVE register data, starting at offset SVE_PT_SVE_OFFSET from the start of user_sve_header, and with size SVE_PT_SVE_SIZE(vq, flags); h](h)}(hFSVE registers are live (GETREGSET) or are to be made live (SETREGSET).h]hFSVE registers are live (GETREGSET) or are to be made live (SETREGSET).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hj ubh)}(hThe payload contains the SVE register data, starting at offset SVE_PT_SVE_OFFSET from the start of user_sve_header, and with size SVE_PT_SVE_SIZE(vq, flags);h]hThe payload contains the SVE register data, starting at offset SVE_PT_SVE_OFFSET from the start of user_sve_header, and with size SVE_PT_SVE_SIZE(vq, flags);}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hj ubeh}(h]h ]h"]h$]h&]uh1jhhhM[hjubeh}(h]h ]h"]h$]h&]uh1jhhhMIhjubh)}(h... OR-ed with zero or more of the following flags, which have the same meaning and behaviour as the corresponding PR_SET_VL_* flags:h]h... OR-ed with zero or more of the following flags, which have the same meaning and behaviour as the corresponding PR_SET_VL_* flags:}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhjubj)}(h6SVE_PT_VL_INHERIT SVE_PT_VL_ONEXEC (SETREGSET only). h](h)}(hSVE_PT_VL_INHERITh]hSVE_PT_VL_INHERIT}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehjE ubh)}(h"SVE_PT_VL_ONEXEC (SETREGSET only).h]h"SVE_PT_VL_ONEXEC (SETREGSET only).}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjE ubeh}(h]h ]h"]h$]h&]uh1jhhhMehjubh)}(hIf neither FPSIMD nor SVE flags are provided then no register payload is available, this is only possible when SME is implemented.h]hIf neither FPSIMD nor SVE flags are provided then no register payload is available, this is only possible when SME is implemented.}(hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihjubeh}(h]h ]h"]h$]h&]uh1jhhhMGhjubeh}(h]h ]h"]h$]h&]uh1jhhhM.hjuhhubj')}(hhh](j,)}(hXThe effects of changing the vector length and/or flags are equivalent to those documented for PR_SVE_SET_VL. The caller must make a further GETREGSET call if it needs to know what VL is actually set by SETREGSET, unless is it known in advance that the requested VL is supported. h](h)}(hlThe effects of changing the vector length and/or flags are equivalent to those documented for PR_SVE_SET_VL.h]hlThe effects of changing the vector length and/or flags are equivalent to those documented for PR_SVE_SET_VL.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhj ubh)}(hThe caller must make a further GETREGSET call if it needs to know what VL is actually set by SETREGSET, unless is it known in advance that the requested VL is supported.h]hThe caller must make a further GETREGSET call if it needs to know what VL is actually set by SETREGSET, unless is it known in advance that the requested VL is supported.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj ubeh}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hIn the SVE_PT_REGS_SVE case, the size and layout of the payload depends on the header fields. The SVE_PT_SVE_*() macros are provided to facilitate access to the members. h]h)}(hIn the SVE_PT_REGS_SVE case, the size and layout of the payload depends on the header fields. The SVE_PT_SVE_*() macros are provided to facilitate access to the members.h]hIn the SVE_PT_REGS_SVE case, the size and layout of the payload depends on the header fields. The SVE_PT_SVE_*() macros are provided to facilitate access to the members.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hIn either case, for SETREGSET it is permissible to omit the payload, in which case only the vector length and flags are changed (along with any consequences of those changes). h]h)}(hIn either case, for SETREGSET it is permissible to omit the payload, in which case only the vector length and flags are changed (along with any consequences of those changes).h]hIn either case, for SETREGSET it is permissible to omit the payload, in which case only the vector length and flags are changed (along with any consequences of those changes).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hIn systems supporting SME when in streaming mode a GETREGSET for NT_REG_SVE will return only the user_sve_header with no register data, similarly a GETREGSET for NT_REG_SSVE will not return any register data when not in streaming mode. h]h)}(hIn systems supporting SME when in streaming mode a GETREGSET for NT_REG_SVE will return only the user_sve_header with no register data, similarly a GETREGSET for NT_REG_SSVE will not return any register data when not in streaming mode.h]hIn systems supporting SME when in streaming mode a GETREGSET for NT_REG_SVE will return only the user_sve_header with no register data, similarly a GETREGSET for NT_REG_SSVE will not return any register data when not in streaming mode.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hBA GETREGSET for NT_ARM_SSVE will never return SVE_PT_REGS_FPSIMD. h]h)}(hAA GETREGSET for NT_ARM_SSVE will never return SVE_PT_REGS_FPSIMD.h]hAA GETREGSET for NT_ARM_SSVE will never return SVE_PT_REGS_FPSIMD.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hXFor SETREGSET, if an SVE_PT_REGS_SVE payload is present and the requested VL is not supported, the effect will be the same as if the payload were omitted, except that an EIO error is reported. No attempt is made to translate the payload data to the correct layout for the vector length actually set. The thread's FPSIMD state is preserved, but the remaining bits of the SVE registers become unspecified. It is up to the caller to translate the payload layout for the actual VL and retry. h]h)}(hXFor SETREGSET, if an SVE_PT_REGS_SVE payload is present and the requested VL is not supported, the effect will be the same as if the payload were omitted, except that an EIO error is reported. No attempt is made to translate the payload data to the correct layout for the vector length actually set. The thread's FPSIMD state is preserved, but the remaining bits of the SVE registers become unspecified. It is up to the caller to translate the payload layout for the actual VL and retry.h]hXFor SETREGSET, if an SVE_PT_REGS_SVE payload is present and the requested VL is not supported, the effect will be the same as if the payload were omitted, except that an EIO error is reported. No attempt is made to translate the payload data to the correct layout for the vector length actually set. The thread’s FPSIMD state is preserved, but the remaining bits of the SVE registers become unspecified. It is up to the caller to translate the payload layout for the actual VL and retry.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hXWhere SME is implemented it is not possible to GETREGSET the register state for normal SVE when in streaming mode, nor the streaming mode register state when in normal mode, regardless of the implementation defined behaviour of the hardware for sharing data between the two modes. h]h)}(hXWhere SME is implemented it is not possible to GETREGSET the register state for normal SVE when in streaming mode, nor the streaming mode register state when in normal mode, regardless of the implementation defined behaviour of the hardware for sharing data between the two modes.h]hXWhere SME is implemented it is not possible to GETREGSET the register state for normal SVE when in streaming mode, nor the streaming mode register state when in normal mode, regardless of the implementation defined behaviour of the hardware for sharing data between the two modes.}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj& ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hAny SETREGSET of NT_ARM_SVE will exit streaming mode if the target was in streaming mode and any SETREGSET of NT_ARM_SSVE will enter streaming mode if the target was not in streaming mode. h]h)}(hAny SETREGSET of NT_ARM_SVE will exit streaming mode if the target was in streaming mode and any SETREGSET of NT_ARM_SSVE will enter streaming mode if the target was not in streaming mode.h]hAny SETREGSET of NT_ARM_SVE will exit streaming mode if the target was in streaming mode and any SETREGSET of NT_ARM_SSVE will enter streaming mode if the target was not in streaming mode.}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj> ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hIf any register data is provided along with SVE_PT_VL_ONEXEC then the registers data will be interpreted with the current vector length, not the vector length configured for use on exec. h]h)}(hIf any register data is provided along with SVE_PT_VL_ONEXEC then the registers data will be interpreted with the current vector length, not the vector length configured for use on exec.h]hIf any register data is provided along with SVE_PT_VL_ONEXEC then the registers data will be interpreted with the current vector length, not the vector length configured for use on exec.}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjV ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hEThe effect of writing a partial, incomplete payload is unspecified. h]h)}(hCThe effect of writing a partial, incomplete payload is unspecified.h]hCThe effect of writing a partial, incomplete payload is unspecified.}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjn ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhMmhjuhhubeh}(h]ptrace-extensionsah ]h"]7. ptrace extensionsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h8. ELF coredump extensionsh]h8. ELF coredump extensions}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubj')}(hhh]j,)}(hXNT_ARM_SVE and NT_ARM_SSVE notes will be added to each coredump for each thread of the dumped process. The contents will be equivalent to the data that would have been read if a PTRACE_GETREGSET of the corresponding type were executed for each thread when the coredump was generated. h]h)}(hXNT_ARM_SVE and NT_ARM_SSVE notes will be added to each coredump for each thread of the dumped process. The contents will be equivalent to the data that would have been read if a PTRACE_GETREGSET of the corresponding type were executed for each thread when the coredump was generated.h]hXNT_ARM_SVE and NT_ARM_SSVE notes will be added to each coredump for each thread of the dumped process. The contents will be equivalent to the data that would have been read if a PTRACE_GETREGSET of the corresponding type were executed for each thread when the coredump was generated.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubah}(h]h ]h"]h$]h&]jEjFuh1j&hhhMhj hhubeh}(h]elf-coredump-extensionsah ]h"]8. elf coredump extensionsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h 9. System runtime configurationh]h 9. System runtime configuration}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubj')}(hhh]j,)}(hTo mitigate the ABI impact of expansion of the signal frame, a policy mechanism is provided for administrators, distro maintainers and developers to set the default vector length for userspace processes: h]h)}(hTo mitigate the ABI impact of expansion of the signal frame, a policy mechanism is provided for administrators, distro maintainers and developers to set the default vector length for userspace processes:h]hTo mitigate the ABI impact of expansion of the signal frame, a policy mechanism is provided for administrators, distro maintainers and developers to set the default vector length for userspace processes:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubah}(h]h ]h"]h$]h&]jEjFuh1j&hhhMhj hhubh)}(h'/proc/sys/abi/sve_default_vector_lengthh]h'/proc/sys/abi/sve_default_vector_length}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hX.Writing the text representation of an integer to this file sets the system default vector length to the specified value rounded to a supported value using the same rules as for setting vector length via PR_SVE_SET_VL. The result can be determined by reopening the file and reading its contents. At boot, the default vector length is initially set to 64 or the maximum supported vector length, whichever is smaller. This determines the initial vector length of the init process (PID 1). Reading this file returns the current system default vector length. h](h)}(hWriting the text representation of an integer to this file sets the system default vector length to the specified value rounded to a supported value using the same rules as for setting vector length via PR_SVE_SET_VL.h]hWriting the text representation of an integer to this file sets the system default vector length to the specified value rounded to a supported value using the same rules as for setting vector length via PR_SVE_SET_VL.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hLThe result can be determined by reopening the file and reading its contents.h]hLThe result can be determined by reopening the file and reading its contents.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hAt boot, the default vector length is initially set to 64 or the maximum supported vector length, whichever is smaller. This determines the initial vector length of the init process (PID 1).h]hAt boot, the default vector length is initially set to 64 or the maximum supported vector length, whichever is smaller. This determines the initial vector length of the init process (PID 1).}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hCReading this file returns the current system default vector length.h]hCReading this file returns the current system default vector length.}(hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj hhubj')}(hhh](j,)}(hXOAt every execve() call, the new vector length of the new process is set to the system default vector length, unless * PR_SVE_VL_INHERIT (or equivalently SVE_PT_VL_INHERIT) is set for the calling thread, or * a deferred vector length change is pending, established via the PR_SVE_SET_VL_ONEXEC flag (or SVE_PT_VL_ONEXEC). h](h)}(hsAt every execve() call, the new vector length of the new process is set to the system default vector length, unlessh]hsAt every execve() call, the new vector length of the new process is set to the system default vector length, unless}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjS ubj)}(h* PR_SVE_VL_INHERIT (or equivalently SVE_PT_VL_INHERIT) is set for the calling thread, or * a deferred vector length change is pending, established via the PR_SVE_SET_VL_ONEXEC flag (or SVE_PT_VL_ONEXEC). h]j')}(hhh](j,)}(hXPR_SVE_VL_INHERIT (or equivalently SVE_PT_VL_INHERIT) is set for the calling thread, or h]h)}(hWPR_SVE_VL_INHERIT (or equivalently SVE_PT_VL_INHERIT) is set for the calling thread, orh]hWPR_SVE_VL_INHERIT (or equivalently SVE_PT_VL_INHERIT) is set for the calling thread, or}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjl ubah}(h]h ]h"]h$]h&]uh1j+hji ubj,)}(hqa deferred vector length change is pending, established via the PR_SVE_SET_VL_ONEXEC flag (or SVE_PT_VL_ONEXEC). h]h)}(hpa deferred vector length change is pending, established via the PR_SVE_SET_VL_ONEXEC flag (or SVE_PT_VL_ONEXEC).h]hpa deferred vector length change is pending, established via the PR_SVE_SET_VL_ONEXEC flag (or SVE_PT_VL_ONEXEC).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hji ubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhMhje ubah}(h]h ]h"]h$]h&]uh1jhhhMhjS ubeh}(h]h ]h"]h$]h&]uh1j+hjP hhhhhNubj,)}(hModifying the system default vector length does not affect the vector length of any existing process or thread that does not make an execve() call. h]h)}(hModifying the system default vector length does not affect the vector length of any existing process or thread that does not make an execve() call.h]hModifying the system default vector length does not affect the vector length of any existing process or thread that does not make an execve() call.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hjP hhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhMhj hhubeh}(h]system-runtime-configurationah ]h"]9. system runtime configurationah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h10. Perf extensionsh]h10. Perf extensions}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubj')}(hhh](j,)}(hThe arm64 specific DWARF standard [5] added the VG (Vector Granule) register at index 46. This register is used for DWARF unwinding when variable length SVE registers are pushed onto the stack. h]h)}(hThe arm64 specific DWARF standard [5] added the VG (Vector Granule) register at index 46. This register is used for DWARF unwinding when variable length SVE registers are pushed onto the stack.h]hThe arm64 specific DWARF standard [5] added the VG (Vector Granule) register at index 46. This register is used for DWARF unwinding when variable length SVE registers are pushed onto the stack.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hUIts value is equivalent to the current SVE vector length (VL) in bits divided by 64. h]h)}(hTIts value is equivalent to the current SVE vector length (VL) in bits divided by 64.h]hTIts value is equivalent to the current SVE vector length (VL) in bits divided by 64.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hThe value is included in Perf samples in the regs[46] field if PERF_SAMPLE_REGS_USER is set and the sample_regs_user mask has bit 46 set. h]h)}(hThe value is included in Perf samples in the regs[46] field if PERF_SAMPLE_REGS_USER is set and the sample_regs_user mask has bit 46 set.h]hThe value is included in Perf samples in the regs[46] field if PERF_SAMPLE_REGS_USER is set and the sample_regs_user mask has bit 46 set.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(h^The value is the current value at the time the sample was taken, and it can change over time. h]h)}(h]The value is the current value at the time the sample was taken, and it can change over time.h]h]The value is the current value at the time the sample was taken, and it can change over time.}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0 ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hsIf the system doesn't support SVE when perf_event_open is called with these settings, the event will fail to open. h]h)}(hrIf the system doesn't support SVE when perf_event_open is called with these settings, the event will fail to open.h]htIf the system doesn’t support SVE when perf_event_open is called with these settings, the event will fail to open.}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjH ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhMhj hhubh)}(hhh](h)}(h1Appendix A. SVE programmer's model (informative)h]h3Appendix A. SVE programmer’s model (informative)}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf hhhhhMubh)}(hThis section provides a minimal description of the additions made by SVE to the ARMv8-A programmer's model that are relevant to this document.h]hThis section provides a minimal description of the additions made by SVE to the ARMv8-A programmer’s model that are relevant to this document.}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf hhubh)}(hyNote: This section is for information only and not intended to be complete or to replace any architectural specification.h]hyNote: This section is for information only and not intended to be complete or to replace any architectural specification.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf hhubeh}(h]-appendix-a-sve-programmer-s-model-informativeah ]h"]0appendix a. sve programmer's model (informative)ah$]h&]uh1hhj hhhhhMubeh}(h]perf-extensionsah ]h"]10. perf extensionsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hA.1. Registersh]hA.1. Registers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(h%In A64 state, SVE adds the following:h]h%In A64 state, SVE adds the following:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj')}(hhh](j,)}(h32 8VL-bit vector registers Z0..Z31 For each Zn, Zn bits [127:0] alias the ARMv8-A vector register Vn. A register write using a Vn register name zeros all bits of the corresponding Zn except for bits [127:0]. h](h)}(hf32 8VL-bit vector registers Z0..Z31 For each Zn, Zn bits [127:0] alias the ARMv8-A vector register Vn.h]hf32 8VL-bit vector registers Z0..Z31 For each Zn, Zn bits [127:0] alias the ARMv8-A vector register Vn.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hiA register write using a Vn register name zeros all bits of the corresponding Zn except for bits [127:0].h]hiA register write using a Vn register name zeros all bits of the corresponding Zn except for bits [127:0].}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(h&16 VL-bit predicate registers P0..P15 h]h)}(h%16 VL-bit predicate registers P0..P15h]h%16 VL-bit predicate registers P0..P15}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hM1 VL-bit special-purpose predicate register FFR (the "first-fault register") h]h)}(hL1 VL-bit special-purpose predicate register FFR (the "first-fault register")h]hP1 VL-bit special-purpose predicate register FFR (the “first-fault register”)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(ha VL "pseudo-register" that determines the size of each vector register The SVE instruction set architecture provides no way to write VL directly. Instead, it can be modified only by EL1 and above, by writing appropriate system registers. h](h)}(hGa VL "pseudo-register" that determines the size of each vector registerh]hKa VL “pseudo-register” that determines the size of each vector register}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hThe SVE instruction set architecture provides no way to write VL directly. Instead, it can be modified only by EL1 and above, by writing appropriate system registers.h]hThe SVE instruction set architecture provides no way to write VL directly. Instead, it can be modified only by EL1 and above, by writing appropriate system registers.}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(huThe value of VL can be configured at runtime by EL1 and above: 16 <= VL <= VLmax, where VL must be a multiple of 16. h]h)}(htThe value of VL can be configured at runtime by EL1 and above: 16 <= VL <= VLmax, where VL must be a multiple of 16.h]htThe value of VL can be configured at runtime by EL1 and above: 16 <= VL <= VLmax, where VL must be a multiple of 16.}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjA ubah}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hThe maximum vector length is determined by the hardware: 16 <= VLmax <= 256. (The SVE architecture specifies 256, but permits future architecture revisions to raise this limit.) h](h)}(hLThe maximum vector length is determined by the hardware: 16 <= VLmax <= 256.h]hLThe maximum vector length is determined by the hardware: 16 <= VLmax <= 256.}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjY ubh)}(hd(The SVE architecture specifies 256, but permits future architecture revisions to raise this limit.)h]hd(The SVE architecture specifies 256, but permits future architecture revisions to raise this limit.)}(hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjY ubeh}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubj,)}(hXZFPSR and FPCR are retained from ARMv8-A, and interact with SVE floating-point operations in a similar way to the way in which they interact with ARMv8 floating-point operations:: 8VL-1 128 0 bit index +---- //// -----------------+ Z0 | : V0 | : : Z7 | : V7 | Z8 | : * V8 | : : : Z15 | : *V15 | Z16 | : V16 | : : Z31 | : V31 | +---- //// -----------------+ 31 0 VL-1 0 +-------+ +---- //// --+ FPSR | | P0 | | +-------+ : | | *FPCR | | P15 | | +-------+ +---- //// --+ FFR | | +-----+ +---- //// --+ VL | | +-----+ h](h)}(hFPSR and FPCR are retained from ARMv8-A, and interact with SVE floating-point operations in a similar way to the way in which they interact with ARMv8 floating-point operations::h]hFPSR and FPCR are retained from ARMv8-A, and interact with SVE floating-point operations in a similar way to the way in which they interact with ARMv8 floating-point operations:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh literal_block)}(hXy 8VL-1 128 0 bit index +---- //// -----------------+ Z0 | : V0 | : : Z7 | : V7 | Z8 | : * V8 | : : : Z15 | : *V15 | Z16 | : V16 | : : Z31 | : V31 | +---- //// -----------------+ 31 0 VL-1 0 +-------+ +---- //// --+ FPSR | | P0 | | +-------+ : | | *FPCR | | P15 | | +-------+ +---- //// --+ FFR | | +-----+ +---- //// --+ VL | | +-----+h]hXy 8VL-1 128 0 bit index +---- //// -----------------+ Z0 | : V0 | : : Z7 | : V7 | Z8 | : * V8 | : : : Z15 | : *V15 | Z16 | : V16 | : : Z31 | : V31 | +---- //// -----------------+ 31 0 VL-1 0 +-------+ +---- //// --+ FPSR | | P0 | | +-------+ : | | *FPCR | | P15 | | +-------+ +---- //// --+ FFR | | +-----+ +---- //// --+ VL | | +-----+}hj sbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1j hhhMhj ubeh}(h]h ]h"]h$]h&]uh1j+hj hhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhMhj hhubj)}(hhh]j)}(h(*) callee-save: This only applies to bits [63:0] of Z-/V-registers. FPCR contains callee-save and caller-save bits. See [4] for details. h](j)}(h(*) callee-save:h]h(*) callee-save:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj ubj)}(hhh]h)}(hyThis only applies to bits [63:0] of Z-/V-registers. FPCR contains callee-save and caller-save bits. See [4] for details.h]hyThis only applies to bits [63:0] of Z-/V-registers. FPCR contains callee-save and caller-save bits. See [4] for details.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubeh}(h] a-1-registersah ]h"]a.1. registersah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hA.2. Procedure call standardh]hA.2. Procedure call standard}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM!ubh)}(hrThe ARMv8-A base procedure call standard is extended as follows with respect to the additional SVE register state:h]hrThe ARMv8-A base procedure call standard is extended as follows with respect to the additional SVE register state:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj hhubj')}(hhh](j,)}(hHAll SVE register bits that are not shared with FP/SIMD are caller-save. h]h)}(hGAll SVE register bits that are not shared with FP/SIMD are caller-save.h]hGAll SVE register bits that are not shared with FP/SIMD are caller-save.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(hZ8 bits [63:0] .. Z15 bits [63:0] are callee-save. This follows from the way these bits are mapped to V8..V15, which are caller- save in the base procedure call standard. h](h)}(h2Z8 bits [63:0] .. Z15 bits [63:0] are callee-save.h]h2Z8 bits [63:0] .. Z15 bits [63:0] are callee-save.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hj)ubh)}(hwThis follows from the way these bits are mapped to V8..V15, which are caller- save in the base procedure call standard.h]hwThis follows from the way these bits are mapped to V8..V15, which are caller- save in the base procedure call standard.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj)ubeh}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhM&hj hhubh)}(hhh](h)}(h/Appendix B. ARMv8-A FP/SIMD programmer's modelh]h1Appendix B. ARMv8-A FP/SIMD programmer’s model}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhhhhhM/ubh)}(hyNote: This section is for information only and not intended to be complete or to replace any architectural specification.h]hyNote: This section is for information only and not intended to be complete or to replace any architectural specification.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hjUhhubh)}(h"Refer to [4] for more information.h]h"Refer to [4] for more information.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hjUhhubh)}(hCARMv8-A defines the following floating-point / SIMD register state:h]hCARMv8-A defines the following floating-point / SIMD register state:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjUhhubj')}(hhh](j,)}(h#32 128-bit vector registers V0..V31h]h)}(hjh]h#32 128-bit vector registers V0..V31}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubj,)}(h-2 32-bit status/control registers FPSR, FPCR h]h)}(h,2 32-bit status/control registers FPSR, FPCRh]h,2 32-bit status/control registers FPSR, FPCR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjubah}(h]h ]h"]h$]h&]uh1j+hjhhhhhNubeh}(h]h ]h"]h$]h&]jEjFuh1j&hhhM8hjUhhubj )}(hX 127 0 bit index +---------------+ V0 | | : : : V7 | | * V8 | | : : : : *V15 | | V16 | | : : : V31 | | +---------------+ 31 0 +-------+ FPSR | | +-------+ *FPCR | | +-------+h]hX 127 0 bit index +---------------+ V0 | | : : : V7 | | * V8 | | : : : : *V15 | | V16 | | : : : V31 | | +---------------+ 31 0 +-------+ FPSR | | +-------+ *FPCR | | +-------+}hjsbah}(h]h ]h"]h$]h&]j j uh1j hhhM=hjUhhubj)}(hhh]j)}(h(*) callee-save: This only applies to bits [63:0] of V-registers. FPCR contains a mixture of callee-save and caller-save bits. h](j)}(h(*) callee-save:h]h(*) callee-save:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMThjubj)}(hhh]h)}(hmThis only applies to bits [63:0] of V-registers. FPCR contains a mixture of callee-save and caller-save bits.h]hmThis only applies to bits [63:0] of V-registers. FPCR contains a mixture of callee-save and caller-save bits.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMThjubah}(h]h ]h"]h$]h&]uh1jhjUhhhhhNubeh}(h]-appendix-b-armv8-a-fp-simd-programmer-s-modelah ]h"].appendix b. armv8-a fp/simd programmer's modelah$]h&]uh1hhj hhhhhM/ubh)}(hhh](h)}(h Referencesh]h References}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMWubj)}(hhh](j)}(hR[1] arch/arm64/include/uapi/asm/sigcontext.h AArch64 Linux signal ABI definitions h](j)}(h,[1] arch/arm64/include/uapi/asm/sigcontext.hh]h,[1] arch/arm64/include/uapi/asm/sigcontext.h}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMZhj*ubj)}(hhh]h)}(h$AArch64 Linux signal ABI definitionsh]h$AArch64 Linux signal ABI definitions}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhj<ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhhhMZhj'ubj)}(hN[2] arch/arm64/include/uapi/asm/ptrace.h AArch64 Linux ptrace ABI definitions h](j)}(h([2] arch/arm64/include/uapi/asm/ptrace.hh]h([2] arch/arm64/include/uapi/asm/ptrace.h}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM]hjYubj)}(hhh]h)}(h$AArch64 Linux ptrace ABI definitionsh]h$AArch64 Linux ptrace ABI definitions}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjkubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]uh1jhhhM]hj'hhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(h6[3] Documentation/arch/arm64/cpu-feature-registers.rsth]h6[3] Documentation/arch/arm64/cpu-feature-registers.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjhhubj)}(hhh]j)}(h[4] ARM IHI0055C http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf http://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.abi/index.html Procedure Call Standard for the ARM 64-bit Architecture (AArch64) h](j)}(h[4] ARM IHI0055Ch]h[4] ARM IHI0055C}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMdhjubj)}(hhh]h)}(hhttp://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf http://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.abi/index.html Procedure Call Standard for the ARM 64-bit Architecture (AArch64)h](h)}(hShttp://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdfh]hShttp://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubh }(hjhhhNhNubh)}(hLhttp://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.abi/index.htmlh]hLhttp://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.abi/index.html}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubhB Procedure Call Standard for the ARM 64-bit Architecture (AArch64)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMbhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMdhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hL[5] https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rsth](h[5] }(hjhhhNhNubh)}(hHhttps://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rsth]hHhttps://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMfhjhhubeh}(h] referencesah ]h"] referencesah$]h&]uh1hhj hhhhhMWubeh}(h]a-2-procedure-call-standardah ]h"]a.2. procedure call standardah$]h&]uh1hhhhhhhhM!ubeh}(h]3scalable-vector-extension-support-for-aarch64-linuxah ]h"]3scalable vector extension support for aarch64 linuxah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjNerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j(j%jLjIjjjNjKj0j-jjjrjoj j j j j j j j j j j j j jjjjju nametypes}(j(jLjjNj0jjrj j j j j j j jjuh}(j%hjIjjjOjKjj-jQjj3jojj juj j j j j j j jf j j jj jjUjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.