KVM: s390: host STP toleration for VMs
authorFan Zhang <zhangfan@linux.vnet.ibm.com>
Wed, 13 May 2015 08:58:41 +0000 (10:58 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 4 Aug 2015 12:38:37 +0000 (14:38 +0200)
commitfdf036507f1fc036d5a06753e9e8b13f46de73e8
treeb9533136fecbd73e24f9e955edcd261060ee5957
parent554726d33c20791653dbd1c047c83f93459bc586
KVM: s390: host STP toleration for VMs

If the host has STP enabled, the TOD of the host will be changed during
synchronization phases. These are performed during a stop_machine() call.

As the guest TOD is based on the host TOD, we have to make sure that:
- no VCPU is in the SIE (implicitly guaranteed via stop_machine())
- manual guest TOD calculations are not affected

"Epoch" is the guest TOD clock delta to the host TOD clock. We have to
adjust that value during the STP synchronization and make sure that code
that accesses the epoch won't get interrupted in between (via disabling
preemption).

Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/etr.h
arch/s390/kernel/time.c
arch/s390/kvm/interrupt.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/priv.c