Commit 751190a6 authored by John Haxby's avatar John Haxby Committed by Greg Kroah-Hartman

crypto: xor - Check for osxsave as well as avx in crypto/xor

commit edb6f294 upstream.

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: default avatarJohn Haxby <john.haxby@oracle.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Reported-by: default avatarMichael Marineau <michael.marineau@coreos.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4c54b9db
......@@ -167,12 +167,12 @@ static struct xor_block_template xor_block_avx = {
#define AVX_XOR_SPEED \
do { \
if (cpu_has_avx) \
if (cpu_has_avx && cpu_has_osxsave) \
xor_speed(&xor_block_avx); \
} while (0)
#define AVX_SELECT(FASTEST) \
(cpu_has_avx ? &xor_block_avx : FASTEST)
(cpu_has_avx && cpu_has_osxsave ? &xor_block_avx : FASTEST)
#else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment