opnsense-src/sys/amd64/vmm
Konstantin Belousov 0698ce429f 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@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
2025-03-05 14:27:58 +02:00
..
amd vmm: Consolidate code which manages guest memory regions 2025-02-18 16:00:07 +00:00
intel vmm: Consolidate code which manages guest memory regions 2025-02-18 16:00:07 +00:00
io Remove stray whitespaces from sys/amd64/ 2024-09-21 07:05:46 -06:00
vmm.c vmm: Consolidate code which manages guest memory regions 2025-02-18 16:00:07 +00:00
vmm_dev_machdep.c amd64/vmm: Rename vm_get_vmspace() to vm_vmspace() 2025-01-07 02:16:04 +00:00
vmm_host.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vmm_host.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vmm_instruction_emul.c vmm: Emulate testb imm8,r/m8 2025-03-04 13:51:47 +00:00
vmm_ioport.c bhyve: initialize register value 2024-09-27 08:59:36 -04:00
vmm_ioport.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vmm_lapic.c vmm: Move vmm_ktr.h to a common directory 2024-08-26 18:41:05 +00:00
vmm_lapic.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vmm_mem.h amd64/vmm: Remove vmm_mem_init() 2025-01-07 02:15:51 +00:00
vmm_mem_machdep.c vmm: Consolidate code which manages guest memory regions 2025-02-18 16:00:07 +00:00
vmm_snapshot.c vmm: Fix compiling error with BHYVE_SNAPSHOT 2024-02-06 10:38:34 -05:00
vmm_stat.h vmm: Move duplicated stats code into a generic file 2024-08-26 18:41:14 +00:00
vmm_util.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
vmm_util.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
x86.c bhyve: fix CPUID L3 Cache Size reporting for AMD/SVM 2025-03-05 14:27:58 +02:00
x86.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00