x86: Detect NVMM hypervisor

MFC after:	1 week
This commit is contained in:
Kevin Bowling 2024-08-28 02:31:35 -07:00
parent cb91dc5095
commit f622dc5dae
3 changed files with 3 additions and 1 deletions

View file

@ -157,6 +157,7 @@ static const char *const vm_guest_sysctl_names[] = {
[VM_GUEST_BHYVE] = "bhyve",
[VM_GUEST_VBOX] = "vbox",
[VM_GUEST_PARALLELS] = "parallels",
[VM_GUEST_NVMM] = "nvmm",
};
_Static_assert(nitems(vm_guest_sysctl_names) == VM_GUEST_LAST,
"new vm guest type not added to vm_guest_sysctl_names");

View file

@ -79,7 +79,7 @@ extern u_long maxphys; /* max raw I/O transfer size */
*/
enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV,
VM_GUEST_VMWARE, VM_GUEST_KVM, VM_GUEST_BHYVE, VM_GUEST_VBOX,
VM_GUEST_PARALLELS, VM_GUEST_LAST };
VM_GUEST_PARALLELS, VM_GUEST_NVMM, VM_GUEST_LAST };
#endif /* KERNEL */

View file

@ -1370,6 +1370,7 @@ static struct {
{ "KVMKVMKVM", VM_GUEST_KVM }, /* KVM */
{ "bhyve bhyve ", VM_GUEST_BHYVE }, /* bhyve */
{ "VBoxVBoxVBox", VM_GUEST_VBOX }, /* VirtualBox */
{ "___ NVMM ___", VM_GUEST_NVMM }, /* NVMM */
};
static void