Enable AMD SEV support in vmm(4).
authorbluhm <bluhm@openbsd.org>
Tue, 27 Aug 2024 09:16:03 +0000 (09:16 +0000)
committerbluhm <bluhm@openbsd.org>
Tue, 27 Aug 2024 09:16:03 +0000 (09:16 +0000)
commitebaf145fc214b20f93a59c0f55728a6db3a03c40
tree2033d9b2425ed329117036033bd00ee327eeb435
parentca1080d01edca48cd5c51d6f8b7aad0a96d08ab2
Enable AMD SEV support in vmm(4).

Bring the pieces for vmm(4) to support guests with SEV memory
encryption on AMD CPUs.  The corresponding vmd(8) changes will
follow.
Emulate cpuid 0x8000001f so the guest can discover SEV features.
Allow vmd(8) to enable SEV on VM creation.  Inform vmd(8) about the
c-bit position and ASID assigned to each VCPU.
Note that vmd(8) has to be rebuilt with the new header files.

from hshoexer@; input dv@; OK mlarkin@
sys/arch/amd64/amd64/identcpu.c
sys/arch/amd64/amd64/vmm_machdep.c
sys/arch/amd64/include/cpu.h
sys/arch/amd64/include/vmmvar.h
sys/dev/vmm/vmm.c
sys/dev/vmm/vmm.h