Skip to content

Commit cd1ce9d

Browse files
Jonathan Woollett-Lightkalyazin
authored andcommitted
fix: NumSharingCache
Corrects access within `update_extended_cache_topology_entry` to use the bit range 14..26 to access the `NumSharingCache` field. Signed-off-by: Jonathan Woollett-Light <[email protected]>
1 parent 4c449a3 commit cd1ce9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vmm/src/guest_config/x86_64/cpuid/amd/normalize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ impl super::AmdCpuid {
327327
1 | 2 => {
328328
// SAFETY: We know `cpus_per_core > 0` therefore this is always safe.
329329
let sub = u32::from(cpus_per_core.checked_sub(1).unwrap());
330-
set_range(&mut subleaf.result.eax, 14..28, sub)
330+
set_range(&mut subleaf.result.eax, 14..26, sub)
331331
.map_err(ExtendedCacheTopologyError::NumSharingCache)?;
332332
}
333333
// L3 Cache

0 commit comments

Comments
 (0)