Searched hist:"2550882449299 fd55c8214529cc0777b789db0f7" (Results 1 – 1 of 1) sorted by relevance
/linux/arch/s390/kvm/ |
H A D | kvm-s390.c | diff 2550882449299fd55c8214529cc0777b789db0f7 Mon Oct 12 16:27:23 CEST 2015 David Hildenbrand <dahi@linux.vnet.ibm.com> KVM: s390: fix SCA related races and double use
If something goes wrong in kvm_arch_vcpu_create, the VCPU has already been added to the sca but will never be removed. Trying to create VCPUs with duplicate ids (e.g. after a failed attempt) is problematic.
Also, when creating multiple VCPUs in parallel, we could theoretically forget to set the correct SCA when the switch to ESCA happens just before the VCPU is registered.
Let's add the VCPU to the SCA in kvm_arch_vcpu_postcreate, where we can be sure that no duplicate VCPU with the same id is around and the VCPU has already been registered at the VM. We also have to make sure to update ECB at that point.
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
|