WSL2-Linux-Kernel/arch/s390/kvm
Zeng Guang 1d5e740d51 KVM: Move kvm_arch_vcpu_precreate() under kvm->lock
kvm_arch_vcpu_precreate() targets to handle arch specific VM resource
to be prepared prior to the actual creation of vCPU. For example, x86
platform may need do per-VM allocation based on max_vcpu_ids at the
first vCPU creation. It probably leads to concurrency control on this
allocation as multiple vCPU creation could happen simultaneously. From
the architectual point of view, it's necessary to execute
kvm_arch_vcpu_precreate() under protect of kvm->lock.

Currently only arm64, x86 and s390 have non-nop implementations at the
stage of vCPU pre-creation. Remove the lock acquiring in s390's design
and make sure all architecture can run kvm_arch_vcpu_precreate() safely
under kvm->lock without recrusive lock issue.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Zeng Guang <guang.zeng@intel.com>
Message-Id: <20220419154409.11842-1-guang.zeng@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-08 04:47:28 -04:00
..
Kconfig KVM: Use interval tree to do fast hva lookup in memslots 2021-12-08 04:24:32 -05:00
Makefile KVM: s390: Use Makefile.kvm for common files 2021-12-09 12:58:33 -05:00
diag.c KVM: s390: restore old debugfs names 2021-07-27 16:59:00 -04:00
gaccess.c KVM: s390: Don't indicate suppression on dirtying, failing memop 2022-05-20 16:38:42 +02:00
gaccess.h KVM: s390: Add vm IOCTL for key checked guest absolute memory access 2022-02-14 16:12:57 +01:00
guestdbg.c KVM: s390: Add memcg accounting to KVM allocations 2020-12-10 13:36:05 +01:00
intercept.c KVM: s390: Honor storage keys when accessing guest memory 2022-02-14 16:12:57 +01:00
interrupt.c KVM: Add helpers to wrap vcpu->srcu_idx and yell if it's abused 2022-04-21 13:16:11 -04:00
irq.h KVM: s390: Remove redundant license text 2017-12-06 09:18:42 +01:00
kvm-s390.c KVM: Move kvm_arch_vcpu_precreate() under kvm->lock 2022-06-08 04:47:28 -04:00
kvm-s390.h KVM: s390: Add CPU dump functionality 2022-06-01 16:57:14 +02:00
priv.c s390/ptrace: move short psw definitions to ptrace header file 2022-05-06 20:45:15 +02:00
pv.c KVM: s390: Add CPU dump functionality 2022-06-01 16:57:14 +02:00
sigp.c KVM: s390: Clarify SIGP orders versus STOP/RESTART 2021-12-17 14:52:47 +01:00
trace-s390.h
trace.h
vsie.c KVM: Add helpers to wrap vcpu->srcu_idx and yell if it's abused 2022-04-21 13:16:11 -04:00