Skip to content

Commit

Permalink
mpk: temporarily disable to avoid CI failures (#7446)
Browse files Browse the repository at this point in the history
GitHub CI runners are showing some strange behavior: on certain runners
(unknown which ones), the CPUID bits claim that MPK is supported, but
running any MPK code (e.g., `RDPKRU`) causes a `SIGILL` crash. This
change disables MPK until #7445 is resolved.
  • Loading branch information
abrown authored Nov 1, 2023
1 parent efeeaf5 commit c741d24
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/runtime/src/mpk/pkru.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ pub fn write(pkru: u32) {
/// Check the `ECX.PKU` flag (bit 3) of the `07h` `CPUID` leaf; see the
/// Intel Software Development Manual, vol 3a, section 2.7.
pub fn has_cpuid_bit_set() -> bool {
// TODO: disable MPK support until the following issue is resolved:
// https://github.com/bytecodealliance/wasmtime/issues/7445
if true {
return false;
}
let result = unsafe { std::arch::x86_64::__cpuid(0x07) };
(result.ecx & 0b100) != 0
}
Expand Down

0 comments on commit c741d24

Please sign in to comment.