Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jul 2025 16:28:28 +0100
From:      Lexi Winter <ivy@freebsd.org>
To:        virtualization@freebsd.org
Subject:   how do i make a bhyve guest pick up the bhyve CPU topology?
Message-ID:  <aIuLnFbIqDZwqosm@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
hello,

i have a VM host with a CPU:

CPU: Intel(R) Xeon(R) E E-2468 (2611.20-MHz K8-class CPU)

HTT is disabled in the BIOS, so this shows up on the host as
1 socket x 8 cores:

FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)

now i start a bhyve VM with '-c 2', but the VM does not pick up the
expected topology (2 sockets x 1 core x 1 thread), instead it decides
to enable HTT:

FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 1 core(s) x 2 hardware threads

if i force bhyve to set a particular topology, e.g. with
'-c 2,sockets=2,cores=1,threads=1' then the guest still does not pick up
the correct topology, but it does log some exciting new messages:

WARNING: L1 data cache covers fewer APIC IDs than a core (0 < 1)
WARNING: L2 data cache covers fewer APIC IDs than a core (0 < 1)
WARNING: L3 data cache covers fewer APIC IDs than a core (0 < 1)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 1 core(s) x 2 hardware threads

this is using main ~29af6d2e2ec9fe8df7cf1e1a0bf3597028831b18 on amd64.

does anyone have an idea what's going on here or how i can fix it?

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaIuLmAAKCRD1nT63mIK/
YIn1AQCcBNtV2BkbXnk5RqJ2pBXKxZD7eu9uPRrUgds3eCLQggEA+6vF6VDZWpbR
U5YaC0IX9kid+8RO/leECdCmfeZIwAk=
=1z0H
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aIuLnFbIqDZwqosm>