diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-23 01:50:31 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-30 09:54:12 +0100 |
commit | 642525e3bd474dc50b7d0e8ee9c966b97e4be3ac (patch) | |
tree | 2f78318a8880893c5e274d540bdf21e5587cbd49 /arch/x86 | |
parent | KVM: SEV: initialize regions_list of a mirror VM (diff) | |
download | linux-642525e3bd474dc50b7d0e8ee9c966b97e4be3ac.tar.xz linux-642525e3bd474dc50b7d0e8ee9c966b97e4be3ac.zip |
KVM: SEV: move mirror status to destination of KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM
Allow intra-host migration of a mirror VM; the destination VM will be
a mirror of the same ASID as the source.
Fixes: b56639318bb2 ("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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/svm/sev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 8daabc3dc079..74b6459b5fb2 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -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); } |