CVSROOT:        /cvs
Module name:    src
Changes by:     bl...@cvs.openbsd.org   2025/05/24 21:22:56

Modified files:
        sys/arch/amd64/amd64: vmm_machdep.c 

Log message:
Prepare handler for AMD SEV-ES VMGEXIT in vmm(4).

SEV-ES enabled guests will convert non-automatic VM exits to VMGEXIT.
The information needed to handle the exit reason, are provided by
the guest in the GHCB.

For example, when the guest needs to emulate the CPUID instruction,
it will proivde the function value in %eax and the actual exit
reason SVM_VMEXIT_CPUID in the GHCB.  Then the guest will switch
back to vmm(4) using the VMGEXIT call.

In vmm(4) svm_handle_gexit() will then sync the values provided in
the GHCB with state information in struct vcpu and struct vmcb.
Then it will emulate CPUID as usual.  After sychronizing the results
back to the GHCB, the guest can be resumed.

For now provide a stub handler for SVM_VMEXIT_VMGEXIT and functions
for synchronizing GHCB with struct vcpu and struct vmcb.  The
switch-case statements in the stubs will error out.

from hshoexer@; OK mlarkin@

Reply via email to