CVS commit: [netbsd-11] src/sys/arch/x86/x86

"Martin Husemann" <[email protected]>
Newsgroups gmane.os.netbsd.devel.cvs
Message-ID <[email protected]>
Module Name:	src
Committed By:	martin
Date:		Wed Jun  3 19:11:05 UTC 2026

Modified Files:
	src/sys/arch/x86/x86 [netbsd-11]: identcpu_subr.c

Log Message:
Pull up following revision(s) (requested by yamt in ticket #299):

	sys/arch/x86/x86/identcpu_subr.c: revision 1.16

x86: use 0x40000010 cpuid leaf only on vmware and kvm
specifically, do not use it on nvmm.

these hypervisor cpuid leafs are basically hypervisor-specific.
(there was a proposal on commonizing these hypervisor leafs. [1]
but it doesn't seem agreed on.)

this cpuid leaf 0x40000010 was originally from vmware. although it
seems more common to use the GETHZ (45) hypercall instead these days.

kvm seems to implement it as well. (via qemu vmware-cpuid-freq)
i personally haven't tested this on either vmware or kvm.

for nvmm (netbsd), the leaf has been implemented in 2025. [2]
and then the lapic bit has been disabled in 2026. [3] that is,

we had no releases with it enabled. even if you are running the
-current version of nvmm, it's better to avoid using this leaf
because it has always been reporting a wrong value.

[1] https://lore.kernel.org/all/1222881242.9381.17.camel@alok-dev1/
[2] https://mail-index.netbsd.org/source-changes/2025/04/11/msg156335.html
[3] https://mail-index.netbsd.org/source-changes/2026/05/01/msg161786.html


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.2.1 src/sys/arch/x86/x86/identcpu_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.