NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/60524: WARNING triggered booting NetBSD VMs on most hypervisors



>Number:         60524
>Category:       kern
>Synopsis:       WARNING triggered booting NetBSD VMs on most hypervisors
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 01 13:00:00 +0000 2026
>Originator:     Carlo Arenas
>Release:        
>Organization:
>Environment:
NetBSD  8.3 NetBSD 8.3 (GENERIC) #0: Sat May  4 18:57:00 UTC 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/i386/compile/GENERIC i386

the issue is reproducible also in older releases, as well as newer ones (including current), with very similar output.
>Description:
Using qemu-system-i386 or qemu-system-x86_64 on a Linux host to run NetBSD VM (with or without KVM) triggers a boot warning for failing to attach the `vmt` driver.

during initialization off the CPU, the possibility of running under an hypervisor is checked, so use that information to ensure that the driver matches the expected hypervisor (not tested, as I don't have VMWare)
>How-To-Repeat:
Start a NetBSD VM under QEMU/kvm (or any other VMM other than VMWare), and the following will be observed during kernel initialization:

vmt0 at cpu0
vmware: open failed, eax=ffffffff, ecx=0000001e, edx=00005658
vmt0: failed to open backdoor RPC channel (TCLO protocol)
...
WARNING: 1 error while detecting hardware; check system log.
>Fix:
Index: sys/arch/x86/x86/vmt.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/vmt.c,v
retrieving revision 1.22
diff -u -r1.22 vmt.c
--- sys/arch/x86/x86/vmt.c	9 May 2024 12:09:59 -0000	1.22
+++ sys/arch/x86/x86/vmt.c	1 Aug 2026 12:07:47 -0000
@@ -51,6 +51,8 @@
 		return 0;
 	if ((ci->ci_flags & (CPUF_BSP|CPUF_SP|CPUF_PRIMARY)) == 0)
 		return 0;
+	if (vm_guest != VM_GUEST_VMWARE)
+		return 0;
 
 	return vmt_probe();
 }




Home | Main Index | Thread Index | Old Index