Lines Matching refs:source_kvm
2080 struct kvm *source_kvm; in sev_vm_move_enc_context_from() local
2092 source_kvm = fd_file(f)->private_data; in sev_vm_move_enc_context_from()
2093 ret = sev_lock_two_vms(kvm, source_kvm); in sev_vm_move_enc_context_from()
2097 if (kvm->arch.vm_type != source_kvm->arch.vm_type || in sev_vm_move_enc_context_from()
2098 sev_guest(kvm) || !sev_guest(source_kvm)) { in sev_vm_move_enc_context_from()
2103 src_sev = &to_kvm_svm(source_kvm)->sev_info; in sev_vm_move_enc_context_from()
2117 ret = sev_lock_vcpus_for_migration(source_kvm, SEV_MIGRATION_TARGET); in sev_vm_move_enc_context_from()
2121 ret = sev_check_source_vcpus(kvm, source_kvm); in sev_vm_move_enc_context_from()
2125 sev_migrate_from(kvm, source_kvm); in sev_vm_move_enc_context_from()
2126 kvm_vm_dead(source_kvm); in sev_vm_move_enc_context_from()
2131 sev_unlock_vcpus_for_migration(source_kvm); in sev_vm_move_enc_context_from()
2141 sev_unlock_two_vms(kvm, source_kvm); in sev_vm_move_enc_context_from()
2805 struct kvm *source_kvm; in sev_vm_copy_enc_context_from() local
2817 source_kvm = fd_file(f)->private_data; in sev_vm_copy_enc_context_from()
2818 ret = sev_lock_two_vms(kvm, source_kvm); in sev_vm_copy_enc_context_from()
2828 if (sev_guest(kvm) || !sev_guest(source_kvm) || in sev_vm_copy_enc_context_from()
2829 is_mirroring_enc_context(source_kvm) || kvm->created_vcpus) { in sev_vm_copy_enc_context_from()
2838 source_sev = &to_kvm_svm(source_kvm)->sev_info; in sev_vm_copy_enc_context_from()
2839 kvm_get_kvm(source_kvm); in sev_vm_copy_enc_context_from()
2844 mirror_sev->enc_context_owner = source_kvm; in sev_vm_copy_enc_context_from()
2862 sev_unlock_two_vms(kvm, source_kvm); in sev_vm_copy_enc_context_from()