kernel - Workaround qemu bug w/ MSR_IA32_ARCH_CAPABILITIES v6.0.1
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 9 Aug 2021 17:45:53 +0000 (10:45 -0700)
committerAaron LI <aly@aaronly.me>
Fri, 8 Oct 2021 01:28:12 +0000 (09:28 +0800)
commit3905720f4b42877bb5149e5fcdf7359a3572c92f
treed69c41bcd05cfe2d3ed4d16436f472b9ec4780bb
parent22e07bffca3d72ff01814e82b1d64a84d8fd6051
kernel - Workaround qemu bug w/ MSR_IA32_ARCH_CAPABILITIES

* qemu allows cpuid report that MSR_IA32_ARCH_CAPABILITIES exists, but
  then fails to implement the MSR.  This causes the kernel to panic
  in early boot.

* Use rdmsr_safe() and report the non-working msr instead of panicing.

* Fixes qemu + DFly on some recent Intel cpus.

refs #3292
sys/platform/pc64/x86_64/identcpu.c
sys/platform/pc64/x86_64/vm_machdep.c