Split out handling of cpu family specific MSRs from cpu_init_msrs()
authorrobert <robert@openbsd.org>
Tue, 20 Sep 2022 14:28:27 +0000 (14:28 +0000)
committerrobert <robert@openbsd.org>
Tue, 20 Sep 2022 14:28:27 +0000 (14:28 +0000)
commit9f172165b574c19186ae3a65383c7fa8c8839f78
tree8cb30cd33f820bb4b4a187dc4ccddd181ea48403
parenteb9d8ed0789fddfaa2fff466a29055039e9c7abf
Split out handling of cpu family specific MSRs from cpu_init_msrs()
to a separate function that gets called after identifycpu() so that
we have the required information to handle the correct MSRs for each
cpu.

Additionally, move the handling of the DE_CFG_SERIALIZE_LFENCE and
IA32_DEBUG_INTERFACE_LOCK MSRs out of identifycpu() to the new
function so that they get set again after a suspend/resume cycle as
well, which in fixes TSC sync failures.

discussed with and input from deraadt@, mlarkin@
sys/arch/amd64/amd64/acpi_machdep.c
sys/arch/amd64/amd64/cpu.c
sys/arch/amd64/amd64/identcpu.c
sys/arch/amd64/include/cpu.h