mirror of
https://github.com/mii443/nel_os.git
synced 2025-08-22 16:15:38 +00:00
cpuid brand string
This commit is contained in:
@ -5,10 +5,9 @@ use super::{vcpu::VCpu, vmcs::VmxLeaf};
|
||||
|
||||
pub fn handle_cpuid_exit(vcpu: &mut VCpu) {
|
||||
let regs = &mut vcpu.guest_registers;
|
||||
info!("CPUID called with EAX={:#x}, ECX={:#x}", regs.rax, regs.rcx);
|
||||
|
||||
let vendor: &[u8; 12] = b"miHypervisor";
|
||||
let brand_string: &[u8; 48] = b"Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz \0";
|
||||
let brand_string: &[u8; 48] = b"mii Hypervisor CPU on Intel VT-x \0";
|
||||
|
||||
let vendor = unsafe { core::mem::transmute::<&[u8; 12], &[u32; 3]>(vendor) };
|
||||
let brand_string = unsafe { core::mem::transmute::<&[u8; 48], &[u32; 12]>(brand_string) };
|
||||
|
@ -656,6 +656,9 @@ impl VmxLeaf {
|
||||
0xD => VmxLeaf::EXTENDED_ENUMERATION,
|
||||
0x80000000 => VmxLeaf::EXTENDED_FUNCTION,
|
||||
0x80000001 => VmxLeaf::EXTENDED_PROCESSOR_SIGNATURE,
|
||||
0x80000002 => VmxLeaf::EXTENDED_FEATURE_2,
|
||||
0x80000003 => VmxLeaf::EXTENDED_FEATURE_3,
|
||||
0x80000004 => VmxLeaf::EXTENDED_FEATURE_4,
|
||||
_ => VmxLeaf::UNKNOWN,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user