Re: [PATCH 1/4] x86/fpu: Clear XSTATE_BV[i] in save state whenever XFD[i]=1
From: Chang S. Bae
Date: Thu Jan 15 2026 - 18:43:12 EST
On 1/15/2026 10:19 AM, Dave Hansen wrote:
What would folks think about making the SDM language stronger, or at
least explicitly adding the language that setting XFD[i]=1 can lead to
XINUSE[i] going from 1=>0. Kinda like the language that's already in
"XRSTOR and the Init and Modified Optimizations", but specific to XFD:
If XFD[i] = 1 and XINUSE[i] = 1, state component i may be
tracked as init; XINUSE[i] may be set to 0.
That would make it consistent with the KVM behavior. It might also give
the CPU folks some additional wiggle room for new behavior.
Yeah, I saw that you quoted this sentence in the XFD section in your other response:
If XSAVE, XSAVEC, XSAVEOPT, or XSAVES is saving the state
component i, the instruction does not generate #NM when XCR0[i]
= IA32_XFD[i] = 1; instead, it operates as if XINUSE[i] = 0 (and
the state component was in its initial state)
Indeed, I do applaud the idea to clarify this behavior more explicitly right there.
Thanks,
Chang