Commit d48e531
committed
Fix Intel CPUID leaf 4 cache topology for SMT
When SMT is enabled, L1/L2 caches should report being shared by 2
logical processors (the SMT siblings). Previously EAX[25:14] was always
being set to 0, indicating no sharing which contradicts the SMT topology
reported in leaf 0xB. As per [1] EAX[25:14] indicates maximum number of
addressable IDs for logical processors sharing this cache.
This mismatch causes linux guest to print "BUG: arch topology borken / the
SMT domain not a subset of the CLS domain" during boot. Linux derives
L2 cache sharing groups from leaf 4 and expects SMT siblings to share
L2 but it was being informed that each vCPU has private L1/L2.
This brings the SMT handling logic in CPUID inline with what being done
for AMD in fix_amd_cache_topo() which sets the sharing count to 2 when
has_smt is true. This fixes #1001.
[1]: Table 1-15. Reference for CPUID Leaf 04H
https://cdrdv2-public.intel.com/775917/intel-64-architecture-processor-topology-enumeration.pdf
Signed-off-by: Amey Narkhede <ameynarkhede03@gmail.com>1 parent f969fb7 commit d48e531
1 file changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
342 | 346 | | |
343 | 347 | | |
344 | | - | |
345 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
346 | 352 | | |
347 | 353 | | |
348 | 354 | | |
| |||
0 commit comments