Xsave
Jump to navigation
Jump to search
Summary
XSAVE stands for similar x86 instruction xsave
which places extended processor state into a memory area. The saving can be initiated by any userspace application at any moment and size of the memory frame depends on processor features and may vary between different models. Thus if checkpoint and restore are done on different processors the next call to xsave
may corrupt memory if sizes mismatch.
XSAVE frame sizes
Before fetching frame sizes one need to figure out if xsave
is supported at all. This should be done by
cpuid(0x00000001, &eax, &ebx, &ecx, &edx)
and bits 26 and 27 are both set in ecx
if xsave
is supported (strictly speaking bit 27 is reserved for operating system which can clear it to indicate that instruction is disabled).