]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Instead of individual conditional statements to look for each hypervisor
authorstevek <stevek@FreeBSD.org>
Fri, 17 May 2019 17:21:32 +0000 (17:21 +0000)
committerstevek <stevek@FreeBSD.org>
Fri, 17 May 2019 17:21:32 +0000 (17:21 +0000)
commitdd31a8ef39067d148388c965cf6a709cc3e905cc
treed9d0f595c23d6d9d43e817514a4da14eb65e4731
parent846a64221bff83fd20eeffdb662c0fb06b36d48e
Instead of individual conditional statements to look for each hypervisor
type, use a table to make it easier to add more in the future, if needed.

Add VirtualBox detection to the table ("VBoxVBoxVBox" is the hypervisor
vendor string to look for.) Also add VM_GUEST_VBOX to the VM_GUEST
enumeration to indicate VirtualBox.

Save the CPUID base for the hypervisor entry that we detected. Driver code
may need to know about it in order to obtain additional CPUID features.

Approved by: bryanv, jhb
Differential Revision: https://reviews.freebsd.org/D16305
sys/kern/subr_param.c
sys/sys/systm.h
sys/x86/include/x86_var.h
sys/x86/x86/identcpu.c