Page MenuHomeFreeBSD

bhyve: fix CPUID L3 Cache Size reporting for AMD/SVM
Needs ReviewPublic

Authored by kib on Tue, Dec 24, 4:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 3, 7:53 AM
Unknown Object (File)
Thu, Jan 2, 7:26 AM
Unknown Object (File)
Tue, Dec 31, 5:22 PM
Unknown Object (File)
Thu, Dec 26, 9:38 AM
Unknown Object (File)
Thu, Dec 26, 9:05 AM
Unknown Object (File)
Thu, Dec 26, 6:09 AM
Unknown Object (File)
Wed, Dec 25, 11:29 PM
Unknown Object (File)
Wed, Dec 25, 1:39 PM

Details

Reviewers
kevans
Group Reviewers
bhyve
Summary
Adjust leaf 0x8000_001D %ecx 3 on AMD (L3 cache params).
- Report cache as 2-way associative.  Glibc does not believe that there
  are fully associative L3 caches, ignoring the leaf and falling back to
  legacy way of reading cache params.
- Do not report 4095 logical CPUs per L3 cache, report the true total
  number of emulated CPUs.  The insanely large value tricked some
  version of glibc to overflow 32bit calculation of the L3 cache size,
  as reported in the PR.

Also, for leaf 0x8000_0008, do not clip ApicIdSize to zero if less than
4.  This effectively falls back to legacy.

PR:     279901

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped