FreeBSD/src 0698ce4sys/amd64/vmm x86.c

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

Adjust leaf 0x8000_001D %ecx 3 on AMD (L3 cache params).
- Report cache as 1-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
With the help from:     Florian Weimer <fweimer at redhat.com>
Reviewed by:    kevans, meta, mp
Tested by:      meta, mp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D48187
DeltaFile
+8-3sys/amd64/vmm/x86.c
+8-31 files

UnifiedSplitRaw