vmm(4): Suppress AMD HwPstate visibility to guests
authormlarkin <mlarkin@openbsd.org>
Sun, 3 Sep 2023 09:30:43 +0000 (09:30 +0000)
committermlarkin <mlarkin@openbsd.org>
Sun, 3 Sep 2023 09:30:43 +0000 (09:30 +0000)
commit2fba3160a5b47d6a352d5a583c75dec549c416a8
tree954e9ecf5903e196dda6f4c719f60a576c1f64e9
parent312e26c80be876012ae9792d4323a301329d66ae
vmm(4): Suppress AMD HwPstate visibility to guests

On newer Ryzen/EPYC, we need to hide the HwPstate CPUID 80000007:EDX
field for HwPstate, or guests will try to access the MSRs associated
with those, and that will fail with #GP.

ok deraadt
sys/arch/amd64/amd64/identcpu.c
sys/arch/amd64/amd64/vmm_machdep.c
sys/arch/amd64/include/specialreg.h
sys/arch/amd64/include/vmmvar.h