• T
    KVM: SVM: Provide support for SEV-ES vCPU creation/loading · 376c6d28
    Tom Lendacky 提交于
    An SEV-ES vCPU requires additional VMCB initialization requirements for
    vCPU creation and vCPU load/put requirements. This includes:
    
    General VMCB initialization changes:
      - Set a VMCB control bit to enable SEV-ES support on the vCPU.
      - Set the VMCB encrypted VM save area address.
      - CRx registers are part of the encrypted register state and cannot be
        updated. Remove the CRx register read and write intercepts and replace
        them with CRx register write traps to track the CRx register values.
      - Certain MSR values are part of the encrypted register state and cannot
        be updated. Remove certain MSR intercepts (EFER, CR_PAT, etc.).
      - Remove the #GP intercept (no support for "enable_vmware_backdoor").
      - Remove the XSETBV intercept since the hypervisor cannot modify XCR0.
    
    General vCPU creation changes:
      - Set the initial GHCB gpa value as per the GHCB specification.
    Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
    Message-Id: <3a8aef366416eddd5556dfa3fdc212aafa1ad0a2.1607620209.git.thomas.lendacky@amd.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    376c6d28
sev.c 44.2 KB