|
@@ -562,6 +562,11 @@ static int __init camellia_aesni_init(void)
|
|
{
|
|
{
|
|
const char *feature_name;
|
|
const char *feature_name;
|
|
|
|
|
|
|
|
+ if (!cpu_has_avx2 || !cpu_has_avx || !cpu_has_aes || !cpu_has_osxsave) {
|
|
|
|
+ pr_info("AVX2 or AES-NI instructions are not detected.\n");
|
|
|
|
+ return -ENODEV;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
|
|
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
|
|
pr_info("CPU feature '%s' is not supported.\n", feature_name);
|
|
pr_info("CPU feature '%s' is not supported.\n", feature_name);
|
|
return -ENODEV;
|
|
return -ENODEV;
|