Skip to content

Commit 73bf8f9

Browse files
x
1 parent 8e9280f commit 73bf8f9

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

hypervisor/src/arch/x86/mod.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use std::sync::OnceLock;
1717

1818
use thiserror::Error;
1919

20-
use crate::{CpuVendor, CpuVendor, Hypervisor};
20+
use crate::{CpuVendor, Hypervisor};
2121

2222
#[cfg(all(feature = "mshv_emulator", target_arch = "x86_64"))]
2323
pub mod emulator;
@@ -521,23 +521,3 @@ pub(crate) fn request_guest_amx_support() -> Result<(), AmxGuestSupportError> {
521521
Err(AmxGuestSupportError::AmxGuestTileRequest { errno: result })
522522
}
523523
}
524-
525-
/// Error that may be returned when attempting to enable AMX state components for guests
526-
#[derive(Debug, Error)]
527-
pub enum AmxGuestSupportError {
528-
/// Attempted to enable AMX on a CPU from a vendor that is not known to support AMX features.
529-
#[error("The host CPU's vendor does not support AMX features. Only Intel provides such CPUs.")]
530-
VendorDoesNotSupportAmx,
531-
/// Unable to verify that the host supports AMX.
532-
#[error("The host does not support AMX tile state components: errno={errno}")]
533-
AmxNotSupported { errno: i64 },
534-
/// The syscall to check for AMX tile state support succeeded, but the returned
535-
/// features did not match our expectations.
536-
#[error(
537-
"Could not verify AMX support. These are the supported features that were reported: features={features}"
538-
)]
539-
InvalidAmxTileFeatureCheck { features: usize },
540-
/// The request to enable AMX related state components for guests failed.
541-
#[error("Failed to enable AMX tile state components for guests: errno={errno}")]
542-
AmxGuestTileRequest { errno: i64 },
543-
}

0 commit comments

Comments
 (0)