]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: factor out reading of the guest TOD clock
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 29 Sep 2015 14:20:36 +0000 (16:20 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 13 Oct 2015 13:50:35 +0000 (15:50 +0200)
commitef62c31c9777baddb3a44ca9cdc9794e6deff92e
tree4e5442dbd7584f8710dd13a3b09eada92dcf0292
parent49e7d0b68b6e7adfc495247be2b3c5614a67c799
KVM: s390: factor out reading of the guest TOD clock

Let's factor this out and always use get_tod_clock_fast() when
reading the guest TOD.

STORE CLOCK FAST does not do serialization and, therefore, might
result in some fuzziness between different processors in a way
that subsequent calls on different CPUs might have time stamps that
are earlier. This semantics is fine though for all KVM use cases.
To make it obvious that the new function has STORE CLOCK FAST
semantics we name it kvm_s390_get_tod_clock_fast.

With this patch, we only have a handful of places were we
have to care about STP sync (using preempt_disable() logic).

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/interrupt.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/kvm-s390.h