mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
crypto: xor - Check for osxsave as well as avx in crypto/xor
This affects xen pv guests with sufficiently old versions of xen and sufficiently new hardware. On such a system, a guest with a btrfs root won't even boot. Signed-off-by: John Haxby <john.haxby@oracle.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
452ec0498f
commit
edb6f29464
1 changed files with 2 additions and 2 deletions
|
@ -167,12 +167,12 @@ static struct xor_block_template xor_block_avx = {
|
||||||
|
|
||||||
#define AVX_XOR_SPEED \
|
#define AVX_XOR_SPEED \
|
||||||
do { \
|
do { \
|
||||||
if (cpu_has_avx) \
|
if (cpu_has_avx && cpu_has_osxsave) \
|
||||||
xor_speed(&xor_block_avx); \
|
xor_speed(&xor_block_avx); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define AVX_SELECT(FASTEST) \
|
#define AVX_SELECT(FASTEST) \
|
||||||
(cpu_has_avx ? &xor_block_avx : FASTEST)
|
(cpu_has_avx && cpu_has_osxsave ? &xor_block_avx : FASTEST)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue