NetBSD/src 9KX8aHYlib/libc/sys ptrace.2, sys/arch/amd64/amd64 process_machdep.c netbsd32_machdep.c

   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).
VersionDeltaFile
1.16+892-2tests/lib/libc/sys/t_ptrace_x86_wait.h
1.54+161-2sys/arch/x86/x86/fpu.c
1.40+133-2sys/arch/amd64/amd64/process_machdep.c
1.93+108-21sys/arch/i386/i386/process_machdep.c
1.17+83-1sys/arch/x86/include/cpu_extended_state.h
1.75+75-3lib/libc/sys/ptrace.2
1.16+23-2sys/arch/amd64/include/ptrace.h
1.23+11-4sys/arch/i386/include/ptrace.h
1.17+5-1sys/arch/x86/include/fpu.h
1.124+4-2sys/arch/amd64/amd64/netbsd32_machdep.c
1.129+4-2tests/lib/libc/sys/t_ptrace_wait.c
1.24+3-1sys/arch/amd64/include/netbsd32_machdep.h
+1,502-4312 files

UnifiedSplitRaw