[Lucid SRU 1/5] x86, ptrace: regset extensions to support xstate

Steve Conklin sconklin at canonical.com
Tue Jul 20 11:51:31 BST 2010


From: Suresh Siddha <suresh.b.siddha at intel.com>

BugLink: http://bugs.launchpad.net/bugs/607653

Add the xstate regset support which helps extend the kernel ptrace and the
core-dump interfaces to support AVX state etc.

This regset interface is designed to support all the future state that gets
supported using xsave/xrstor infrastructure.

Looking at the memory layout saved by "xsave", one can't say which state
is represented in the memory layout. This is because if a particular state is
in init state, in the xsave hdr it can be represented by bit '0'. And hence
we can't really say by the xsave header wether a state is in init state or
the state is not saved in the memory layout.

And hence the xsave memory layout available through this regset
interface uses SW usable bytes [464..511] to convey what state is represented
in the memory layout.

First 8 bytes of the sw_usable_bytes[464..467] will be set to OS enabled xstate
mask(which is same as the 64bit mask returned by the xgetbv's xCR0).

The note NT_X86_XSTATE represents the extended state information in the
core file, using the above mentioned memory layout.

Signed-off-by: Suresh Siddha <suresh.b.siddha at intel.com>
LKML-Reference: <20100211195614.802495327 at sbs-t61.sc.intel.com>
Signed-off-by: Hongjiu Lu <hjl.tools at gmail.com>
Cc: Roland McGrath <roland at redhat.com>
Signed-off-by: H. Peter Anvin <hpa at zytor.com>


More information about the kernel-team mailing list