Hide WAITPKG cpu feature from vmm(4) guests.
authordv <dv@openbsd.org>
Tue, 10 Jan 2023 01:09:14 +0000 (01:09 +0000)
committerdv <dv@openbsd.org>
Tue, 10 Jan 2023 01:09:14 +0000 (01:09 +0000)
commitc2cbc5b2d858c1549980a6bf2d5f58efa041f1e2
treebd62545cd239ee1c8235e0f4b0abf5d31893dadf
parentae6209ab7d3a89efddabb67562af7d6f2b7eb38f
Hide WAITPKG cpu feature from vmm(4) guests.

Alder Lake and similar-era Intel platforms introduced new userland
wait instructions. Since vmm was passing this cpuid bit into guests,
some would attempt TPAUSE instructions and trigger invalid instruction
exceptions because VMX requires additional configuration to support
emulation.

This also adds WAITPKG to i386 and amd64 cpu feature identification.

Input from anton@, cheloha@, and guenther@. Tested by jmatthew@.

OK deraadt.
sys/arch/amd64/amd64/identcpu.c
sys/arch/amd64/include/specialreg.h
sys/arch/amd64/include/vmmvar.h
sys/arch/i386/i386/machdep.c
sys/arch/i386/include/specialreg.h