// Copyright (c) 2025 shibedrill
// SPDX-License-Identifier: MIT

use crate::arch::x86_64::cpuid::*;

pub fn intel_vt_supported() -> bool {
    match ProcessorVendor::try_get_current() {
        Ok(vendor) => match vendor == ProcessorVendor::Intel {
            true => match CPUID.get_feature_info() {
                Some(features) => features.has_vmx(),
                None => false,
            },
            false => false,
        },
        Err(_) => false,
    }
}
