linux/arch/x86/kvm/svm
Peter Gonda 0c2c7c0692 KVM: SEV: Mark nested locking of vcpu->lock
svm_vm_migrate_from() uses sev_lock_vcpus_for_migration() to lock all
source and target vcpu->locks. Unfortunately there is an 8 subclass
limit, so a new subclass cannot be used for each vCPU. Instead maintain
ownership of the first vcpu's mutex.dep_map using a role specific
subclass: source vs target. Release the other vcpu's mutex.dep_maps.

Fixes: b56639318b ("KVM: SEV: Add support for SEV intra host migration")
Reported-by: John Sperbeck<jsperbeck@google.com>
Suggested-by: David Rientjes <rientjes@google.com>
Suggested-by: Sean Christopherson <seanjc@google.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Hillf Danton <hdanton@sina.com>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Peter Gonda <pgonda@google.com>

Message-Id: <20220502165807.529624-1-pgonda@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-06 13:08:04 -04:00
..
avic.c KVM: SVM: Do not activate AVIC for SEV-enabled guest 2022-04-11 13:28:56 -04:00
hyperv.h KVM: nSVM: Split off common definitions for Hyper-V on KVM and KVM on Hyper-V 2022-02-10 13:50:45 -05:00
nested.c KVM: x86/mmu: load new PGD after the shadow MMU is initialized 2022-02-25 08:20:18 -05:00
pmu.c Merge branch 'kvm-amd-pmu-fixes' into HEAD 2022-05-03 08:07:54 -04:00
sev.c KVM: SEV: Mark nested locking of vcpu->lock 2022-05-06 13:08:04 -04:00
svm_onhyperv.c KVM: SVM: Fix kvm_cache_regs.h inclusions for is_guest_mode() 2022-04-02 05:34:40 -04:00
svm_onhyperv.h KVM: nSVM: Split off common definitions for Hyper-V on KVM and KVM on Hyper-V 2022-02-10 13:50:45 -05:00
svm_ops.h x86/kvm: Always inline vmload() / vmsave() 2021-09-15 15:51:45 +02:00
svm.c KVM: SEV: add cache flush to solve SEV cache incoherency issues 2022-04-21 15:41:00 -04:00
svm.h KVM: SEV: add cache flush to solve SEV cache incoherency issues 2022-04-21 15:41:00 -04:00
vmenter.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00