• Ashish Kalra's avatar
    x86/kvm: Add guest support for detecting and enabling SEV Live Migration feature. · f4495615
    Ashish Kalra authored
    The guest support for detecting and enabling SEV Live migration
    feature uses the following logic :
    
     - kvm_init_plaform() checks if its booted under the EFI
    
       - If not EFI,
    
         i) if kvm_para_has_feature(KVM_FEATURE_MIGRATION_CONTROL), issue a wrmsrl()
             to enable the SEV live migration support
    
       - If EFI,
    
         i) If kvm_para_has_feature(KVM_FEATURE_MIGRATION_CONTROL), read
            the UEFI variable which indicates OVMF support for live migration
    
         ii) the variable indicates live migration is supported, issue a wrmsrl() to
              enable the SEV live migration support
    
    The EFI live migration check is done using a late_initcall() callback.
    
    Also, ensure that _bss_decrypted section is marked as decrypted in the
    hypervisor's guest page encryption status tracking.
    Signed-off-by: default avatarAshish Kalra <ashish.kalra@amd.com>
    Reviewed-by: default avatarSteve Rutherford <srutherford@google.com>
    Message-Id: <b4453e4c87103ebef12217d2505ea99a1c3e0f0f.1629726117.git.ashish.kalra@amd.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    f4495615
mem_encrypt.c 13.7 KB