KVM: s390: switch to get_tod_clock() and fix STP sync races
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 29 Sep 2015 14:27:24 +0000 (16:27 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 13 Oct 2015 13:50:34 +0000 (15:50 +0200)
commit5a3d883a59b3fe8dc8775c7a79200a5b11a6761e
treea1b60ce1821f86e3a6fc30e32ba3228d5525f6f6
parent238293b14d9b1f5689e2aa68710000b0f25aa612
KVM: s390: switch to get_tod_clock() and fix STP sync races

Nobody except early.c makes use of store_tod_clock() to handle the
cc. So if we would get a cc != 0, we would be in more trouble.

Let's replace all users with get_tod_clock(). Returning a cc
on an ioctl sounded strange either way.

We can now also easily move the get_tod_clock() call into the
preempt_disable() section. This is in fact necessary to make the
STP sync work as expected. Otherwise the host TOD could change
and we would end up with a wrong epoch calculation.

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/priv.c