CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]        2026/11/09 04:02:38

Modified files:
        sys/arch/amd64/amd64: machdep.c trap.c vector.S 
        sys/arch/amd64/include: vmmvar.h 

Log message:
SEV-SNP: Register GHCB and handle #VC for unvalidated pages

More preparations for SEV-SNP: With SNP enabled, the GHCB page needs
to be registered with the hypervisor through the GHCB MSR protocol.

When we are an SNP enabled guest and touch a page that has not been
validated by us, the CPU delivers a #VC with error code
SVM_VMEXIT_PAGE_NOT_VALIDATED.  In that case we panic.

vctrap() now takes the faulting address as an additional argument,
so vctrap_early() has to pass %cr2 in %r8.  While there, also zero
the arguments sig and code: vctrap_early() is always in kernel mode,
so user is zero and they are never used.

ok mlarkin

Reply via email to