Now
MAIN commitmail json YAML
src/lib/libc/sys/ptrace.2@1.75
/
diff
/
nxr@1.75
src/sys/arch/amd64/amd64/netbsd32_machdep.c@1.124 / diff / nxr@1.124
src/sys/arch/amd64/amd64/process_machdep.c@1.40 / diff / nxr@1.40
src/sys/arch/amd64/include/netbsd32_machdep.h@1.24 / diff / nxr@1.24
src/sys/arch/amd64/include/ptrace.h@1.16 / diff / nxr@1.16
src/sys/arch/i386/i386/process_machdep.c@1.93 / diff / nxr@1.93
src/sys/arch/i386/include/ptrace.h@1.23 / diff / nxr@1.23
src/sys/arch/x86/include/cpu_extended_state.h@1.17 / diff / nxr@1.17
src/sys/arch/x86/include/fpu.h@1.17 / diff / nxr@1.17
src/sys/arch/x86/x86/fpu.c@1.54 / diff / nxr@1.54
src/tests/lib/libc/sys/t_ptrace_wait.c@1.129 / diff / nxr@1.129
src/tests/lib/libc/sys/t_ptrace_x86_wait.h@1.16 / diff / nxr@1.16
src/sys/arch/amd64/amd64/netbsd32_machdep.c@1.124 / diff / nxr@1.124
src/sys/arch/amd64/amd64/process_machdep.c@1.40 / diff / nxr@1.40
src/sys/arch/amd64/include/netbsd32_machdep.h@1.24 / diff / nxr@1.24
src/sys/arch/amd64/include/ptrace.h@1.16 / diff / nxr@1.16
src/sys/arch/i386/i386/process_machdep.c@1.93 / diff / nxr@1.93
src/sys/arch/i386/include/ptrace.h@1.23 / diff / nxr@1.23
src/sys/arch/x86/include/cpu_extended_state.h@1.17 / diff / nxr@1.17
src/sys/arch/x86/include/fpu.h@1.17 / diff / nxr@1.17
src/sys/arch/x86/x86/fpu.c@1.54 / diff / nxr@1.54
src/tests/lib/libc/sys/t_ptrace_wait.c@1.129 / diff / nxr@1.129
src/tests/lib/libc/sys/t_ptrace_x86_wait.h@1.16 / diff / nxr@1.16
Implement PT_GETXSTATE and PT_SETXSTATE
Introduce two new ptrace() requests: PT_GETXSTATE and PT_SETXSTATE,
that provide access to the extended (and extensible) set of FPU
registers on amd64 and i386. At the moment, this covers AVX (YMM)
and AVX-512 (ZMM, opmask) registers. It can be easily extended
to cover further register types without breaking backwards
compatibility.
PT_GETXSTATE issues the XSAVE instruction with all kernel-supported
extended components enabled. The data is copied into 'struct xstate'
(which -- unlike the XSAVE area itself -- has stable format
and offsets).
PT_SETXSTATE issues the XRSTOR instruction to restore the register
values from user-provided 'struct xstate'. The function replaces only
the specific XSAVE components that are listed in 'xs_rfbm' field,
making it possible to issue partial updates.
Both syscalls take a 'struct iovec' pointer rather than a direct
argument. This requires the caller to explicitly specify the buffer
size. As a result, existing code will continue to work correctly
when the structure is extended (performing partial reads/updates).
Introduce two new ptrace() requests: PT_GETXSTATE and PT_SETXSTATE,
that provide access to the extended (and extensible) set of FPU
registers on amd64 and i386. At the moment, this covers AVX (YMM)
and AVX-512 (ZMM, opmask) registers. It can be easily extended
to cover further register types without breaking backwards
compatibility.
PT_GETXSTATE issues the XSAVE instruction with all kernel-supported
extended components enabled. The data is copied into 'struct xstate'
(which -- unlike the XSAVE area itself -- has stable format
and offsets).
PT_SETXSTATE issues the XRSTOR instruction to restore the register
values from user-provided 'struct xstate'. The function replaces only
the specific XSAVE components that are listed in 'xs_rfbm' field,
making it possible to issue partial updates.
Both syscalls take a 'struct iovec' pointer rather than a direct
argument. This requires the caller to explicitly specify the buffer
size. As a result, existing code will continue to work correctly
when the structure is extended (performing partial reads/updates).