Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpuid: Add bits to support AMD specific topology handling #109

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions mshv-ioctls/src/ioctls/vcpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -985,14 +985,23 @@ impl VcpuFd {
let mut ret = Ok(());

for entry in cpuid.as_slice().iter() {
let override_arg = None;
let mut override_arg = None;
let mut subleaf_specific = None;

match entry.function {
// Intel
// 0xb - Extended Topology Enumeration Leaf
// 0x1f - V2 Extended Topology Enumeration Leaf
0xb | 0x1f => {
// AMD
// 0x8000_001e - Processor Topology Information
// 0x8000_0026 - Extended CPU Topology
0xb | 0x1f | 0x8000_001e | 0x8000_0026 => {
subleaf_specific = Some(1);
override_arg = None;
}
0x0000_0001 | 0x8000_0008 => {
subleaf_specific = None;
override_arg = Some(1);
}
_ => {}
}
Expand Down
Loading