• Tom Lendacky's avatar
    KVM: SVM: Provide support to launch and run an SEV-ES guest · ad73109a
    Tom Lendacky authored
    An SEV-ES guest is started by invoking a new SEV initialization ioctl,
    KVM_SEV_ES_INIT. This identifies the guest as an SEV-ES guest, which is
    used to drive the appropriate ASID allocation, VMSA encryption, etc.
    
    Before being able to run an SEV-ES vCPU, the vCPU VMSA must be encrypted
    and measured. This is done using the LAUNCH_UPDATE_VMSA command after all
    calls to LAUNCH_UPDATE_DATA have been performed, but before LAUNCH_MEASURE
    has been performed. In order to establish the encrypted VMSA, the current
    (traditional) VMSA and the GPRs are synced to the page that will hold the
    encrypted VMSA and then LAUNCH_UPDATE_VMSA is invoked. The vCPU is then
    marked as having protected guest state.
    Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
    Message-Id: <e9643245adb809caf3a87c09997926d2f3d6ff41.1607620209.git.thomas.lendacky@amd.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    ad73109a
sev.c 48.7 KB