arch: x86_64: Allow unused_unsafe on cpuid match arms

The nightly compiler used by cargo fuzz no longer requires unsafe
for __cpuid intrinsics, but stable still does.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2026-03-05 23:27:53 +01:00
committed by Rob Bradford
parent ff39c35ac2
commit 89107d2db4

View File

@@ -641,6 +641,7 @@ pub fn generate_common_cpuid(
// Update some existing CPUID
for entry in cpuid.as_mut_slice().iter_mut() {
#[allow(unused_unsafe)]
match entry.function {
// Clear AMX related bits if the AMX feature is not enabled
0x7 if !config.amx => {
@@ -711,7 +712,6 @@ pub fn generate_common_cpuid(
// SAFETY: cpuid called with valid leaves
&& unsafe { std::arch::x86_64::__cpuid(0x8000_0000).eax } >= 0x8000_0006 =>
{
#[allow(unused_unsafe)]
// SAFETY: cpuid called with valid leaves
let leaf = unsafe { std::arch::x86_64::__cpuid(0x8000_0006) };
entry.eax = leaf.eax;