mirror of
https://github.com/google/alioth.git
synced 2024-10-23 06:57:24 +00:00
fix(cpuid): add cache and TLB information
Signed-off-by: Changyuan Lyu <changyuanl@google.com>
This commit is contained in:
parent
2c419dae89
commit
8baaef0bfc
1 changed files with 8 additions and 0 deletions
|
@ -80,6 +80,14 @@ impl<V: Vm> ArchBoard<V> {
|
|||
}
|
||||
}
|
||||
}
|
||||
let highest = unsafe { __cpuid(0x8000_0000) }.eax;
|
||||
for func in [0x8000_0005, 0x8000_0006] {
|
||||
if func > highest {
|
||||
break;
|
||||
}
|
||||
let host_cpuid = unsafe { __cpuid(func) };
|
||||
cpuids.insert(CpuidIn { func, index: None }, host_cpuid);
|
||||
}
|
||||
Ok(Self {
|
||||
cpuids,
|
||||
sev_ap_eip: AtomicU32::new(0),
|
||||
|
|
Loading…
Reference in a new issue