mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* your patch "crypto: sha1 - SSSE3 based SHA1 implementation for x86-64" vs xsave
@ 2011-11-17 10:33 Jan Beulich
  2011-11-17 12:36 ` Mathias Krause
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2011-11-17 10:33 UTC (permalink / raw)
  To: minipli; +Cc: herbert, linux-kernel

Mathias,

in avx_usable() you use cpu_has_osxsave to determine whether AVX can
actually be used, but I can't see how that conditional would ever evaluate
to true. Checking CPUID.OSXSAVE is actually a user land requirement,
whereas in the kernel you should really look at kernel internal variables
to determine whether xsave was enabled (or, if you really want to stay
with using cpu_has_osxsave you'd have to force re-execution of
get_cpu_cap() after xsave got enabled on individual CPUs), namely
mmu_cr4_features having X86_CR4_OSXSAVE set.

Additionally, under a hypervisor, CPUID.OSXSAVE may be set (due to
the hypervisor having enabled xsave), while the kernel may be running
with xsave disabled (e.g. due to a command line option saying so).

Thanks, Jan


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-17 14:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-17 10:33 your patch "crypto: sha1 - SSSE3 based SHA1 implementation for x86-64" vs xsave Jan Beulich
2011-11-17 12:36 ` Mathias Krause
2011-11-17 13:09   ` Jan Beulich
2011-11-17 14:12     ` Mathias Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®