]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: SEV: move mirror status to destination of KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 23 Nov 2021 00:50:31 +0000 (19:50 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Nov 2021 08:54:12 +0000 (03:54 -0500)
Allow intra-host migration of a mirror VM; the destination VM will be
a mirror of the same ASID as the source.

Fixes: 1167986334b9 ("KVM: SEV: Add support for SEV intra host migration")
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211123005036.2954379-8-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c

index 8daabc3dc079edb24155b40ec9e3fd5c5ae1f0d7..74b6459b5fb29ea9e8367ddbc887fbf756c9bf29 100644 (file)
@@ -1619,11 +1619,13 @@ static void sev_migrate_from(struct kvm_sev_info *dst,
        dst->asid = src->asid;
        dst->handle = src->handle;
        dst->pages_locked = src->pages_locked;
+       dst->enc_context_owner = src->enc_context_owner;
 
        src->asid = 0;
        src->active = false;
        src->handle = 0;
        src->pages_locked = 0;
+       src->enc_context_owner = NULL;
 
        list_cut_before(&dst->regions_list, &src->regions_list, &src->regions_list);
 }