From 949f834a614e76695719bc7ca9209a5cb7601f3c Mon Sep 17 00:00:00 2001 From: "Stephen J. Kiernan" Date: Fri, 17 May 2019 17:21:32 +0000 Subject: 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 | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/kern/subr_param.c') diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index d8f390bbd5a8..6cb8e5d48d2b 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -153,6 +153,7 @@ static const char *const vm_guest_sysctl_names[] = { "vmware", "kvm", "bhyve", + "vbox", NULL }; CTASSERT(nitems(vm_guest_sysctl_names) - 1 == VM_LAST); -- cgit v1.2.3