I have got a report that openbsd panics on boot with qemu -cpu Opteron_G3 (but Opteron_G2 works).
kernel: protection fault trap, code=0 Stopped at amd64_errata_setmsr+0x14: rdmsr ddb{0}> >> OpenBSD/amd64 BOOT 3.33 boot> Qemu does not implement all the secret errata MSRs. Does it make sense to simply skip all errata processing if we detect a hypervisor? diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c index a448b885ba7..371c0c8ff48 100644 --- a/sys/arch/amd64/amd64/identcpu.c +++ b/sys/arch/amd64/amd64/identcpu.c @@ -708,7 +708,7 @@ identifycpu(struct cpu_info *ci) } #endif - if (!strcmp(cpu_vendor, "AuthenticAMD")) + if (!strcmp(cpu_vendor, "AuthenticAMD") && !ISSET(cpu_ecxfeature, CPUIDECX_HV)) amd64_errata(ci); if (CPU_IS_PRIMARY(ci) && !strcmp(cpu_vendor, "CentaurHauls")) {