KVM: s390: move vcpu specific initalization to a later point
authorDominik Dingel <dingel@linux.vnet.ibm.com>
Tue, 2 Dec 2014 15:53:21 +0000 (16:53 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 23 Jan 2015 12:25:30 +0000 (13:25 +0100)
commitdafd032a15f8f165a7d10e00217d3b74f70a7b0f
tree2d9d9a572db8bdbca6c8f99fc06dcbd8812bfb15
parent0675d92dcf44aafc4aa40a60d1f4316e933c030d
KVM: s390: move vcpu specific initalization to a later point

As we will allow in a later patch to recreate gmaps with new limits,
we need to make sure that vcpus get their reference for that gmap
after they increased the online_vcpu counter, so there is no possible race.

While we are doing this, we also can simplify the vcpu_init function, by
moving ucontrol specifics to an own function.
That way we also start now setting the kvm_valid_regs for the ucontrol path.

Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c