Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mpk: reenable MPK support with vendor string check
In bytecodealliance#7446 I disabled MPK support temporarily due to failures in CI runs. Looking into this further in bytecodealliance#7445, I discovered that it is due to how `has_cpuid_bit_set` works on different x86 machines: Intel's `CPUID` instruction reports support for MPK in a certain leaf bit, AMD does it some other (unknown?) way. The CI problem boiled down to occasional runs on AMD machines that would fail with `SIGILL` because the AMD machine reported that it had MPK support when it really did not. This change fixes the issue by first checking if the CPU vendor string is `GenuineIntel` before inspecting the MPK `CPUID` leaf bit. Closes bytecodealliance#7445.
- Loading branch information