Skip to content

Commit

Permalink
Updated topology builder with correct vps_per_socket calculation (#532)
Browse files Browse the repository at this point in the history
Implements issue: [TDX VMs with hyperthreading getting incorrect thread
count #481](#481)
  • Loading branch information
vibhutet authored Jan 7, 2025
1 parent 79bd6f5 commit e40801c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/vmcore/vm_topology/src/processor/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ impl TopologyBuilder<X86Topology> {
let eax = CacheParametersEax::from(eax);
if eax.cache_level() == 1 {
found_topology = true;
vps_per_socket = eax.cores_per_socket_minus_one() + 1;
threads_per_core = eax.threads_sharing_cache_minus_one() + 1;
vps_per_socket = (eax.cores_per_socket_minus_one() + 1) * threads_per_core;
break;
}
}
Expand Down

0 comments on commit e40801c

Please sign in to comment.