lkml.org 
[lkml]   [2019]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/fpu: Warn only when CPU-provided sizes less than struct declaration
From
Date
On 12/3/19 1:01 AM, Suravee Suthikulpanit wrote:
> The current XCHECK_SZ macro warns if the XFEATURE size reported
> by CPUID does not match the size of kernel structure. However, depending
> on the hardware implementation, CPUID can report the XSAVE state size
> larger than the size of C structures defined for each of the XSAVE state
> due to padding.

We have existing architecture for padding. See xfeature_is_aligned(),
for instance. Are you saying that there are implementations out there
that do padding which is not otherwise enumerated and that they do it
within the size of the enumerated state?

> Such case should be safe and should not need to generate warning
> message.

I've seen these error messages trip before, but only on pre-production
processors with goofy microcode. I'd be really suspicious that this is
just papering over a processor issue. Or, that perhaps the compacted
form works but the standard form is broken somehow.

\
 
 \ /
  Last update: 2019-12-03 18:28    [W:0.097 / U:11.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site