How do I disable avx instructions on a linux compu

2019-06-19 08:13发布

问题:

Or more specifically, how do I ensure that /proc/cpuinfo and the CPUID opcode do not show that AVX is enabled?

(For context, there is a bug on some Amazon EC2 instances, where AVX is falsely reported as active which causes programs that dynamically use AVX instructions to crash with SIGILL).

I've seen this kernel patch: https://patchwork.kernel.org/patch/1521191/, but I'm not sure if that affects just the kernel's avx usage or also patches up CPUID and /proc/cpuinfo. Regardless, I am hoping to find a solution that works on the linux 2.6.x kernel series.