• Peter Gonda's avatar
    KVM: SEV: Allow SEV intra-host migration of VM with mirrors · b2125513
    Peter Gonda authored
    For SEV-ES VMs with mirrors to be intra-host migrated they need to be
    able to migrate with the mirror. This is due to that fact that all VMSAs
    need to be added into the VM with LAUNCH_UPDATE_VMSA before
    lAUNCH_FINISH. Allowing migration with mirrors allows users of SEV-ES to
    keep the mirror VMs VMSAs during migration.
    
    Adds a list of mirror VMs for the original VM iterate through during its
    migration. During the iteration the owner pointers can be updated from
    the source to the destination. This fixes the ASID leaking issue which
    caused the blocking of migration of VMs with mirrors.
    Signed-off-by: default avatarPeter Gonda <pgonda@google.com>
    Cc: Sean Christopherson <seanjc@google.com>
    Cc: Marc Orr <marcorr@google.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: kvm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Message-Id: <20220211193634.3183388-1-pgonda@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    b2125513
sev_migrate_tests.c 10.4 KB