]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite5063948f042cc2ffe0e7ac1f8dcb41574151783
treea1b60ce1821f86e3a6fc30e32ba3228d5525f6f6
parentd96124b176ca4ecd4b011fae929b4c8a3c579539
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