mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
committed by
Rob Bradford
parent
ff39c35ac2
commit
89107d2db4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user