On Fri, 20 Mar 2026 at 01:15, Richard Henderson <[email protected]> wrote: > On 3/19/26 22:27, Peter Maydell wrote: > > I also note that for the data structure I am fixing, we never do > > an xsave/xrestore on it -- it is purely junk unused padding. > > The real xsave/xrestore info is elsewhere, in the dynamic part > > of the signal frame. > > That is an excellent point. The structure you're fixing is never really used. > > It's only use at present is to be included in the ia32 sigframe structure, > and is only > used for padding. As an unintended side effect, the alignment of > X86LegacyXSaveArea is > inherited by sigframe. > > Perhaps we should simply have > > - struct target_fpstate_32 fpstate_unused; > + char fpstate_unused[sizeof(struct target_fregs_state) + > + sizeof(X86LegacyXSaveArea)];
I did consider something like that; from the commit message: # Replace the use of X86LegacyXSaveArea with a set of fields that match # the kernel _fpstate_32 struct, and assert that the length is correct. # We could equally have used # uint8_t legacy_area[512]; # but following the kernel is probably less confusing overall. Either way works, so I guess I don't care very strongly. thanks -- PMM
