mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: <minipli@googlemail.com>
Cc: <herbert@gondor.hengli.com.au>, <linux-kernel@vger.kernel.org>
Subject: your patch "crypto: sha1 - SSSE3 based SHA1 implementation for x86-64" vs xsave
Date: Thu, 17 Nov 2011 10:33:17 +0000	[thread overview]
Message-ID: <4EC4F0FD0200007800061840@nat28.tlf.novell.com> (raw)

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


             reply	other threads:[~2011-11-17 10:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 10:33 Jan Beulich [this message]
2011-11-17 12:36 ` Mathias Krause
2011-11-17 13:09   ` Jan Beulich
2011-11-17 14:12     ` Mathias Krause

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EC4F0FD0200007800061840@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minipli@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®